Open zhangshenghai opened 2 months ago
Hey @zhangshenghai! I'm here to help you with your question. I'm a bot designed to assist with bugs, questions, and contributions. Feel free to ask me anything while waiting for a human maintainer.
The error message indicates that the configuration is missing several required settings: cookie-secret
, client-id
, client-secret
, and email-domain
.
To address these issues, you can use environment variables to override the default values for these settings. The relevant environment variables are:
OAUTH2_PROXY_COOKIE_SECRET
OAUTH2_PROXY_CLIENT_ID
OAUTH2_PROXY_CLIENT_SECRET
OAUTH2_PROXY_EMAIL_DOMAINS
These variables can be set in the authproxy
service section of the docker-compose-dev.yml
file. Here is an example of how to set them:
authproxy:
image: quay.io/oauth2-proxy/oauth2-proxy:v7.4.0-amd64
network_mode: "host"
ports:
- 4180:4180
env_file:
- ./.env
environment:
OAUTH2_PROXY_PROVIDER: oidc
OAUTH2_PROXY_PROVIDER_DISPLAY_NAME: my provider
OAUTH2_PROXY_COOKIE_SECRET: your_cookie_secret
OAUTH2_PROXY_COOKIE_DOMAINS: localhost:4180
OAUTH2_PROXY_COOKIE_SECURE: 'false'
OAUTH2_PROXY_EMAIL_DOMAINS: your_email_domain
OAUTH2_PROXY_OIDC_ISSUER_URL: your_issuer_url
OAUTH2_PROXY_OIDC_JWKS_URL: your_jwks_url
OAUTH2_PROXY_CLIENT_ID: your_client_id
OAUTH2_PROXY_CLIENT_SECRET: your_client_secret
OAUTH2_PROXY_UPSTREAMS: http://localhost:4000
OAUTH2_PROXY_HTTP_ADDRESS: http://0.0.0.0:4180
OAUTH2_PROXY_REVERSE_PROXY: 'true'
OAUTH2_PROXY_SKIP_AUTH_ROUTES: ^/grafana.*
Make sure to replace your_cookie_secret
, your_email_domain
, your_issuer_url
, your_jwks_url
, your_client_id
, and your_client_secret
with your actual configuration values [1].
To continue talking to Dosu, mention @dosu.
[2024/08/19 08:01:45] [main.go:54] invalid configuration: missing setting: cookie-secret provider missing setting: client-id missing setting: client-secret or client-secret-file missing setting for email validation: email-domain or authenticated-emails-file required. use email-domain=* to authorize all email addresses