Area: Deployment
Sub-Area: Authentication
Applies to: OSS + Cloud
Issue
Single Sign-On (SSO) with OIDC is not working. Users cannot log in, or the login redirect fails. Common causes are a wrong client ID, secret or discovery URI, a redirect URI that doesn't match what you registered with the identity provider (IdP), or a missing username claim in the IdP profile.
You Might Be Asking
- How do I configure OIDC for DataHub?
- Why am I getting redirect URI errors?
- What claim does DataHub use to identify users?
- Where do I look for the error?
Cause
- The client ID, client secret or discovery URI is wrong. In the standard flow, the client secret and discovery URI are required.
- The redirect URI registered with the IdP is not
https://<your-datahub-host>/callback/oidc. DataHub has no bare/callbackendpoint. The route is/callback/<protocol>. - The IdP profile does not contain the configured username claim. Login then fails. The frontend log shows
Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: '<claim>', Regex: '<regex>', Profile: .... If the claim exists but the regex doesn't match, the log showsFailed to extract DataHub username from username claim <value> using regex <regex>. - Pre-provisioning is on and the user does not exist yet. Login fails with
User with urn <urn> has not yet been provisioned in DataHub. Please contact your DataHub admin to provision an account. - Required groups are set and the user has none of them.
- The IdP returned an error. For
access_denied, DataHub shows a 401 page that starts withAccess denied., or redirects to the Access Denied Redirect URL if one is set. Other IdP errors show anInternal server error. The OIDC service responded with an errorpage.
DataHub identifies users by the configured username claim, not always by email or preferred_username. With nothing configured, the server default is email. The Cloud SSO form pre-fills preferred_username. Login fails only if the configured claim is missing from the IdP profile.
Solution
DataHub Cloud
You set up SSO in the UI. You can't set environment variables or edit server config.
- Go to Settings > Platform > SSO and choose OIDC. You need the Manage Platform Settings privilege.
- Fill in Client ID, Client Secret, Discovery URI, User Provisioning Strategy and Extract Groups, then click Connect.
- Register the redirect URI shown on the SSO page with your IdP. It has the form
https://<your-domain>.acryl.io/callback/oidc. Save the form while you are on the same hostname you use to reach DataHub. Saving on a different hostname changes the redirect URI and breaks login. The page warns you when the stored address and the current address differ. - Log out and log back in with SSO to test.
- The form pre-fills these defaults: User Name Claim
preferred_username, User Name Claim Regex(.*), Groups Claimgroups, Scopeopenid email profile, Client Authentication Methodclient_secret_basic. If login fails with a missing attribute error, change User Name Claim to a claim your IdP sends. To use only part of the value, set User Name Claim Regex. For example,([^@]+)drops the email domain. - Changing the username claim changes the user's DataHub username, and so the user URN. An existing account is reused only when the URN matches exactly.
- To see the frontend logs, or to change a setting that is not in the form (for example turning PKCE off), contact DataHub Support.
Self-hosted DataHub
You set OIDC with environment variables on the datahub-frontend container. They map to keys in datahub-frontend/conf/application.conf. Restart the frontend container after you change them. On Kubernetes, put the AUTH_OIDC_* variables under datahub-frontend.extraEnvs in your Helm values.yaml (Kubernetes setup).
AUTH_OIDC_ENABLED=true
AUTH_OIDC_CLIENT_ID=<client-id>
AUTH_OIDC_CLIENT_SECRET=<client-secret>
AUTH_OIDC_DISCOVERY_URI=<discovery-uri>
AUTH_OIDC_BASE_URL=https://<your-datahub-host>
AUTH_OIDC_USER_NAME_CLAIM=<claim>
AUTH_OIDC_USER_NAME_CLAIM_REGEX=<regex>
AUTH_OIDC_SCOPE=<scopes>
- Register this redirect URI with your IdP:
https://<your-datahub-host>/callback/oidc. For a local install it ishttp://localhost:9002/callback/oidc. See Set up your IdP for OIDC. - Discovery URIs:
- Microsoft Entra (Azure AD):
https://login.microsoftonline.com/<tenant-id>/v2.0/.well-known/openid-configuration - Okta:
https://<your-okta-domain>/.well-known/openid-configuration
- Microsoft Entra (Azure AD):
- The default scope is
openid profile email. The default token endpoint client authentication method isclient_secret_basic. To useclient_secret_post, setAUTH_OIDC_CLIENT_AUTHENTICATION_METHOD. - PKCE is on by default. You don't need to set it up. To turn it off, set
AUTH_OIDC_DISABLE_PKCE=true. - Debug: the SSO callback runs in
datahub-frontend. Read thedatahub-frontendcontainer logs, not the GMS logs. Check the discovery endpoint withcurl https://<your-idp-host>/.well-known/openid-configuration. See OIDC troubleshooting. - Turning on OIDC doesn't turn off native login at
/login. To turn it off, setAUTH_JAAS_ENABLED=false.
Provisioning and groups (Cloud and self-hosted)
- Just-in-Time (JIT) provisioning is the default. It creates a user on first SSO login. Self-hosted variable:
AUTH_OIDC_JIT_PROVISIONING_ENABLED(defaulttrue). - Pre-provisioning (
AUTH_OIDC_PRE_PROVISIONING_REQUIRED, defaultfalse) is the opposite of JIT. Only users that already exist in DataHub can log in. On Cloud, JIT and Pre-Provisioning are a radio choice in the form. - Extract Groups is off by default and works only with JIT on. Self-hosted variables:
AUTH_OIDC_EXTRACT_GROUPS_ENABLEDandAUTH_OIDC_GROUPS_CLAIM(defaultgroups). Setting the groups claim alone does nothing. When Extract Groups is on, each login creates missing groups and replaces the user's SSO group membership with the groups in the claim. This clears group membership assigned in the DataHub UI. You don't need Extract Groups for basic SSO login. - If Extract Groups is on and the claim is missing, the frontend logs
Failed to extract groups: No OIDC claim with name <claim> found. Make sure your IdP adds the groups claim to the ID token. If you use a custom authorization server and request agroupsscope, that scope must exist on it.