Skip to content

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.

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