Skip to main content

SSO to Databricks with Keycloak

Preview

This feature is in Public Preview.

This page shows how to configure Keycloak as the identity provider for single sign-on (SSO) in your Databricks account. Keycloak supports both OpenID Connect (OIDC) and SAML 2.0. Keycloak does not support SCIM to sync users and groups to Databricks.

Enable Keycloak single sign-on

Choose your identity protocol:

  1. As an account admin, log in to the account console and click Security.

  2. Click the Authentication tab.

  3. Next to Authentication, click Manage.

  4. Choose Single sign-on with my identity provider.

  5. Click Continue.

  6. Under Identity protocol, select OpenID Connect.

  7. On the Authentication tab, make note of the Databricks Redirect URL value.

  8. In a new browser tab, log in to your Keycloak admin console.

  9. Select the realm for Databricks integration or create a new one.

  10. Create a new client:

    1. Click Clients and click Create client.

    2. In Client type, select OpenID Connect.

    3. Enter a Client ID and Name.

    4. Click Next and Save.

      Keycloak create a new client.

  11. Configure the Databricks client:

    1. In Access Settings, set Home URL to your Databricks account URL.
    2. Set Valid redirect URIs to the Databricks Redirect URL you copied above.
    3. In Capability config, set Client authentication to On for confidential access.

    Keycloak configure access settings.

  12. Set up group membership mapping:

    1. Click Client scopes and select the dedicated scope for your client.
    2. In the Mappers tab, click Configure a new mapper.
    3. In Mapper type, select Group Membership.
    4. Set both Name and Token Claim Name to groups.
    5. Toggle Full group path to On or Off based on your preference.

    Keycloak configure group settings.

  13. Return to the Databricks account console Authentication tab and enter values you copied from Keycloak:

    1. Client ID: The Client ID from Keycloak.
    2. Client secret: Found in the Credentials tab of your Keycloak client.
    3. OpenID issuer URL: Your Keycloak URL with realm (For example, https://keycloak.example.com/realms/your-realm).
  14. Click Save.

  15. Click Test SSO to validate that your SSO configuration is working properly.

  16. Click Enable SSO to enable single sign-on for your account.

  17. Test account console login with SSO.

  1. Add users to Databricks

    You must add users to Databricks in order for them to log in. Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks account. SCIM streamlines onboarding a new employee or team by using your identity provider to create users and groups in Databricks and give them the proper level of access. See Sync users and groups from your identity provider using SCIM.