-
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 in dev mode clobbers the .vault-token file #1861
Comments
Non-reproducible for me (and as a side note, I use this workflow all the time and have never seen this):
|
My mistake @jefferai, you are right, it happens slightly different, I didn't notice until now because I didn't think it cat the .vault-token after every step before. It seems that the .vault-token file is overwritten automatically regardless if the file exists or not when you run Personally, I find this behavior undesirable, but looking at the docs, I suppose the "Automatically Authenticated" covers this behavior although it doesn't clearly state that is what it is doing. |
Not reproducible and |
I just ran into this problem as well -- every time I run my unit tests, I am logged out of Vault CLI. Perhaps there could be additionally a |
PRs welcome. I'd match the flags from |
When starting a vault dev server the token helper is invoked to store the dev root token. This option gives the user the ability to not store the token. Storing the token can be undesirable in certain circumstances (e.g. running local tests) as the user's existing vault token is clobbered without warning. Fixes hashicorp#1861
When starting a vault dev server the token helper is invoked to store the dev root token. This option gives the user the ability to not store the token. Storing the token can be undesirable in certain circumstances (e.g. running local tests) as the user's existing vault token is clobbered without warning. Fixes #1861
I noticed something today while working with a local vault dev instance for testing, it seems that even though I am running the following command:
The CLI then writes the token to the
~/.vault-token
file overwriting my primary token that I use for my production vault setup.It seems to me that if the ENV var is present ~/.vault-token should not be read from or written to.
What do you think @jefferai
The text was updated successfully, but these errors were encountered: