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. |
tyrannosaurus-becks
left a comment
There was a problem hiding this comment.
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 |
tyrannosaurus-becks
left a comment
There was a problem hiding this comment.
@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.