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

Ability to add request headers #582

Open
via-justa opened this issue Nov 20, 2023 · 0 comments
Open

Ability to add request headers #582

via-justa opened this issue Nov 20, 2023 · 0 comments

Comments

@via-justa
Copy link

Is your feature request related to a problem? Please describe.
We're using Cloudflare Access in front of Vault. We must pass the Cloudflare token via the cf-access-token header when accessing the vault.

When we log in to Vault directly via CLI, we use the following script.

export CF_TOKEN=$(cloudflared access login ${VAULT_ADDR} | grep -o -E ".{100,}")
export VAULT_TOKEN=$(vault login -header "cf-access-token=${CF_TOKEN}" -method=oidc $VAULT_ROLE -format=yaml | yq e ".auth.client_token" -)

Describe the solution you'd like
Ability to pass headers to the plugin when running in CLI, either by a flag or Environment variable.
Example expected usage

export VAULT_ADDR='https://vault.example.com'
export CF_TOKEN=$(cloudflared access login ${VAULT_ADDR} | grep -o -E ".{100,}")
export VAULT_TOKEN=$(vault login -header "cf-access-token=${CF_TOKEN}" -method=oidc $VAULT_ROLE -format=yaml | yq e ".auth.client_token" -)
helm template release --namespace ns my/chart | argocd-vault-plugin -H "cf-access-token=${CF_TOKEN}" generate -

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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

No branches or pull requests

1 participant