Skip to content

Normalize the address for VaultConfig for consistent pathing downstream.#132

Merged
steve-perkins merged 1 commit intoBetterCloud:masterfrom
BrianDeacon:master
Jun 4, 2019
Merged

Normalize the address for VaultConfig for consistent pathing downstream.#132
steve-perkins merged 1 commit intoBetterCloud:masterfrom
BrianDeacon:master

Conversation

@BrianDeacon
Copy link
Copy Markdown

This was a by-product of chasing down a bug having to do with tokens. I had configured my testing to point to "https://localhost:8200/" (with trailing slash). This was causing a POST request to "https://localhost:8200//v1/transit/keys/my-key" (note the extra slash) to receive a 302 to "https://localhost:8200/v1/transit/keys/my-key" (slash removed).

My problem went away just by changing my configuration to not contain the trailing slash, but the underlying cause is deep in the bowels of HttpUrlConnection, which isn't propagating the X-Vault-Token header when it redirects, and then getting an error message about missing token returned in a 400 from Vault.

@steve-perkins
Copy link
Copy Markdown
Contributor

Thanks, @BrianDeacon!

@steve-perkins steve-perkins merged commit 36c9465 into BetterCloud:master Jun 4, 2019
rimitchell pushed a commit to rimitchell/vault-java-driver that referenced this pull request Jul 22, 2019
Normalize the address for VaultConfig for consistent pathing downstream.
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.

2 participants