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

Include X-Vault-Request header on all requests #229

Conversation

ianferguson
Copy link

Vault Agent (can) require consumers to include an X-Vault-Request header to guard against some SSRF attacks for users of the Vault Agent, particularly in auto-auth mode: https://www.vaultproject.io/api#the-x-vault-request-header

The hashicorp/vault Golang client adds this header to every outgoing request already: https://github.com/hashicorp/vault/pull/7627/files, this PR adds the same functionality to vault-java-driver

@marc-szalkiewicz-dd
Copy link

@steve-perkins Any chance you would have time to review this brief PR?

@steve-perkins
Copy link
Contributor

@marc-szalkiewicz-dd Sorry. I left BetterCloud late last year, and no longer have access to do anything with this repo. My new employer uses Vault only via the Agent Injector in Kubernetes sidecars, so I haven't used the Java driver or been in the codebase in quite some time.

There was a was a transition plan before I left, but that was pre-COVID. I don't know what the current situation is, and am not in ongoing contact.

@ianferguson
Copy link
Author

For anyone needing this PR: I've forked this library and released a v6.0.0 version that is the same as the final BetterCloud/vault-java-driver 5.1.0, as well as a v6.1.0 version that includes the contents of this pull request:

evan-ku added a commit to evan-ku/vault-java-driver that referenced this pull request Mar 16, 2021
evan-ku added a commit to evan-ku/vault-java-driver that referenced this pull request Mar 16, 2021
…ort requests setnt to Vault Agent

Only needed if require_request_header = true is added in the vault-agent-config.hcl file.
Reference:
- https://www.vaultproject.io/api#the-x-vault-request-header
- https://www.vaultproject.io/docs/agent#listener-stanza
- BetterCloud#229
- ianferguson#3
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.

None yet

3 participants