peopledoc / vault-cli

A configurable command-line interface tool (and python library) to interact with Hashicorp Vault
https://vault-cli.readthedocs.io/
Other
81 stars 21 forks source link

Vault-cli env should reliably crash if it cannot access a value #176

Closed ewjoachim closed 4 years ago

ewjoachim commented 4 years ago

@ThomasEcuer an opinion ?

ewjoachim commented 4 years ago

vault-cli get-all should be aligned: display as much as possible in stdout but exit 1 if at least one value didn't work, and explain what didn't work in stderr.

tlehoux commented 4 years ago

It could be great to let the user choose (with the help of an option) whether he wants vault-cli env to crash or not when vault-cli failed to load secrets (whatever the reason, bad path, hashicorp vault instance down, invalid token or cert, and so on).

ewjoachim commented 4 years ago

I'm ok with that, I think I'd prefer if by default it crashes consistently.

ewjoachim commented 4 years ago

If vault-cli env is directed to use a path and one of the subpaths doesn't work, I guess it should crash too, but I'm less sure.

I've added an error message but no crash

ewjoachim commented 4 years ago

@tlehoux Released in 1.5.1 :) You can either use vault env & crash if the secrets cannot be fetched, or vault env --force to launch your program anyway :)