Skip to content
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

make x-vault-token optional, allows using Vault Agent #184

Merged
merged 1 commit into from
Aug 16, 2019
Merged

make x-vault-token optional, allows using Vault Agent #184

merged 1 commit into from
Aug 16, 2019

Conversation

jetersen
Copy link
Contributor

fixes #183

Added a vault agent test container to validate the fix.

@jetersen
Copy link
Contributor Author

@steve-perkins @steve-perkins-bc anything I can help to speed this up? Do you need someone to help maintain the repo?

@jetersen
Copy link
Contributor Author

jetersen commented Aug 16, 2019

I wonder if it would help to rewrite the optionalHeader to be the default implementation.
Currently, if header is given a null value the java library will throw 400 Bad request.

@@ -249,7 +249,7 @@ public Seal seal() {
try {
final RestResponse restResponse = new Rest()//NOPMD
.url(vaultConfig.getAddress() + "/v1/sys/mounts")
.header("X-Vault-Token", vaultConfig.getToken())
.optionalHeader("X-Vault-Token", vaultConfig.getToken())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. It looks like another contributor added this optionalHeader(...) method back in February.

If I thought about it at the time, I would have gone back and done all of this other cleanup to use it consistently (it's cleaner, and should have been like that to begin with). Thanks for doing so.

@steve-perkins
Copy link
Contributor

Thanks, @Casz!

@steve-perkins steve-perkins merged commit 8584f63 into BetterCloud:master Aug 16, 2019
@jetersen jetersen deleted the fix/optionalVaultToken branch September 8, 2019 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X-Vault-Token should be optional
2 participants