arrproxy: allow unverified email in oauth2-proxy (Authentik sets email_verified=false) #381
Reference in New Issue
Block a user
Delete Branch "benvin/arrproxy-oauth-emailverify"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Authentik hardcodes email_verified=false in the id_token it issues for the arrstack application. oauth2-proxy rejects such sessions by default ("email ... isnt verified"), so the /oauth2/callback returns a 500 and login fails.
Setting OAUTH2_PROXY_INSECURE_OIDC_ALLOW_UNVERIFIED_EMAIL=true tells oauth2-proxy to accept the id_token and complete the callback. This is safe: authorization is not derived from email verification here -- access is enforced downstream via the ak_groups claim (X-Forwarded-Groups), so accepting the unverified email only lets the OIDC session establish.
Restart mechanism: the arrproxy-oauth2 Deployment already carries configmap.reloader.stakater.com/auto=true and Reloader is deployed/running, so the ConfigMap change rolls the pods automatically after ArgoCD syncs.
Authentik hardcodes email_verified=false in the id_token, so oauth2-proxy rejects the session ("email ... isn't verified") and returns 500 on /oauth2/callback. Set OAUTH2_PROXY_INSECURE_OIDC_ALLOW_UNVERIFIED_EMAIL=true so the callback completes; authorization stays enforced downstream via ak_groups. The oauth2 Deployment already carries configmap.reloader.stakater.com/auto=true and Reloader is running, so the ConfigMap change rolls the pods automatically.