-
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
fix: by default, if a token is found in Vaults ~/.vault-token, use thi… #1228
fix: by default, if a token is found in Vaults ~/.vault-token, use thi… #1228
Conversation
…s and renew when necessary
Thanks for the PR @jurgenweber, This does look like a pretty bad regression. My guess is that it was missed before due to the comments being on the merged PR instead of in a new issue. I know I missed it completely due to that as I only reviewed open issues and PRs when picking up the project. I'm sort of confused by a something thouh... Why does setting |
To put this another way... why isn't the fix for this to just remove this line... consul-template/config/vault.go Line 261 in cb2ee2f
Maybe with something to expand $HOME in vault_agent_token_file if that seems useful? |
Spoke with @kyhavlov about this and he agrees that the renew field should still be respected even though the vault_agent_token_file is set. That we should remove that above line. He also thought it might be a good idea to just still accept ~/.vault-token as implemented here to keep backwards compatibility for now. That it would remain undocumented and only remain for compatibility. |
Reviewing issues and came across #1189 which this will directly fix. |
Oh.. and I think I like the idea presented there of making renew_token=false the default if vault_agent_token_file is set to help maintain compatibility for those who are already using it. |
Yeah, removing that line makes sense.. It should be honoured. I updated it. |
Thanks @jurgenweber ... but thinking about it there are probably a couple more things needed. First is that I do think we should make an allowance for people who picked this up since the changed behavior and make renew_token default to false if vault_agent_token_file is set. Maybe something like what you have plus changing.. consul-template/config/vault.go Lines 211 to 215 in cb2ee2f
to..
Or something to that end (please feel free to come up with something better). Second, the documentation in the README.md for the I can do any/all of this, but thought you might be interested. Thanks! |
ok, added. I did not remove that comment but just explained further.. Maybe that makes more sense? |
Thanks. Looks good and I like your change to the comment. I think I'll add a test, but I'll commit that later. |
Awesome! |
At this point I have one more issue I'd like to fix before putting out a release. So soon-ish.. depending on how tough that issue is. |
…s and renew when necessary...
as per the outrage outlined here which seems to have been ignored;
#1182