-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 does not support interacting with multiple vault servers nor storing separate tokens for each. #18359
Comments
I too would like to see this feature optionally available. I am aware that Vault provides an extension point, and even suggests a script a user can copy/paste to gain similar functionality: https://developer.hashicorp.com/vault/docs/commands/token-helper However, I think it's such a standard thing to want to do, it is an odd decision to force this to remain outside core Vault. I'm pretty sure there have been other issues opened by others in the past asking for the same. |
#1937 #247 #2092 #7159 all show further interest in a more flexible token management capability in Vault core. https://github.com/joemiller/vault-token-helper is an example of what people have come up with as an external tool. Considering I have my own hacky shell scripts in this direction at work, and would love to have a simpler option to more easily share with colleagues, I'd be interested in working on a PR, if we could agree a direction that HashiCorp are happy with. One caveat: varied tokens based on VAULT_ADDR is not always what people want. I myself have been known to update VAULT_ADDR whilst intentionally using the same token, to test behaviour differences between different Vault nodes in a cluster, or between direct and via-loadbalancer access. We would need to be sensitive to this use case and general compatibility concerns, in making any change. |
I would need this to support different organizations with my PC and laptop 😄 |
Create your own wrapper or use something like: |
I ended up writing my own that month thanks. Still weird for vault to actively not implement support for managing multiple tokens per vault_addr. |
@divyaac Why this issue was closed? |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
vault login
generates ~/.vault-token for whichever vault server you specified via-address
or via theVAULT_ADDR
environment variable. But if you try to access a different vault server it'll try to use the key from the initial vault server and has no sense of token organization.Describe the solution you'd like
It would be pretty outstanding if .vault-token could describe multiple vault server addresses in its token file so you can login per site.
Such as:
And so forth for each VAULT_ADDR you've used in a session.
Describe alternatives you've considered
Other than modifying vault itself:
Explain any additional use-cases
Any human being interacting with more than one vault cluster having to work with more than one token for multiple vault remotes.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: