Connecting and Setting Up Keycloak
Keycloak is an identity provider that can be used for user authentication. If the identity providers already supported are insufficient due to functionality limitations or security concerns, then Keycloak is recommended. Even though the setup process is a bit more involved.
Prerequisites
You have installed Keycloak according to the official instructions (https://www.keycloak.org/documentation) and have administrative access to Keycloak.
|
You should always use the latest version of Keycloak whenever possible to avoid security risks. |
Keycloak Configuration
The Leader realm in Keycloak should only be used for managing administrators. Therefore, please create another realm or use an existing realm that you may already be using for other applications.
Create a client
In order for the BPC to communicate with Keycloak, a so-called client must be created.
-
Make sure you have selected the correct realm.
-
Select "Clients" on the left-hand side
-
Create a new client using "Create client"
-
Select "OpenID Connect" as the "Client type"
-
Set the Client ID to "BPC-core"
-
Enable "Client authentication". In older versions of Keycloak, this corresponds to the "confidential" access type.
-
Enter the URL of your BPC under "Valid redirect URIs." For example, "https://BPC.example.com/"
-
Save the client
-
In the "Passwords" (or "Credentials") tab, you can view (and also change) the client secret. You will need this later to connect the BPC
BPC Configuration
In BPC, Keycloak must be created as an identity provider under Backend Connections and then specified as the identity provider to be used in the Core Services settings.
|
When BPC is first started, backend Connections are automatically created that can be used for Keycloak.
These contain a suitable placeholder configuration and are named |
Identity Provider Keycloak vs. OIDC
You have the option to connect Keycloak in two different ways (IdentityProvider oidc or keycloak).
In both variants, the actual authentication takes place via the OpenID Connect protocol.
If you select “keycloak,” a Keycloak admin user must also be configured.
In this case, users can be managed directly from within the BPC.
In the “ oidc ” variant, user administration takes place exclusively in Keycloak.
Create an “Identity Provider” Backend Connection
-
BPC Settings → Backend Connections → Components
-
Click the “+” button at the bottom to create a new component; select “identity_provider” as the type
| Setting (Key) | Group | Value | Description |
|---|---|---|---|
Module_Name |
module |
e.g., "company-keycloak" |
Assign a descriptive and unique name |
IdentityProvider |
config |
keycloak or oidc |
Set Keycloak or OIDC as the IdP for the backend connection. See also Identity Provider Keycloak vs. OIDC |
IdentityProvider_URL |
config |
https://localhost:8080/auth/realms/BPC/.well-known/openid-configuration |
The OpenID endpoint of the Keycloak server |
IdentityProvider_Configuration |
config |
|
The configuration for Keycloak access.
The section below "keycloak" is only necessary if "keycloak" is selected under IdentityProvider (see also Identity Provider Keycloak vs. OIDC).
The URLs here must be adjusted to match the BPC and Keycloak.
Under |