# Adding Keycloak identity provider via OpenID Connect

**URL:** <https://community.easymorph.com/t/adding-keycloak-identity-provider-via-openid-connect/6817>\
**Category:** Articles\
**Created:** [October 13, 2026, 2:55am UTC](https://community.easymorph.com/t/adding-keycloak-identity-provider-via-openid-connect/6817 "2026-10-13T02:55:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleksii.bespalov](https://community.easymorph.com/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@oleksii.bespalov](https://community.easymorph.com/u/oleksii.bespalov)\
**Post date:** [October 13, 2026, 2:55am UTC](https://community.easymorph.com/t/adding-keycloak-identity-provider-via-openid-connect/6817/1 "2026-10-13T02:55:46Z")

</div>

# Adding Keycloak identity provider via OpenID Connect

This article shows how to let users sign in to EasyMorph Hub with their Keycloak accounts, using an OpenID identity provider. This feature is available starting from version `6.1.0`.

## Prerequisites

You will need:

- administrator access to EasyMorph Hub;
- administrator access to the Keycloak realm your users belong to.

The examples below assume the following addresses:

| Service | Example address |
| --- | --- |
| EasyMorph Hub | `http://localhost:6330` |
| Keycloak | `http://localhost:8080` |

## Adding an OpenID identity provider

1. Sign in to the EasyMorph Hub as an administrator and go to **Hub administration**.  

2. Go to **Settings** → **Identity providers** and click **Add new**. In the **Add external IDP** dialog, enter a unique **Name** (for example `Keycloak OpenID`), select **OpenID** as the **Type** , and click **Add**.  

3. In the **Return URL** section, check the address that users open EasyMorph Hub with:

## Creating a client in Keycloak

1. Sign in to the Keycloak administration console. Select your realm in the realm list, go to **Clients** , and click **Create client**.  

2. On the **General settings** page:

3. On the **Capability config** page:

4. On the **Login settings** page, paste the **Full return URL** from EasyMorph Hub into **Valid redirect URIs**. Click **Save**.  

5. _(Optional, for back-channel logout)_ Keycloak creates the client and opens its **Settings** tab. Skip this step if EasyMorph Hub doesn't need to sign users out when they sign out in Keycloak. Otherwise, in the **Logout settings** section:

6. Open the **Credentials** tab of the client and copy the **Client Secret**.  

## Finishing the setup in EasyMorph Hub

1. Go back to the identity provider page in EasyMorph Hub and fill in the **Authentication via OpenID** section:

2. _(Optional)_ Click **Test** - this verifies that Open ID configuration is available from the given **Authority Url**.  

3. Turn the provider toggle to **Enabled**. The change applies at once, and the status bar shows **Identity provider is active**.  

Users can now select the new provider on the EasyMorph Hub sign-in page and sign in with their Keycloak accounts.

## _(Optional)_ Using Keycloak realm roles as groups

With **Support external groups** set to **Keycloak roles** , EM treats the user's Keycloak realm roles as groups. You can then give access to a whole role instead of single users.

EasyMorph Hub reads the roles from the `realm_access` claim of the access token. Keycloak adds this claim through the `roles` client scope, which is present for new clients by default. You can check it under **Client scopes** tab:

 ![The roles client scope](https://community.easymorph.com/uploads/default/original/2X/b/b9ab8ced75db38b5391a3a610e43238ab8b9742b.png)

To give a role access to a space in EasyMorph Hub:

1. Go to **Spaces** , open the space, and go to the **Users & Permissions** tab.
2. Click **Add new user/group** , select **External user group** , select the Keycloak identity provider, enter the **Keycloak realm role** name (for example `easymorph-users`), and click **Create**.  
 ![Adding a Keycloak role to a space](https://community.easymorph.com/uploads/default/original/2X/f/fe8126b1357e8d6e3027086120ca1e2f0067d935.png)
3. Assign roles to the new group in the **Access control list** , the same way as for users.

**Note:** roles are matched by name, not by ID. Enter the realm role name exactly as it is in Keycloak. Renaming a role will break existing bindings to EasyMorph Hub groups.
