This guide provides step-by-step instructions for configuring a minimal Keycloak setup to manage users, roles, and applications efficiently.
Create a new realm
Create/import user roles and groups
Create new users
Add clients
Add mappers
Add service accounts
Log in to the Keycloak Admin Console
Create Realm
Enter Realm Details
Configure Realm Settings
Download and Run the Import Script
Add Admin User to Group
Validate imported roles
Navigate to Users
Add a New User
Assign User to Group
FLOWX_SUPER_USERS
and click Join.Set Temporary Password
flowx-platform-authenticate
, which will be used for login, logout, and refresh token operations by web and mobile apps.
Navigate to Clients
Configure General Settings
{your-client-name}-authenticate
.OpenID Connect
.Configure Capability Config
Set Valid Redirect URIs
Configure Additional Settings
Add Mappers
{your-client-name}-authenticate
client.{your-client-name}-platform-authorize
client.
Create the Client
{your-client-name}-platform-authorize
).Set Client type to OpenID Connect.Configure Capability Config
Set Valid Redirect URIs
Configure Additional Settings
{your-client-name}-platform-authorize
client will be created and can be used to authorize REST requests to microservices and Kafka within your application.
{your-client-name}-platform-authorize
client:
Configuration Key | Value/Example | Description |
---|---|---|
security.type | oauth2 | Specifies the security type as OAuth2. |
security.basic.enabled | false | Disables basic authentication. |
security.oauth2.base-server-url | http://localhost:8080 | Sets the base server URL for the Keycloak server. |
security.oauth2.realm | flowx | Specifies the Keycloak realm. |
security.oauth2.client.access-token-uri | ${security.oauth2.base-server-url}/realms/${security.oauth2.realm}/protocol/openid-connect/token | Defines the URL for obtaining access tokens. |
security.oauth2.client.client-id | your-client-name-platform-authorize | Sets the client ID for authorization. |
security.oauth2.client.client-secret | CLIENT_SECRET | Provides the client secret for authentication. |
security.oauth2.resource.user-info-uri | ${security.oauth2.base-server-url}/realms/${security.oauth2.realm}/protocol/openid-connect/userinfo | Specifies the URL for retrieving user information. |
realm-groups
)
business filter mapper
)
realm-roles
)
/userinfo
endpoint, in addition to being included in tokens. This capability is a feature that not all Identity Providers (IDPs) support.Navigate to Clients
Select Client Scopes
{your-client-name}-authenticate-dedicated
to open its settings.Client Scope
Add a New Mapper
Provide Mapper Details
realm-groups
.Token Claim Name: Set the token claim name, typically as groups
, for including group information in the token.Add to ID Token: Toggle OFF.Navigate to Client Scopes
{your-client-name}-authenticate-dedicated
to open its settings.Ensure the Mappers tab is selected.Add a New Mapper
Provide Mapper Details
businessFilters
.attributes.businessFilters
.{your-client-name}-authenticate
client, so roles will be available in the OAuth user info response, follow these steps:
Navigate to Client Scopes
{your-client-name}-authenticate-dedicated
to open its settings.Ensure the Mappers tab is selected.Add a New Mapper
Provide Mapper Details
roles
.Create the Client
Configure Capability Config
Configure Additional Settings
Assign Roles to Service Account
realm-management
.FLOWX_ROLE
and role mapper), and access data from Keycloak.
Steps to Add a Task Management service account:
Create the Service Account
Assign Necessary Roles
Add a Realm Roles Mapper
{your-client-name}-service-account
to open its settings.Configure the Mapper
realm-roles
.Token Claim Name: Set it to roles
.Disable Add to ID token.Add the Service Account Realm Role
FLOWX_ROLE
service account realm role (used to grant permissions for starting processes).FLOWX_ROLE
is used to grant permissions for starting processes in the FlowX.AI Designer platform. By default, this role is named FLOWX_ROLE
, but its name can be changed from the application configuration of the Engine by setting the following environment variable:FLOWX_PROCESS_DEFAULTROLES
FLOWX_ROLE
service account realm role (used to grant permissions for starting processes):FLOWX_ROLE
as service account role (this is needed to run process instances).Create the Client
integration-designer-sa
).Configure Client Capabilities
Save the Client Configuration
Create the Client
Configure Capability Config
Configure Additional Settings
Assign Roles to Service Account
ROLE_TASK_MANAGER_HOOKS_ADMIN
ROLE_TASK_MANAGER_VIEWS_ADMIN
ROLE_DOCUMENT_TEMPLATES_ADMIN
ROLE_ADMIN_MANAGE_PROCESS_ADMIN
ROLE_INTEGRATION_SYSTEM_ADMIN
ROLE_TASK_MANAGER_PROCESS_ALLOCATION_SETTINGS_ADMIN
ROLE_CMS_CONTENT_ADMIN
ROLE_MEDIA_LIBRARY_ADMIN
ROLE_NOTIFICATION_TEMPLATES_ADMIN
ROLE_INTEGRATION_WORKFLOW_ADMIN