-
Notifications
You must be signed in to change notification settings - Fork 549
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 #98: Support Vault token helper. #136
Fix #98: Support Vault token helper. #136
Conversation
@paddycarver this fixes #98. I've tested it locally, but there wasn't a great spot to work it into the current acceptance tests. See also hashicorp/vault#4688, but we're having trouble with this currently so I figured I'd go ahead and put the fix in here. |
@paddycarver ping? |
@paddycarver ? @bflad maybe? |
@catsby @paddycarver @bflad @fatmcgav any chance of eyes on this? We're considering running our own fork at this point - token helper support is huge for us. |
@tyrannosaurus-becks if I rebase this, is there some chance it will get a review? |
e1f2959
to
e66b33d
Compare
@jgiles absolutely! Just working my way through the backlog oldest first. Apologies for the huge delay in getting to this. The provider was in transition from the Terraform team to the Vault team. I should be able to review this this week. |
That's great news @tyrannosaurus-becks ! The Vault team seems like an excellent home for this - we do our Vault configuration almost exclusively through Terraform, and we're excited to help improve the tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you for writing it.
Would it be possible to add the following?
- A test verifying that it will still pull a token from
~/.vault-token
- A test verifying that it will pull a token from a faux (or real) token helper
Those would not only help with this PR, but they would verify that there were no breaking changes going forward as the token helper's underlying code changes.
Will do, @tyrannosaurus-becks - hopefully in the next couple days. |
Rather than manually pulling a Vault token from ~/.vault-token, use Vault's DefaultTokenHelper. This will use the token helper configured at ~/.vault (or at VAULT_CONFIG_PATH), falling back to ~/.vault-token.
Resolve local modifications.
15f58ee
to
666b7d2
Compare
@tyrannosaurus-becks I've rebased and added test cases for all the ways the provider can get a Vault token. Unfortunately, the only way to test the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgiles this looks fantastic, thank you!
Thanks for reviewing + merging @tyrannosaurus-becks ! Do you know when you might cut the next release? |
Fix hashicorp#98: Support Vault token helper.
Rather than manually pulling a Vault token from ~/.vault-token, use
Vault's DefaultTokenHelper. This will use the token helper configured at
~/.vault (or at VAULT_CONFIG_PATH), falling back to ~/.vault-token.