Skip to content

Add an option to configure the HTTP proxy to use with the AWS auth method#13479

Open
remilapeyre wants to merge 2 commits intohashicorp:mainfrom
remilapeyre:aws-proxy
Open

Add an option to configure the HTTP proxy to use with the AWS auth method#13479
remilapeyre wants to merge 2 commits intohashicorp:mainfrom
remilapeyre:aws-proxy

Conversation

@remilapeyre
Copy link
Copy Markdown

We are using Vault Enterprise with multiple namespaces in an environment
where we have to use an HTTP proxy to access the AWS API. The
configuration for the AWS auth method currently makes it possible to
change the endpoints VAult will contact by setting endpoint, iam_endpoint
and sts_endpoint but there is currently no way to set an HTTPS proxy.

While we could set the HTTPS_PROXY environment variable on the server
this has the drawback on impacting all the HTTP requests made by Vault,
not just the ones made by this authentication method. This is an issue
because we would like to use a proxy only for this auth method and not
for the JWT one. We might also need to use another proxy for the Azure
auth method and to use different proxies for different namespaces.

This patch adds a new http_proxy parameter that can be used for this
purpose. If not set the previous behavior on looking at the HTTPS_PROXY
environment variable is kept so that it will continue to work for users
already depending on it, however the environment variable will be
overriden by this new parameter when it is set.

…thod

We are using Vault Enterprise with multiple namespaces in an environment
where we have to use an HTTP proxy to access the AWS API. The
configuration for the AWS auth method currently makes it possible to
change the endpoints VAult will contact by setting `endpoint`, `iam_endpoint`
and `sts_endpoint` but there is currently no way to set an HTTPS proxy.

While we could set the `HTTPS_PROXY` environment variable on the server
this has the drawback on impacting all the HTTP requests made by Vault,
not just the ones made by this authentication method. This is an issue
because we would like to use a proxy only for this auth method and not
for the JWT one. We might also need to use another proxy for the Azure
auth method and to use different proxies for different namespaces.

This patch adds a new `http_proxy` parameter that can be used for this
purpose. If not set the previous behavior on looking at the `HTTPS_PROXY`
environment variable is kept so that it will continue to work for users
already depending on it, however the environment variable will be
overriden by this new parameter when it is set.
@remilapeyre remilapeyre requested a review from a team December 20, 2021 18:56
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 20, 2021 18:56 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook December 31, 2021 18:56 Inactive
pull bot pushed a commit to benjivesterby/vault that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants