Help The platform Import and SSO
Connect Keycloak
On this page
Overview
Keycloak is read in read-only mode: users, groups (including subgroups) and members of a realm. This article covers the preparation in Keycloak and the Connection and SSO sign-in sections; the other settings are common to all imports.
1Prepare a client in Keycloak
The synchronization authenticates as a confidential client with a service account (client_credentials flow). In the realm to be read:
create an OpenID Connect client with client authentication and service account enabled;
assign to its service account the two roles below from the
realm-managementclient;check that the realm answers at
{base URL}/realms/{realm}/protocol/openid-connect/token(token) and{base URL}/admin/realms/{realm}/(reads).
Without client-side encryption, our servers connect to Keycloak from the internet: the address must use https:// and resolve only to public addresses. In an encrypted organization, the Bexxo Protected agent reads Keycloak from your network.
2Fill in the Connection section
Enter the realm, the client ID and secret, and the Base URL: the server address in https://, without /realms, for example https://sso.exemple.ch. If your server publishes its realms under a path (such as /auth), include it.
What is imported
- A user disabled in Keycloak is imported as inactive.
- Each subgroup, at any depth, becomes a group. Only direct members are attached: a member of a subgroup is not attached to the parent group.
- Properties usable in the field matching and the filters, for a person:
username,email,firstName,lastName,enabled, and each custom attribute in the formattributes.followed by its name (first value only), for exampleattributes.department. - For a group:
nameandpath(full path, for example/Siège/Vente).
The prefilled matching only covers the last name, the first name and the email: if needed, add a line for the job title or the phone from a custom attribute.
SSO sign-in with Keycloak
SSO uses an OpenID Connect client of the realm, with its own client ID and secret, independent of the Connection section.
Declare all the redirect URLs shown in SSO sign-in (portal and Academy) as valid redirect URIs of the client.
Enter the realm issuer, of the form
https://{server}/realms/{realm}, the client ID and secret, save, then test discovery. The issuer must be reachable from the internet, even for an organization with active encryption.
Enabling SSO and the effects of an outage are described in the general article.
Test and troubleshoot
| Situation | What to check |
|---|---|
| Connection test failure | Is the base URL in https://, without /realms? Are the realm and the client ID correct? Is the service account enabled on the client? |
| Credentials accepted, read refused | Does the client’s service account have the view-users and query-groups roles from the realm-management client? |
| Organization with active encryption | The test and the synchronization go through the Bexxo Protected agent: it must be started and reach your Keycloak server. |
Didn’t find the answer? Contact us