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

Handle redirects from vault server versions earlier than v0.6.2 #76

Merged

Conversation

drmdrew
Copy link

@drmdrew drmdrew commented Nov 18, 2016

Fix issue #75.

There are two golang HTTP related issues that are involved here, due to the way golang 1.7 http package reacts to HTTP redirects:

The first issue causes the X-Vault-Token header to be dropped when following redirects of HTTP GET requests. The second issue causes redirects on POST requests not to be followed at all.

It does look like golang 1.8 will address both these issues once it is released... so these fixes are just needed in the meantime.

TODO:

  • manual testing with vault HA-server configuration w/redirects
  • updated tests

PTAL: @hairyhenderson

@drmdrew drmdrew force-pushed the issue-75-vault-redirects branch 2 times, most recently from 4ce197a to 8bf28ec Compare November 18, 2016 19:29
@drmdrew drmdrew changed the title [WIP] Handle vault redirects Handle redirects from vault server versions earlier than v0.6.2 Nov 18, 2016
@hairyhenderson hairyhenderson self-assigned this Nov 19, 2016
@hairyhenderson
Copy link
Owner

@drmdrew can you run gofmt -s -w . on this? As well as make sure that golint ./... passes. Otherwise LGTM

@drmdrew
Copy link
Author

drmdrew commented Nov 19, 2016

Re-based to fixup gofmt and golint issues.

@hairyhenderson hairyhenderson merged commit c160666 into hairyhenderson:master Nov 19, 2016
@filiptodoric
Copy link

You guys are the best 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants