> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Keycloak SSO for Kubernetes

> Set up Keycloak SSO for OpenMetadata on Kubernetes by adding authorizer and authentication values to the Helm values.yaml for public or auth code flow.

# Keycloak SSO for Kubernetes

Check the Helm information [here](https://artifacthub.io/packages/search?repo=open-metadata).

Here is an example for reference, showing where to place the values in the `values.yaml` file after setting up your Keycloak account and obtaining the application credentials.

Check the more information about environment variable [here](https://docs.open-metadata.org/v2.1.x/deployment/security/configuration-parameters.md).

> [tab] implicit
>
> ```
> # Public Flow
>
> openmetadata:
>   config:
>     authorizer:
>       className: "org.openmetadata.service.security.DefaultAuthorizer"
>       containerRequestFilter: "org.openmetadata.service.security.JwtFilter"
>       initialAdmins:  # john.doe from john.doe@example.com
>       - "admin"
>       - "user1"
>       - "user2"
>       principalDomain: "open-metadata.org"  # Update with your Domain,The primary domain for the organization (example.com from john.doe@example.com).
>
>     authentication:
>       clientType: public
>       provider: "custom-oidc"
>       publicKeys:
>       - "{OMD-server-domain}/api/v1/system/config/jwks" # Update with your Domain and Make sure this "/api/v1/system/config/jwks" is always configured to enable JWT tokens
>       - "{Keycloak-server-URL}/realms/{your-realm-name}/protocol/openid-connect/certs"
>       authority: "{Keycloak-server-URL}/realms/{your-realm-name}/protocol/openid-connect/auth"
>       clientId: "{Client ID}"                                        # Update your Client ID
>       callbackUrl: "http://localhost:8585/callback"
> ```

> [tab] authcode
>
> ```
> # Auth Code Flow
>
> openmetadata:
>   config:
>     authorizer:
>       className: "org.openmetadata.service.security.DefaultAuthorizer"
>       containerRequestFilter: "org.openmetadata.service.security.JwtFilter"
>       initialAdmins:  # john.doe from john.doe@example.com
>       - "admin"
>       - "user1"
>       - "user2"
>       principalDomain: "open-metadata.org"  # Update with your Domain,The primary domain for the organization (example.com from john.doe@example.com).
>
>     authentication:
>       clientType: confidential
>       provider: "custom-oidc"
>       publicKeys:
>       - "{OMD-server-domain}/api/v1/system/config/jwks" # Update with your Domain and Make sure this "/api/v1/system/config/jwks" is always configured to enable JWT tokens
>       - "{Keycloak-server-URL}/realms/{your-realm-name}/protocol/openid-connect/certs"
>       authority: "{Keycloak-server-URL}/realms/{your-realm-name}/protocol/openid-connect/auth"
>       clientId: "{Client ID}"                                        # Update your Client ID
>       callbackUrl: "http://localhost:8585/callback"
>       oidcConfiguration:
>         enabled: true
>         oidcType: "Keycloak"
>         clientId:
>           secretRef: oidc-secrets
>           secretKey: openmetadata-oidc-client-id
>         clientSecret:
>           secretRef: oidc-secrets
>           secretKey: openmetadata-oidc-client-secret
>         discoveryUri:"{Keycloak-server-URL}/realms/{your-realm-name}/.well-known/openid-configuration"  # Keycloak's discovery URI Update your Keycloak's Domain and Realm
>         callbackUrl: http://localhost:8585/callback
>         serverUrl: http://localhost:8585
> ```

> [!TIP]
>
> Altering the order of claims in `jwtPrincipalClaims` may lead to problems when matching a user from a token with an existing user in the system. The mapping process relies on the specific order of claims, so changing it can result in inconsistencies or authentication failures, as the system cannot ensure correct user mapping with a new claim order.

## Configure Ingestion

Once your server security is set, it's time to review the ingestion configuration. Our bots support JWT tokens
to authenticate to the server when sending requests.

Find more information on [**Enabling JWT Tokens**](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [**JWT Troubleshooting**](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) to ensure seamless authentication.

> [card] [KeyCloak](https://docs.open-metadata.org/v2.1.x/deployment/security/keycloak.md)
>
> Go to KeyCloak Configuration


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.