Keycloak User Management
Keycloak is an external system for user management. All user information including passwords is stored in this system. Keycloak also offers the option of integrating other user data systems, such as Microsoft Active Directory, Google or Facebook. Modern security mechanisms such as 2-factor authentication or Passkey can be added via configuration.
This means that Keycloak can be used as a secure central user management system in the IT infrastructure. All Virtimo products offer Keycloak integration.
|
For productive use, Virtimo AG recommends using Keycloak as a central identity provider. |
Installation
The Keycloak server can be easily installed using the INUBIT installer. To do this, select the Keycloak installation set in the installer.
|
It is recommended to install Keycloak on a separate system. This system can then be secured according to the systems and applications accessing Keycloak. |
Configuration - Keycloak
In order for INUBIT to integrate Keycloak as a user data system, the Keycloak server must be prepared for the INUBIT users to be managed.
Requirements
-
Keycloak server is installed and started
Goals
-
Create an administrative Keycloak account through which INUBIT can manage its users in Keycloak
-
Create at least the INUBIT user
rootin Keycloak so that you can log in to the INUBIT Process Engine using the Workbench
Keycloak – Realm and Client
In Keycloak, users are grouped into so-called realms. One application can usually access one realm. Different applications can also access the same or separate realms together.
Proceed as follows
-
Set up an administrator account
-
Create a new realm
-
Configure realm settings
-
Create three clients for the INUBIT components and assign the desired client IDs:
-
Process Engine (e.g.
inubit_process_engine) -
Workbench (e.g.
inubit_workbench) -
CLI (e.g.
inubit_cli)The configured IDs must match the values under
client-idsinkeycloak.json.
-
-
Enable the required flows/capabilities for each client:
-
Process Engine: Enable Direct Access Grants
-
Workbench: Enable Standard Flow (Authorization Code Flow)
-
CLI: Enable Standard Flow; optionally also Direct Access Grants for browser less login (headless systems)
-
-
Set Client Authentication to Off (public client, no client secret) and leave Authorization disabled.
Keycloak – Account and Roles
INUBIT requires an administrative Keycloak account to be able to create, change and delete users. In addition, INUBIT also uses this account to manage the necessary user groups.
|
Create 2 separate accounts for administrative access and the INUBIT user |
Requirements
-
Realm and client have been created in Keycloak
Proceed as follows
Create technical user account:
|
Provide any username and a strong password. |
-
Create user and assign the following roles:
-
manage-users -
manage-clients -
manage-realm
-
Create INUBIT user account root:
|
Provide the username |
-
Create role:
System Administrator -
Create a user group:
admin -
Create user:
rootwith roleSystem Administratorin groupadmin
Create role
-
Go to Clients and select the corresponding INUBIT client according to your configuration (
client-idsinkeycloak.json, e.g.inubit_process_engine) -
Navigate to the Roles tab
-
Click Create Role
-
Name the role and click Save
Create a user group
-
Navigate to Manage > Groups
-
Click Create Group
-
Provide a group name
-
Save the group
Create user
-
Create user:
-
Go to Users and click Add users
-
Create a new user with the desired name
-
-
Assign user group
-
Click Join Groups and select the group
-
Click Create
-
-
Set a strong user password
-
Assign roles to the user:
-
Select the user
-
Go to the Role Mappings tab
-
Click Assign roles
The dialog Assign roles to <username> will be opened
-
Filter by Clients and select the client where the role exists (e.g. the Process Engine client)
-
Assign the desired role and click Assign.
-
Configuration - INUBIT
The appropriate Keycloak configuration must be stored on the INUBIT side so that INUBIT can communicate with the Keycloak.
Requirements
-
Keycloak server is installed and started
-
Clients have been set up in Keycloak
-
An technical user account has been created in Keycloak
-
A root user account has been created in Keycloak
-
INUBIT can access Keycloak (via network)
|
As of version 9.0.0, Alternatively, |
INUBIT - Set Keycloak as external identity provider
Requirements
-
INUBIT Process Engine is stopped
-
Keycloak server is running
Proceed as follows
-
Open the file
<inubit-installdir>/inubit/server/ibis_root/conf/ibis.xml -
Set the Identity Provider setting to
Keycloak:<Property name="IdentityProvider">keycloak</Property> -
Set the Keycloak JSON file location:
<Property name="IdentityProviderConfiguration">keycloak.json</Property> -
Save all changes in
ibis.xml -
Open the file
<inubit-installdir>/inubit/server/ibis_root/conf/keycloak_template.jsonand configure it as per details given in documentation section -
Save all changes in
keycloak.json -
Start INUBIT process engine
-
Start INUBIT Workbench
-
Login with the
rootuser
|
Canonical Keycloak URL and reachability
The value of auth-server-url in keycloak.json must be a single, canonical Keycloak URL that is reachable by both the Process Engine and the client applications (Workbench, CLI).
All components must use the same hostname and scheme for keycloak; mixing different hostnames or raw IP addresses can lead to issuer mismatches and token validation failures.
If direct reachability requires different network paths (for example, the Process Engine talks to Keycloak via a private IP while external clients access it over the public internet), use DNS to keep a single canonical hostname. In such scenarios, configure split-horizon (split-view) DNS so that the canonical keycloak hostname resolves to an internal IP inside the private network and to a public IP for external clients. This keeps internal traffic local while preserving a consistent issuer and discovery endpoint for all parties.
Prefer DNS names over raw IPs whenever possible.
Token lifetime considerations
Token lifetimes determine how often users need to log in again. Short lifetimes can cause frequent logins, especially after standby phases, when access or refresh tokens have expired. The lifetimes can be configured at realm or client level in the Session settings: Important parameters are Client Session Idle, Client Session Max and SSO Session Max. Choosing appropriate values can improve user convenience without significantly reducing security.
Session lifetime considerations
Starting with INUBIT version 9.0, user interaction between the Workbench and the Process Engine is session-based when Keycloak is used as the identity provider. Each session has a limited lifespan and may expire. If a user remains inactive for an extended period, a pop-up appears in the Workbench prompting them to log in again.
This behavior depends on the validity period of the token issued by Keycloak. As a Keycloak administrator, you can modify the token validity period in the Keycloak realm settings.
Automatic session refresh
The token issued by Keycloak is, by default, sent along with a refresh token. This refresh token is used by the Workbench to automatically renew an expired token without requiring user interaction. A user needs to log in only in the rare case that the refresh token has also expired.
We recommend enabling the issuance of refresh tokens.