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

Vault env: Secret that may or may not be there #137

Open
ewjoachim opened this issue Mar 13, 2020 · 1 comment
Open

Vault env: Secret that may or may not be there #137

ewjoachim opened this issue Mar 13, 2020 · 1 comment
Assignees

Comments

@ewjoachim
Copy link
Contributor

ewjoachim commented Mar 13, 2020

vault env -p 'secret?' -- env
vault env -p 'secret=BLA?' -- env

will omit the environment variable altogether if an error happens when trying to read the secret.

@ewjoachim ewjoachim self-assigned this Mar 14, 2020
@ewjoachim
Copy link
Contributor Author

Soooo

I think that one of the few things we should do is model the "Secret not found" in a better way. This would change the api, though, but if path1 is ok and path2 not ok:

s = client.get_secrets("")
# I think we should get something like:
{
	"path1": {"key": "value"},
    "path2": InvalidSecret(),
}

Now what I'm not sure is what the expected this is:

  • In the lib, if I ask for client.get_secret("path1", "path2"), what should I get ?
  • In the cli, if I ask for vault get-all, what should I get ?
  • In the cli, if I ask for vault get-all path1 path2, what should I get ?
  • Depending on the answer above, vault env -p '' -- env, what should I get ?
  • what about vault env -p path1 -p path2 -- env?

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