Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getbifrost.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This guide walks you through configuring Keycloak as your identity provider for Bifrost Enterprise. Keycloak uses standard OIDC with JWKS-based JWT validation, and Bifrost uses the same client for both user login and Admin REST API access (via the Service Account of a confidential client). After completing this guide, users will sign in with their Keycloak credentials and admins can bulk-import users and groups via the Keycloak Admin REST API.

Prerequisites

  • A running Keycloak server (self-hosted or cloud) with admin access to a realm
  • Bifrost Enterprise deployed and accessible
  • The redirect URI for your Bifrost instance (e.g. https://your-bifrost-domain.com/login)
  • Bifrost roles created for the roles you plan to map

Step 1: Create a Client

  1. In the Keycloak Admin Console, select your realm and go to Clients → Create client.
Creating a client in Keycloak
  1. Configure the client:
FieldValue
Client typeOpenID Connect
Client IDbifrost (or your preferred identifier)
NameBifrost Enterprise
  1. On the Capability config step enable:
    • Client authentication (makes it a confidential client)
    • Standard flow (Authorization Code)
    • Service accounts roles (required for Admin REST API access)
Keycloak client capability configuration
  1. On the Login settings step set:
FieldValue
Valid redirect URIshttps://your-bifrost-domain.com/login
Valid post logout redirect URIshttps://your-bifrost-domain.com
Web originshttps://your-bifrost-domain.com
  1. Save the client.

Step 2: Copy the client credentials

  1. Open the client and go to the Credentials tab.
  2. Copy the Client Secret.
Keycloak client credentials tab

Step 3: Configure role and group mappers

Keycloak does not include realm roles or full group paths in tokens by default. Add two mappers on the client’s dedicated scope.
  1. Open the client → Client Scopes tab → click the client’s -dedicated scope.
  2. Click Add mapper → By configuration.

Group Membership mapper

Group Membership mapper configuration
FieldValue
Mapper TypeGroup Membership
Namegroups
Token Claim Namegroups
Full group pathOn
Add to ID tokenOn
Add to access tokenOn
Add to userinfoOn
Bifrost uses full group paths for consistent matching across SSO and bulk provisioning flows - keep Full group path enabled.

Realm Roles mapper

FieldValue
Mapper TypeUser Realm Role
Namerealm_roles
Token Claim Namerealm_access.roles
Claim JSON TypeString
MultivaluedOn
Add to ID tokenOn
Add to access tokenOn

Step 4: Assign Admin REST API permissions

The same client runs both authentication and provisioning. Grant it read access to the realm so it can list users and groups.
  1. Open the client → Service accounts roles tab.
  2. Click Assign role and select:
    • realm-managementview-users (required)
    • realm-managementview-realm (recommended, enables group and role listing)
    • realm-managementquery-groups (optional, for group filters)
Keycloak service account roles

Step 5: Create realm roles and groups

Create the roles and groups you plan to map into Bifrost.
  1. Realm → Realm roles → Create role for each role (e.g. bifrost-admin, bifrost-developer, bifrost-viewer).
  2. Realm → Groups → Create group for each team you want to sync (e.g. /platform, /data-science).
  3. Assign users to the appropriate roles and groups under Users → your user → Role mapping / Groups.

Step 6: Configure Bifrost

Using the Bifrost dashboard

  1. In Bifrost, go to Governance → User Provisioning.
  2. Select Keycloak as the SCIM Provider.
  3. Fill in the fields:
FieldValue
Server URLhttps://keycloak.company.com (no /realms/... suffix)
RealmYour realm name (e.g. master, bifrost-prod)
Client IDClient ID from Step 1
Client SecretClient Secret from Step 2
AudienceOptional - defaults to Client ID
Team IDs FieldLeave as groups (default) or change if you used a different mapper name
  1. Click Verify - Bifrost connects to Keycloak’s JWKS and Admin REST API to confirm the client and service-account roles.
  2. Configure Attribute → Role / Team / Business Unit mappings if needed.
  3. Toggle Enabled and click Save Configuration.
Bifrost Keycloak configuration form

Using config.json

{
  "scim_config": {
    "enabled": true,
    "provider": "keycloak",
    "config": {
      "serverUrl": "https://keycloak.company.com",
      "realm": "bifrost-prod",
      "clientId": "bifrost",
      "clientSecret": "${KEYCLOAK_CLIENT_SECRET}",
      "teamIdsField": "groups"
    }
  }
}

Configuration reference

FieldRequiredDescription
serverUrlYesBase URL of the Keycloak server. Must be a valid URL (e.g. https://keycloak.company.com) and must not include /realms/....
realmYesRealm name.
clientIdYesClient ID created in Step 1.
clientSecretYesClient secret - required because the client is confidential.
audienceNoExpected JWT audience. Defaults to clientId.
teamIdsFieldNoJWT claim for group IDs. Defaults to groups.
attributeRoleMappingsNoOrdered list of attribute→role mappings.
attributeTeamMappingsNoAttribute→team mappings (all matches apply).
attributeBusinessUnitMappingsNoAttribute→business-unit mappings (all matches apply).

Testing the Integration

  1. Open the Bifrost dashboard in an incognito window.
  2. You’ll be redirected to Keycloak’s login page.
  3. Sign in with a Keycloak user that has one of the roles you mapped.
  4. Verify the user appears under Governance → Users with the expected role and teams.
  5. From Governance → User Provisioning → Import Users, verify the service account can list users.

Troubleshooting

serverUrl must not include /realms/{realm}

The serverUrl field is the base Keycloak URL. Set the realm in the separate Realm field. Example: https://keycloak.company.com + realm bifrost-prod - not https://keycloak.company.com/realms/bifrost-prod.

Users redirected back to login

  • Confirm the client’s Valid redirect URIs exactly match your Bifrost login URL (trailing slash matters).
  • Verify the client is Enabled in Keycloak.

Roles not appearing in the token

  • Check that the User Realm Role mapper adds to both ID and Access tokens.
  • Use Evaluate on the client scope to preview the token a user would receive.

Service account cannot list users

  • Confirm realm-management → view-users is assigned under Service accounts roles.
  • If you enabled Authorization on the client, service account tokens may not work - disable Authorization (fine-grained authz) for this client.

jwks keys not found

  • Make sure the server URL is reachable from Bifrost. The JWKS endpoint is {serverUrl}/realms/{realm}/protocol/openid-connect/certs.

Next Steps