Identity provider setup
Register a confidential OAuth/OpenID Connect (OIDC) web application with a single redirect URI, https://<gateway>/oauth/callback, and assign it to the users or groups who should have gateway access.
Any OIDC-compliant IdP works: Okta, Microsoft Entra ID, Google Workspace, Keycloak, Dex, PingFederate, and others. The IdP must meet three requirements:
- Serves
/.well-known/openid-configuration, over HTTPS in production; the gateway accepts anhttp://issuer, and a loopback issuer additionally requiresCLAUDE_GATEWAY_ALLOW_LOOPBACK=1 - Supports the authorization-code flow. PKCE (Proof Key for Code Exchange) is on by default; disable it with
oidc.use_pkce: falsefor IdPs that don't support it - Returns
emailand optionallygroupsin the id_token, or serves them from the userinfo endpoint withoidc.userinfo_fallback: true
For private PKI, set oidc.ca_cert_pem.
A few providers handle email and group claims differently:
- Okta: the org authorization server at
https://example.okta.comreturns a thin id_token that omitsemailandgroups, so setoidc.userinfo_fallback: truewhenever you use it asissuer. A custom authorization server such ashttps://example.okta.com/oauth2/defaultthat includesemailand optionallygroupsin the id_token emits them directly and needs no fallback. Okta emitsgroupsonly when thegroupsscope is requested inoidc.scopesand the app's groups claim filter allows it;userinfo_fallbackcan't fill a claim the IdP wasn't asked for.