-
Notifications
You must be signed in to change notification settings - Fork 27
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
Secret paths shoudn't be hardcoded since vault supports mounting #12
base: master
Are you sure you want to change the base?
Conversation
Rather than change the API to remove the 'secret' in the |
Vault allow user to mount and remount any backend at any path. Including the default 'secret' mount. The only path(except administration ones) that is unpossible to unmount is 'cubbyhole'. Even in cubbyhole case, there can exist many cubbyholes. Forcing library user to follow defaults limits him/her too strong. |
I like the idea of making it configurable, with a default that matches Vault's default! |
Even having this worked around, I think there is also some cases where API can be broken for the sake of making library usable by any Vault user. I can see at least these at first sight:
I see some ways of fixing it:
|
One clarification: this crate version is NOT bound to the Vault release, I just end up making API breaking changes every time they release because they change their JSON output 😉 To be clear, I am OK with breaking API compatibility, I just like to consider the effect of it a bit more. I'm very open to changing the secrets to be able to be something that we can serialize OR display, and with making host be a std::Display type so that we can take in a String as well. |
So we just need version separation. Development branch maybe? |
Secrets can be anywhere depending of mount types, so secret paths shouldn't be hardcoded into paths.
Also added convenience examples for taking settings from environment variables like mainstream client does.
Fixed some tests that didn't work on my vault -dev instance because some tokens required root token privileges.