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

How to set OIDC env using vault sidecar #227

Open
himanshujaindev opened this issue Aug 6, 2024 · 2 comments
Open

How to set OIDC env using vault sidecar #227

himanshujaindev opened this issue Aug 6, 2024 · 2 comments

Comments

@himanshujaindev
Copy link

vault.hashicorp.com/agent-inject-secret-oauth2-secrets.sh: "secret/[DC]/oidc-client-secret"
vault.hashicorp.com/agent-inject-template-oauth2-secrets.sh: |
    {{- with secret "secret/[DC]/oidc-client-secret" -}}
    OAUTH2_PROXY_CLIENT_ID='name-oauth-client'
    OAUTH2_PROXY_CLIENT_SECRET={{ .Data.oidc_client_secret }}
    OAUTH2_PROXY_COOKIE_SECRET=dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64 | tr -d -- '\n' | tr -- '+/' '-_' ; echo
    {{- end -}}

How can we set the above in deployment.yaml ?

@pierluigilenoci - Would appreciate any help on this.

@pierluigilenoci
Copy link
Contributor

@himanshujaindev, could you help me understand exactly what you want to achieve?

I suggest having your sidecar inject a secret into the OAuth2 Proxy namespace.
Then use this: https://github.com/oauth2-proxy/manifests/blob/main/helm/oauth2-proxy/values.yaml#L246.

Does this answer your question?

@pierluigilenoci
Copy link
Contributor

@himanshujaindev, can this #230 solve your problem?

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

2 participants