-
Notifications
You must be signed in to change notification settings - Fork 226
feat(helm-chart): add IdP via internal keycloak guide #7426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bkenez
wants to merge
11
commits into
main
Choose a base branch
from
idp-via-internal-keycloak
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+338
−10
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8462557
feat(8.9): add IdP via internal keycloak doc
bkenez e52210c
feat(8.8): add IdP via internal keycloak doc
bkenez 288fabc
fix(8.8, 8.9): improve style consistency in external IdP via internal…
bkenez 6ec590e
docs: move external IdP via internal Keycloak guide to end of section
bkenez d23401b
docs: specify Camunda realm for identity provider mappers
bkenez a470753
docs: add name field to username mapper
bkenez afe6bf5
docs: add explanations for identity provider mappers
bkenez d369b2a
docs: add tip about direct group authorization alternative
bkenez bfb9b98
docs: clarify hardcoded group mappers grant access to all external Id…
bkenez 799f7ee
docs: remove generic identity systems section, add link to Next steps
bkenez 01616bd
docs: simplify OC Identity config to use direct group authorization
bkenez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
154 changes: 154 additions & 0 deletions
154
...onfigure/authentication-and-authorization/external-idp-via-internal-keycloak.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| --- | ||
| id: external-idp-via-internal-keycloak | ||
| sidebar_label: External IdP via Internal Keycloak | ||
| title: Set up the Helm chart with an external IdP through the internal Keycloak | ||
| description: Learn how to configure an external identity provider to authenticate users while using the internal Keycloak as an identity broker. | ||
| --- | ||
|
|
||
| This guide shows you how to configure the internal Keycloak instance to act as an identity broker, delegating authentication to an external identity provider (IdP) such as a corporate OIDC provider, SAML, LDAP, or Active Directory. | ||
|
|
||
| This setup allows you to: | ||
|
|
||
| - Use your organization's existing identity provider for user authentication | ||
| - Retain the internal Keycloak for Camunda's OIDC integration | ||
| - Manage user authorization through Camunda's identity systems | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A Camunda 8 deployment with internal Keycloak enabled. See [Set up the Helm chart with the internal Keycloak instance](/self-managed/deployment/helm/configure/authentication-and-authorization/internal-keycloak.md). | ||
| - Access to your external IdP's configuration (client credentials, endpoints, etc.) | ||
|
|
||
| ## Configure the external identity provider | ||
|
|
||
| Complete the following steps to integrate your external IdP: | ||
|
|
||
| 1. [Add your external IdP to Keycloak](#add-your-external-idp-to-keycloak) | ||
| 1. [Configure identity provider mappers](#configure-identity-provider-mappers) | ||
| 1. [Configure Orchestration Cluster Identity](#configure-orchestration-cluster-identity) | ||
| 1. [Configure Management Identity access](#configure-management-identity-access-optional) (optional) | ||
|
|
||
| ### Add your external IdP to Keycloak | ||
|
|
||
| Configure Keycloak to use your external identity provider by following the [Configure an external IdP using Keycloak](/self-managed/components/management-identity/configuration/configure-external-identity-provider.md) guide. | ||
|
|
||
| ### Configure identity provider mappers | ||
bkenez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| After adding the identity provider, configure mappers in the **Camunda realm** (default: `camunda-platform`) to import user attributes and assign users to a group for authorization. | ||
|
|
||
| :::tip | ||
| For details on Keycloak identity provider mappers, see the [Keycloak documentation on identity broker mappers](https://www.keycloak.org/docs/latest/server_admin/index.html#_mappers). | ||
| ::: | ||
|
|
||
| #### Create attribute mappers | ||
|
|
||
| Attribute mappers import user profile information from the external IdP into Keycloak user accounts. | ||
|
|
||
| In Keycloak Admin Console, navigate to **Identity Providers** > select your IdP > **Mappers** tab. | ||
|
|
||
| Create attribute mappers to import user profile information: | ||
|
|
||
| | Name | Mapper Type | Claim | User Attribute | | ||
| | ----------- | ------------------ | ------------- | -------------- | | ||
| | `email` | Attribute Importer | `email` | `email` | | ||
| | `firstName` | Attribute Importer | `given_name` | `firstName` | | ||
| | `lastName` | Attribute Importer | `family_name` | `lastName` | | ||
|
|
||
| #### Create username mapper | ||
|
|
||
| The username mapper determines how Keycloak assigns usernames to federated users based on claims from the external IdP. | ||
|
|
||
| Create a username mapper: | ||
|
|
||
| - **Name**: `username` | ||
| - **Mapper Type**: Username Template Importer | ||
| - **Template**: `${CLAIM.preferred_username}` | ||
|
|
||
| #### Create group for external IdP users | ||
|
|
||
| Navigate to **Groups** > **Create group** and create a group: | ||
|
|
||
| - **Name**: `external-idp-users` | ||
|
|
||
| #### Assign users to the group | ||
|
|
||
| The hardcoded group mapper automatically assigns all users authenticating through this IdP to a specified group. This group membership is then included in the user's access token. | ||
|
|
||
| Create a mapper to assign federated users to this group: | ||
|
|
||
| - **Name**: `assign-external-idp-group` | ||
| - **Mapper Type**: Hardcoded Group | ||
| - **Group**: `external-idp-users` | ||
|
|
||
| ### Configure Orchestration Cluster Identity | ||
|
|
||
| External IdP users can now authenticate, but require authorization to access Camunda components. | ||
|
|
||
| Log in to **Orchestration Cluster Identity** as an administrator. | ||
|
|
||
| #### Grant component access | ||
|
|
||
| Grant access to Orchestration Cluster components for the external IdP users group: | ||
|
|
||
| 1. Navigate to **Authorizations** > select **Component** > **Create authorization**. | ||
| 1. Configure the authorization: | ||
| - **Owner type**: `Group` | ||
| - **Owner ID**: `external-idp-users` | ||
| - **Resource ID**: `*` | ||
| - **Permissions**: `ACCESS` | ||
|
|
||
| #### Grant additional permissions (optional) | ||
|
|
||
| Grant additional permissions as needed. For example, to allow users to view processes and complete tasks: | ||
|
|
||
| | Resource Type | Resource ID | Permissions | | ||
| | ------------------ | ----------- | -------------------------------------------------------------------- | | ||
| | Process Definition | `*` | `READ_PROCESS_DEFINITION`, `READ_PROCESS_INSTANCE`, `READ_USER_TASK` | | ||
| | Process Definition | `*` | `UPDATE_USER_TASK` | | ||
|
|
||
| :::info | ||
| For more details on authorizations, see [Orchestration Cluster authorization](/components/concepts/access-control/authorizations.md). | ||
| ::: | ||
|
|
||
| ### Configure Management Identity access (Optional) | ||
|
|
||
| For access to Console, Web Modeler, and Optimize, external IdP users need the corresponding realm roles assigned in Keycloak. The recommended approach is to assign users to groups that have these roles. | ||
|
|
||
| :::note | ||
| The hardcoded group mappers in this section grant access to **all users** authenticating through the external IdP. For more granular access control based on groups or attributes from your external IdP, see the [Keycloak documentation on identity provider mappers](https://www.keycloak.org/docs/latest/server_admin/index.html#_mappers). | ||
| ::: | ||
|
|
||
| #### Verify or create groups | ||
|
|
||
| 1. In Keycloak Admin Console, navigate to **Groups**. | ||
| 1. Verify that groups exist for each component (e.g., `Console`, `Optimize`, `Web Modeler`). If not, create them. | ||
|
|
||
| #### Assign roles to groups | ||
|
|
||
| Ensure each group has the corresponding realm role assigned: | ||
|
|
||
| 1. Select the group > **Role Mappings** tab. | ||
| 1. Click **Assign role** and add the role with the same name (e.g., `Console`). | ||
|
|
||
| #### Create group mappers | ||
|
|
||
| Create mappers to assign federated users to these groups: | ||
|
|
||
| 1. Navigate to **Identity Providers** > select your IdP > **Mappers** tab. | ||
| 1. Click **Add mapper** for each component: | ||
|
|
||
| | Mapper Name | Mapper Type | Group | | ||
| | ------------------------- | --------------- | ------------- | | ||
| | `assign-console-group` | Hardcoded Group | `Console` | | ||
| | `assign-optimize-group` | Hardcoded Group | `Optimize` | | ||
| | `assign-webmodeler-group` | Hardcoded Group | `Web Modeler` | | ||
bkenez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| :::tip | ||
| You can also assign roles directly to users in Keycloak, or use [mapping rules in Management Identity](/self-managed/components/management-identity/mapping-rules.md) to map token claims to roles. | ||
| ::: | ||
|
|
||
| ## Next steps | ||
|
|
||
| - To understand the differences between Orchestration Cluster Identity and Management Identity, see [Identity types in Camunda 8](/components/concepts/access-control/access-control-overview.md#identity-types-in-camunda-8). | ||
| - To learn more about mapping rules, see [Mapping rules](/components/concepts/access-control/mapping-rules.md). | ||
| - To configure additional authorizations, see [Orchestration Cluster authorization](/components/concepts/access-control/authorizations.md). | ||
| - To use an external IdP without the internal Keycloak, see [Set up the Helm chart with an external OIDC provider](/self-managed/deployment/helm/configure/authentication-and-authorization/external-oidc-provider.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 154 additions & 0 deletions
154
...onfigure/authentication-and-authorization/external-idp-via-internal-keycloak.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| --- | ||
| id: external-idp-via-internal-keycloak | ||
| sidebar_label: External IdP via Internal Keycloak | ||
| title: Set up the Helm chart with an external IdP through the internal Keycloak | ||
| description: Learn how to configure an external identity provider to authenticate users while using the internal Keycloak as an identity broker. | ||
| --- | ||
|
|
||
| This guide shows you how to configure the internal Keycloak instance to act as an identity broker, delegating authentication to an external identity provider (IdP) such as a corporate OIDC provider, SAML, LDAP, or Active Directory. | ||
|
|
||
| This setup allows you to: | ||
|
|
||
| - Use your organization's existing identity provider for user authentication | ||
| - Retain the internal Keycloak for Camunda's OIDC integration | ||
| - Manage user authorization through Camunda's identity systems | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A Camunda 8 deployment with internal Keycloak enabled. See [Set up the Helm chart with the internal Keycloak instance](/self-managed/deployment/helm/configure/authentication-and-authorization/internal-keycloak.md). | ||
| - Access to your external IdP's configuration (client credentials, endpoints, etc.) | ||
|
|
||
| ## Configure the external identity provider | ||
|
|
||
| Complete the following steps to integrate your external IdP: | ||
|
|
||
| 1. [Add your external IdP to Keycloak](#add-your-external-idp-to-keycloak) | ||
| 1. [Configure identity provider mappers](#configure-identity-provider-mappers) | ||
| 1. [Configure Orchestration Cluster Identity](#configure-orchestration-cluster-identity) | ||
| 1. [Configure Management Identity access](#configure-management-identity-access-optional) (optional) | ||
|
|
||
| ### Add your external IdP to Keycloak | ||
|
|
||
| Configure Keycloak to use your external identity provider by following the [Configure an external IdP using Keycloak](/self-managed/components/management-identity/configuration/configure-external-identity-provider.md) guide. | ||
|
|
||
| ### Configure identity provider mappers | ||
|
|
||
| After adding the identity provider, configure mappers in the **Camunda realm** (default: `camunda-platform`) to import user attributes and assign users to a group for authorization. | ||
|
|
||
| :::tip | ||
| For details on Keycloak identity provider mappers, see the [Keycloak documentation on identity broker mappers](https://www.keycloak.org/docs/latest/server_admin/index.html#_mappers). | ||
| ::: | ||
|
|
||
| #### Create attribute mappers | ||
|
|
||
| Attribute mappers import user profile information from the external IdP into Keycloak user accounts. | ||
|
|
||
| In Keycloak Admin Console, navigate to **Identity Providers** > select your IdP > **Mappers** tab. | ||
|
|
||
| Create attribute mappers to import user profile information: | ||
|
|
||
| | Name | Mapper Type | Claim | User Attribute | | ||
| | ----------- | ------------------ | ------------- | -------------- | | ||
| | `email` | Attribute Importer | `email` | `email` | | ||
| | `firstName` | Attribute Importer | `given_name` | `firstName` | | ||
| | `lastName` | Attribute Importer | `family_name` | `lastName` | | ||
|
|
||
| #### Create username mapper | ||
|
|
||
| The username mapper determines how Keycloak assigns usernames to federated users based on claims from the external IdP. | ||
|
|
||
| Create a username mapper: | ||
|
|
||
| - **Name**: `username` | ||
| - **Mapper Type**: Username Template Importer | ||
| - **Template**: `${CLAIM.preferred_username}` | ||
|
|
||
| #### Create group for external IdP users | ||
|
|
||
| Navigate to **Groups** > **Create group** and create a group: | ||
|
|
||
| - **Name**: `external-idp-users` | ||
|
|
||
| #### Assign users to the group | ||
|
|
||
| The hardcoded group mapper automatically assigns all users authenticating through this IdP to a specified group. This group membership is then included in the user's access token. | ||
|
|
||
| Create a mapper to assign federated users to this group: | ||
|
|
||
| - **Name**: `assign-external-idp-group` | ||
| - **Mapper Type**: Hardcoded Group | ||
| - **Group**: `external-idp-users` | ||
|
|
||
| ### Configure Orchestration Cluster Identity | ||
|
|
||
| External IdP users can now authenticate, but require authorization to access Camunda components. | ||
|
|
||
| Log in to **Orchestration Cluster Identity** as an administrator. | ||
|
|
||
| #### Grant component access | ||
|
|
||
| Grant access to Orchestration Cluster components for the external IdP users group: | ||
|
|
||
| 1. Navigate to **Authorizations** > select **Component** > **Create authorization**. | ||
| 1. Configure the authorization: | ||
| - **Owner type**: `Group` | ||
| - **Owner ID**: `external-idp-users` | ||
| - **Resource ID**: `*` | ||
| - **Permissions**: `ACCESS` | ||
|
|
||
| #### Grant additional permissions (optional) | ||
|
|
||
| Grant additional permissions as needed. For example, to allow users to view processes and complete tasks: | ||
|
|
||
| | Resource Type | Resource ID | Permissions | | ||
| | ------------------ | ----------- | -------------------------------------------------------------------- | | ||
| | Process Definition | `*` | `READ_PROCESS_DEFINITION`, `READ_PROCESS_INSTANCE`, `READ_USER_TASK` | | ||
| | Process Definition | `*` | `UPDATE_USER_TASK` | | ||
|
|
||
| :::info | ||
| For more details on authorizations, see [Orchestration Cluster authorization](/components/concepts/access-control/authorizations.md). | ||
| ::: | ||
|
|
||
| ### Configure Management Identity access (Optional) | ||
|
|
||
| For access to Console, Web Modeler, and Optimize, external IdP users need the corresponding realm roles assigned in Keycloak. The recommended approach is to assign users to groups that have these roles. | ||
|
|
||
| :::note | ||
| The hardcoded group mappers in this section grant access to **all users** authenticating through the external IdP. For more granular access control based on groups or attributes from your external IdP, see the [Keycloak documentation on identity provider mappers](https://www.keycloak.org/docs/latest/server_admin/index.html#_mappers). | ||
| ::: | ||
|
|
||
| #### Verify or create groups | ||
|
|
||
| 1. In Keycloak Admin Console, navigate to **Groups**. | ||
| 1. Verify that groups exist for each component (e.g., `Console`, `Optimize`, `Web Modeler`). If not, create them. | ||
|
|
||
| #### Assign roles to groups | ||
|
|
||
| Ensure each group has the corresponding realm role assigned: | ||
|
|
||
| 1. Select the group > **Role Mappings** tab. | ||
| 1. Click **Assign role** and add the role with the same name (e.g., `Console`). | ||
|
|
||
| #### Create group mappers | ||
|
|
||
| Create mappers to assign federated users to these groups: | ||
|
|
||
| 1. Navigate to **Identity Providers** > select your IdP > **Mappers** tab. | ||
| 1. Click **Add mapper** for each component: | ||
|
|
||
| | Mapper Name | Mapper Type | Group | | ||
| | ------------------------- | --------------- | ------------- | | ||
| | `assign-console-group` | Hardcoded Group | `Console` | | ||
| | `assign-optimize-group` | Hardcoded Group | `Optimize` | | ||
| | `assign-webmodeler-group` | Hardcoded Group | `Web Modeler` | | ||
|
|
||
| :::tip | ||
| You can also assign roles directly to users in Keycloak, or use [mapping rules in Management Identity](/self-managed/components/management-identity/mapping-rules.md) to map token claims to roles. | ||
| ::: | ||
|
|
||
| ## Next steps | ||
|
|
||
| - To understand the differences between Orchestration Cluster Identity and Management Identity, see [Identity types in Camunda 8](/components/concepts/access-control/access-control-overview.md#identity-types-in-camunda-8). | ||
| - To learn more about mapping rules, see [Mapping rules](/components/concepts/access-control/mapping-rules.md). | ||
| - To configure additional authorizations, see [Orchestration Cluster authorization](/components/concepts/access-control/authorizations.md). | ||
| - To use an external IdP without the internal Keycloak, see [Set up the Helm chart with an external OIDC provider](/self-managed/deployment/helm/configure/authentication-and-authorization/external-oidc-provider.md). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can give it as a follow-up to the docs team to move the linked guide into a central/reference location (as it's not specific to Management Identity anymore).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this ended up being more generalised 🤔
@giorgionaps consideration for docs team followup