Signing up with Keycloak
This page creates your XplicitTrust tenant with a Keycloak realm as the identity provider.
In short
Create an OpenID Connect client in your realm, give it the roles admin and user, add a groups and a roles mapper, create the groups XplicitTrust Administrators and XplicitTrust Users, and sign up with the client ID, client secret and issuer URL.
Overview
XplicitTrust signs users in through a Keycloak client. The role of a user comes from the roles claim of the ID token, the group memberships from the groups claim. XplicitTrust also reads users and groups through the Keycloak service account of the client, for the group import.
Prerequisites
- A Keycloak instance.
- Administrator access to the relevant Realm.
Configure Keycloak
Step 1: Create and configure the client
Create a new Client under the Realm you want to use. Follow the configuration tabs below:
- Set Client type to
OpenID Connect. - Choose a
ClientID(e.g.,XplicitTrust) and aName. -
Important: Note down the Client ID for later.

- Enable
Client authentication. - Under Authentication flow, select:
Standard flowService account rolesOAuth 2.0 Device Authorization Grant
- As PKCE Method, select
S256. -
Click Save.

All three authentication flows are required
Without OAuth 2.0 Device Authorization Grant, the sign-up does not finish and stays at Waiting for Keycloak to complete authentication.
- Locate the Valid Redirect URIs field.
-
Copy and paste the following URL:
https://api.xplicittrust.com:443/v1.0/auth/callback/oidc
Step 2: Credentials and roles
- Navigate to the Credentials tab and copy the
Client Secret. You will need it for the sign-up. -
Navigate to the Roles tab and create two new roles:
admin(grants administrative access to the XplicitTrust Admin Console)user(allows users to sign in at the XplicitTrust Agent)

-
Navigate to Service Account Roles. This tab only appears after
Client authenticationandService account roleshave been enabled and saved in Step 1.- Click Assign Role.
- Filter by client
realm-management. - Assign the following roles:
query-groups,view-users.

Step 3: Configure scopes and mappers
Navigate to Client Scopes and click on the XplicitTrust-dedicated scope (usually named <Client-ID>-dedicated).
Empty mapper list
As long as the dedicated scope has no mappers, Keycloak shows the buttons Configure a new mapper and Add predefined mapper instead of the Add mapper menu.
- Click Add mapper → By configuration (on an empty list: Configure a new mapper).
- Select Group Membership.
-
Configure:
- Name:
groups - Token Claim Name:
groups

- Name:
- Click Add mapper → From predefined mappers (on an empty list: Add predefined mapper).
- Select client roles and click Add.
-
Open the new mapper
client rolesand edit it:- Client ID: select the client you created in Step 1 (e.g.,
XplicitTrust). - Token Claim Name:
roles. The field is prefilled withresource_access.${client_id}.roles. Replace this value. - Enable Add to ID token.
- Enable Add to lightweight access token.

- Client ID: select the client you created in Step 1 (e.g.,
- Switch to the Scope tab.
- Disable Full scope allowed. The switch takes effect immediately, there is no Save button.
-
Assign the following roles from
realm-management:query-groupsview-users

Step 4: Groups
- Navigate to the main Groups page in the sidebar.
- Create two groups:
XplicitTrust AdministratorsandXplicitTrust Users. - Edit each group and assign the Client Roles you created earlier (
adminoruser) to the corresponding group:- Open the group, switch to the Role mapping tab and click Assign role → Client roles.
- The dialog only lists the first 20 roles of all clients. Use the search field (e.g.,
admin) or the paging controls to find the roles of your client, and check the Client ID column.
- Add your actual users to these groups now.
Users need an email address with the domain of the tenant
XplicitTrust uses the domain of a user's email address (the part after the @) to detect which Identity Provider the authentication has to be redirected to. Make sure that every user in Keycloak has an Email address set, and that all users of a tenant use the same email domain.
Roles and admins
Roles are client roles of the client you created, sent in the roles claim of the ID token:
| Keycloak group | Client role | XplicitTrust role |
|---|---|---|
XplicitTrust Administrators |
admin |
Admin: may sign in to the Admin Console |
XplicitTrust Users |
user |
User: may sign in with the Agent |
To make someone an admin, add the user to the group XplicitTrust Administrators. See Roles and groups by IdP.
Groups
Supported. The Group Membership mapper sends the groups in the groups claim. The service account roles query-groups and view-users let XplicitTrust import your Keycloak groups and use them in policies, next to the groups you create in XplicitTrust.
Sign up in XplicitTrust
Gather the information
| Field | Where to find it |
|---|---|
| Client ID | Step 1 |
| Client Secret | Credentials tab of the client, Step 2 |
| Issuer URL | Realm Settings → General: click the link OpenID Endpoint Configuration and copy the value inside "issuer": "...". It has the form https://<keycloak-host>/realms/<realm>. |
Connect XplicitTrust
- Visit the signup page: https://console.xplicittrust.com/#/signup/keycloak
-
Enter the three values.
-
Click Signup and follow the OpenID Connect login process.
Verify
You are signed in to the XplicitTrust Admin Console at https://console.xplicittrust.com/.
You can also check the token in Keycloak, before or after the sign-up:
- Open your client and navigate to Client Scopes → Evaluate.
- Select one of your administrators in the Users field.
- Click Generated ID token.
-
Check that the token contains the user's
email, thegroupsclaim and therolesclaim:"groups": [ "/XplicitTrust Administrators" ], "roles": [ "admin" ], "email": "admin@example.com"
Next steps
Verify your domain and review the sign-in settings: see Authentication and the After sign-up checklist.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The sign-up stays at Waiting for Keycloak to complete authentication | OAuth 2.0 Device Authorization Grant is not enabled for the client |
Enable it under Settings → Capability config (Step 1) |
| After the Keycloak login: Oops, That Didn't Work with an Error ID | The ID token does not contain the roles claim |
Add the Role Mapper (Step 3) and check the token (Verify) |
The roles claim also contains roles such as manage-account |
No Client ID is selected in the Role Mapper, or Full scope allowed is still enabled | Select your client in the Role Mapper and disable Full scope allowed (Step 3) |
| The Service Account Roles or Credentials tab is missing | Client authentication or Service account roles is not enabled |
Enable both under Capability config and click Save (Step 1) |
To see why a login fails on the Keycloak side, enable Realm Settings → Events → User events settings → Save events and check Events after the next attempt.
See also
- Overview and choosing an IdP
- Roles and groups by IdP
- Authentication in the Admin Console

