-
Notifications
You must be signed in to change notification settings - Fork 781
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_agent_token_file should not disable renew_token #1189
Comments
Per my understanding, Vault Agent now assumes the responsibility to renew the token and then it will write that token out to the specific file. That said, it can still be configured to where Vault Agent runs, gets a token, and then exists. In that circumstance, you would write out to a regular vault token file and have |
When I read the code at https://github.com/hashicorp/consul-template/blob/master/config/vault.go#L261 I understand it as if vault_agent_token_file is specified renew_token is forced to false. I think that line could just be removed and the user is expected to set each config value appropriately. |
In my case with 0.20.0 is not reading from $HOME/.vault-token anymore (0.19.5 was) so unless the token is exposed as an environment variable there is no way to get consul-template to renew the token this is very bad in my usecase since i was using it with 0.19.5 , which reads the vault token from the home directory, and using https://github.com/sethvargo/vault-kubernetes-authenticator for grabbing the initial token from vault I undertand the use case when using vault agent mode, but breaking other use cases is not great. Could we restore the use of the renew-token flag when the vault_agent_token_file and only default to FALSE rather than enforce it ? |
Hey @atheiman, I'm new at Hashi and am just taking over as maintainer for this project. As such this looks like it might be a some low hanging fruit to get into my first release. But I'd like to be sure I understand the desire here... would you say you agree with @primeroz's summary of what is desired?
Or, if not, could you give a simple statement as to what you would desire the functionality to be? Thanks. |
I agree with that short summary, tho I think to follow the previous
functionality it would default to true. But Im fine with defaulting either
way as long as its not enforced to false.
|
Great. Thanks! |
I'm trying to use consul-template as a sidecar with BanzaiCloud bankVaults and indeed, 0.20.0 broke everything. |
Can we have an update please? |
I'm looking at this now related to #1228 and can follow my comments there. TLDR; I'm probably going to make it so renew_token=true works with vault_agent_token_file and add back ~/.vault-token as a backward compatibility thing. |
Recently in #1182
vault_agent_token_file
config was added. This is great and a feature we have been excited for!However, I don't understand why specifying reading the vault token from a file other than
~/.vault-token
changes whether consul-template renews the vault token.From the readme, there is a config option for
renew_token
, can that be honored in combination withvault_agent_token_file
?The text was updated successfully, but these errors were encountered: