Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safe is not able to use a unix socket provided by a vault agent #225

Open
jouveits opened this issue Jan 29, 2021 · 0 comments
Open

safe is not able to use a unix socket provided by a vault agent #225

jouveits opened this issue Jan 29, 2021 · 0 comments

Comments

@jouveits
Copy link

Vault agent (with auto-auth) can provide a local unix socket for other local clients to use (for instance vault cli).

Unfortunately, safe does not seem to be able to use it, unlike the vault cli:

# Poining the VAULT_ADDR to the socket provided by vault agent
$ export VAULT_ADDR=unix:///var/run/vault/agent.sock
# Local user can use it:
$ ls -l /var/run/vault/agent.sock
srwxrwx--- 1 vault vault 0 Jan 22 13:53 /var/run/vault/agent.sock
# Vault cli can use that socket, and use the authentication provided by vault agent:
$ vault kv list legacy/jouve-infradev
Keys
----
my-secrets/
# On the other end, safe is not able to use the socket:
$ $ safe version
safe v1.5.9
$ safe env
  VAULT_ADDR  unix:///var/run/vault/agent.sock
$ safe tree legacy
You are not authenticated to a Vault.
Try safe auth ldap
 or safe auth github
 or safe auth token
 or safe auth userpass
 or safe auth approle
$ safe auth status
Authenticating against  at unix:///var/run/vault/agent.sock
!! Transport Error: Get unix://:80//var/run/vault/agent.sock/v1/auth/token/lookup-self: unsupported protocol scheme "unix"

$ safe vault kv list legacy/jouve-infradev
Keys
----
my-secrets/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant