IAM Helm Chart Configuration
Breaking change: Keycloak values flattened
Nested Bitnami paths such as keycloak.keycloak.* are no longer used. Configure Keycloak under the flat keycloak.* path (for example keycloak.auth.*, keycloak.extraInlineConfig, keycloak.image.*). The Keycloak workload is a Deployment on a thin in-repo chart and the iam-keycloak image (DHI Keycloak with OpenShift group-0 / g=u). See the IAM changelog.
Admin Users
The IAM Helm chart defines three independent admin identities. They serve different purposes and can be configured separately.
Overview
| Helm Value | Purpose | Default |
|---|---|---|
backend. | User granted super admin permissions in the IAM application | "admin" |
keycloak. | Initial user created in the Keycloak application realm | "admin" |
keycloak. | Email for that initial realm user | "" |
keycloak. | Keycloak master realm server admin | "admin" |
1. IAM Super Admin (backend.superAdminUsername)
The username of the user that will be granted super admin permissions in the IAM application, if this user exists in Keycloak.
backend:
superAdminUsername: "admin"This value does not need to match the initial realm user
(keycloak.adminUsername). It can point to any user that exists in the
realm — for example, a user provisioned through Entra ID.
Recommendation for first install: Set
backend.superAdminUsernameto the same value askeycloak.adminUsernameso that the initially created user has super admin privileges in the IAM application. This allows that user to log in and initialize the rest of the system (create roles, assign permissions, etc.). Once the system is set up,superAdminUsernamecan be changed to a different user if needed.
2. Initial Realm User (keycloak.adminUsername / keycloak.adminEmail)
The initial user created in the Keycloak application realm
(e.g. rsh-supervisioncenter) via keycloak-config-cli. This is not a
Keycloak admin — it is simply the first user provisioned in the realm.
keycloak:
adminUsername: "admin"
adminEmail: ""adminEmail is required for production environments. No password is set automatically for this user. To establish a password, the user must go through the Forgot Password flow in Keycloak, which sends a password-setup email to this address. Without a valid email, the initial user cannot log in.
Email as Username (Entra ID)
When registrationEmailAsUsername is enabled on the realm (required for
Entra ID integration), Keycloak enforces that username == email. In that
case, set both values to the admin’s email address:
keycloak:
adminUsername: "admin@example.com"
adminEmail: "admin@example.com"If the username is not a valid email while this setting is active, keycloak-config-cli will reject the import with:
InvalidImportException: username (admin) and email (...) is different
while 'email as username' is enabled on realm.3. Keycloak Server Admin (keycloak.auth.adminUser)
The master-realm admin account used to bootstrap and manage the Keycloak
server itself. This is the account you use to log into the Keycloak
Admin Console at /admin/master/console/.
keycloak:
auth:
adminUser: admin
existingSecret: "{{ .Release.Name }}-keycloak-admin-secret"
passwordSecretKey: admin-passwordThe password is auto-generated by the secret-init-job and stored in the
Kubernetes secret referenced by existingSecret. This user lives in the
master realm and is unaffected by application-realm settings like
registrationEmailAsUsername.
For a deployment that must not put this password in Helm values, see IAM: External Secrets.
Values file
The values.yaml file is structured into logical sections that govern different aspects of the deployment:
- Global Settings: Defines common settings such as domains, service names, ports, and security options - settings that are used in more than one component.
- Subchart Configurations: Each component (auth-gateway, backend, frontend, keycloak) has its own section with specific settings including image tags, secrets, and resource limits.
Required values
Before installing the chart you must set a few values that are required for a working deployment. These values are consumer-facing and should be configured in your values.yaml or passed via --set / --values when installing with Helm.
-
global.domain.base— Base domain used to build hostnames for services (for exampleexample.com). Do not include protocol or subdomains; the chart will prefix hostnames asiam.andiam.keycloak.when needed.Example:
global: domain: base: "example.com" -
global.smtpServer— SMTP configuration used to send emails (password resets, “Forgot Password” flows, permission and group membership notifications). At minimum sethost,port,fromand enableauthif credentials are required. The configuration is automatically applied to both Keycloak and the IAM API. See SMTP Configuration for Email Notifications below for the full parameter reference. -
platform-api.api.messaging.url— Full URL for the message broker used by the Platform API (publish/subscribe).Note: this chart expects a NATS broker. The IAM module integrates with the platform-provided NATS instance by default; other brokers are not supported.
Example (NATS):
platform-api: api: messaging: url: "nats://nats.default.svc.cluster.local:4222"
Make sure these values are configured before installing or upgrading the chart so generated hostnames, email delivery and messaging integration work correctly.
Documentation link
global.documentation.url adds a Documentation link to the IAM top bar, next to the user menu. It opens in a new tab. The default is empty, and then the link is not shown.
The value has to be an absolute http or https URL. A blank value, a relative path, or any other scheme shows no link. The chart renders the value as a Helm template, so it can include the release name or another value.
global:
documentation:
url: "https://docs.example.com/"Auth gateway
The auth-gateway publishes two hosts: the IAM host (global.authGateway.ingress.hostname) and the Keycloak host (global.keycloak.hostname). Both hosts forward path / to the auth-gateway Service on port 80. TLS has to cover both hosts.
Edge mode
global.authGateway.edge.mode selects how the hosts are exposed outside the cluster:
edge.mode | Result |
|---|---|
"" (default) | Ingress when global. is true; otherwise no edge resource |
ingress | Ingress |
gateway | Chart-owned Gateway when gateway. is empty, otherwise customer-owned Gateway |
none | No edge resource |
Any other value fails the template.
Ingress
The chart renders an Ingress for both hosts. This is the default.
global:
authGateway:
ingress:
enabled: true
tlsEnabled: true
# existingTlsSecret: ""
annotations:
cert-manager.io/cluster-issuer: letsencrypt-stagingingress.tlsEnabledenables TLS on the Ingress. On OpenShift the chart also setsroute.openshift.io/termination: edge.ingress.existingTlsSecretselects a pre-existing TLS secret. When it is empty and TLS is enabled, the secret name is<release>-auth-gateway-tls. On OpenShift the Ingress references a TLS secret only wheningress.existingTlsSecretis set. When it is empty, the route terminates TLS with the OpenShift router certificate.ingress.annotationsare added to the Ingress. A cert-manager issuer annotation provisions the TLS secret automatically.edge.mode: ingressrequiresingress.enabled: true; the template fails otherwise.
Chart-owned Gateway
The chart renders a Gateway and an HTTPRoute for both hosts. The cluster needs the Gateway API custom resources and a GatewayClass.
global:
authGateway:
edge:
mode: gateway
gateway:
className: traefik
tlsEnabled: true
# existingTlsSecret: ""
port: 8443
clusterIssuer: letsencrypt-staginggateway.classNameis required and names a GatewayClass installed in the cluster.gateway.tlsEnabledenables TLS termination on the Gateway.gateway.existingTlsSecretselects a pre-existing TLS secret for a chart-owned Gateway. When it is empty, the secret name is<release>-auth-gateway-tls.- With TLS enabled, the listener uses HTTPS on port 443. Without TLS, and on OpenShift, it uses HTTP on port 80. On OpenShift,
existingTlsSecret,clusterIssuer, andissuerfail the render. Use the Ingress or a customer-owned Gateway when the hosts need TLS. gateway.portoverrides the listener port when the controller matches listeners on an internal entrypoint, for example Traefikwebsecureon 8443.gateway.clusterIssueris a cert-managerClusterIssuer, one issuer for the whole cluster.gateway.issueris a cert-managerIssuerin the release namespace. The chart renders aCertificatefromclusterIssuerwhen it is set, and fromissueronly whenclusterIssueris empty. When both are empty, noCertificateis rendered.- The listener accepts routes from the release namespace only.
Customer-owned Gateway
The chart renders only an HTTPRoute attached to an existing Gateway. TLS, certificates, and listeners stay on that Gateway. This is the option for OpenShift and other platform-managed gateways.
global:
authGateway:
edge:
mode: gateway
gateway:
tlsEnabled: false
parentRefs:
- name: shared-gateway
namespace: edge
sectionName: httpsgateway.parentRefslists the Gateways and listeners the route attaches to.gateway.tlsEnabledis false.className,port,existingTlsSecret,clusterIssuer, andissuerare empty. Those fields belong to a chart-owned Gateway, and any of them fails the template.- The Gateway must allow routes from the IAM namespace. The chart does not create that allowance.
No edge resource
The chart renders neither an Ingress nor Gateway API resources. The hosts are exposed by other means.
global:
authGateway:
edge:
mode: noneAn empty edge.mode together with ingress.enabled: false has the same result.
Migrating from Ingress to Gateway
- Make the Gateway API available: install the custom resources and a GatewayClass, or prepare a shared Gateway that allows routes from the IAM namespace.
- Set
edge.mode: gatewaytogether withgateway.className(chart-owned) orgateway.parentRefs(customer-owned). - For a chart-owned Gateway, move
ingress.tlsEnabledtogateway.tlsEnabledandingress.existingTlsSecrettogateway.existingTlsSecret. Move the cert-manager annotation by its key:cert-manager.io/cluster-issuergoes togateway.clusterIssuer. AClusterIssueris available in every namespace.cert-manager.io/issuergoes togateway.issuer. AnIssuerexists only in the release namespace.- When both annotations are present, keep only
gateway.clusterIssuer. The chart ignoresgateway.issuerin that case. - When neither annotation is present, leave both fields empty. The Gateway then uses
gateway.existingTlsSecret, or<release>-auth-gateway-tlswhen that field is also empty, and renders noCertificate.
- For a customer-owned Gateway, set
gateway.tlsEnabledto false and leaveclassName,port,existingTlsSecret,clusterIssuer, andissuerempty. TLS and its certificate stay on that Gateway. - Remove
ingress.annotations. A non-empty map is invalid in Gateway mode.
Move timeout and body-size annotations to the Gateway controller
The chart does not set a request timeout or a body-size limit, and it has no values for them. If ingress.annotations set either one, copy that limit onto the Gateway controller before switching to Gateway mode, then remove the annotations. Gateway mode fails while ingress.annotations is not empty.
This applies to both modes. For a chart-owned Gateway the controller is the one named by gateway.className. For a customer-owned Gateway it is the controller of the Gateway listed in gateway.parentRefs. The HTTPRoute and Gateway rendered by this chart do not carry these limits.
Only one edge is rendered at a time, so the Ingress is removed on the same upgrade.
Keycloak client redirect URIs and web origins
Keycloak accepts only the redirect URIs, web origins, and post-logout redirects listed on each client. The chart manages two confidential clients that use those lists (oauth-client for the auth-gateway / oauth2-proxy browser login, and api-service-account for the IAM backend). The Angular UI authenticates through oauth2-proxy; there is no public SPA client.
Configure the lists under keycloak.clientUrls. Entries are rendered with Helm tpl, so templates such as {{ include "domain.main" . }} work. An empty list uses the chart default; a non-empty list replaces the default (it is not merged), so the default URL must be included when adding another.
| Value | Default when empty |
|---|---|
keycloak. | https:// |
keycloak. | https:// |
keycloak. | https:// (auth-gateway logout target) |
keycloak. | https:// |
keycloak. | none |
keycloak. | false |
keycloak:
clientUrls:
oauthClient:
redirectUris:
- 'https://{{ include "domain.main" . }}/oauth2/callback'
- 'http://localhost:4200/oauth2/callback'
webOrigins:
- 'https://{{ include "domain.main" . }}'
- 'http://localhost:4200'
postLogoutRedirectUris:
- 'https://{{ include "domain.main" . }}'
- 'http://localhost:4200'Rendering fails when any entry contains *, or when a webOrigins / postLogoutRedirectUris entry is bare + (Keycloak’s “reuse redirect URIs” shorthand). allowWildcards: true lifts that check for non-production environments only; rendering also fails when it is set while global.production is true.
The chart-managed pat-token-exchange client has the standard flow disabled and no redirect URIs or web origins, so it has no clientUrls values.
Upgrade: live wildcard lists are replaced
The next deploy updates the existing Keycloak clients (IMPORT_MANAGED_CLIENT=no-delete). Installations that relied on https://<domain.main>/* (or a localhost /* overlay) must list every required callback, origin, and post-logout URL in keycloak.clientUrls before upgrading. Traefik logout sends post_logout_redirect_uri as the bare IAM host; that URL is now registered explicitly under oauthClient.postLogoutRedirectUris.
Do not overlay oauth-client or api-service-account URLs with keycloak.extraConfiguration (default-platform-realm-11_clients.yaml). Use keycloak.clientUrls so the render guard still applies. Clients added through extraInlineConfig.clients or extraConfiguration are operator-owned and are not checked by that guard. Those redirect URIs must be listed explicitly as well; wildcards remain an open-redirect risk.
Personal access token client scopes
Access tokens exchanged from a personal access token always carry the module scopes requested by the caller and the default client scopes profile, email, and basic of the pat-token-exchange client. The chart attaches no optional client scopes to that client. To let callers request an additional scope, such as groups or address, attach it as an optional client scope of pat-token-exchange in the Keycloak admin console. The realm import keeps scopes attached this way, but they are lost when the client is recreated, for example in a new realm.
Any personal access token can request any optional client scope attached to pat-token-exchange in the Keycloak admin console. Do not attach scopes that carry roles, and never attach a custom permissions scope as a default scope.
Image references
By default, every image in the chart is {global.imageRegistry}/{repository}:{tag}. The Keycloak image can also be pinned with keycloak.image.digest, which renders {global.imageRegistry}/{repository}@{digest}.
global.imageRegistry has no default. Set it to the registry host and path the images are pulled from, either the registry that delivers the release or an own mirror of it. When the registry requires credentials, list an existing pull secret in global.imagePullSecrets. A platform install can instead set global.imageRegistryUsername and global.imageRegistryPassword on the platform chart, which creates the <release>-dockerconfig Secret. That Secret name still has to be listed in global.imagePullSecrets.
repository is the image name and has a default in the chart:
| Value | Chart default |
|---|---|
backend. | iam-api |
frontend. | iam-ui |
keycloak. | iam-keycloak |
keycloak. | iam-keycloak-providers |
The release images are published under these names, so a standard install sets only global.imageRegistry:
global:
imageRegistry: registry.example.com/supervisory-hub
# Pulls registry.example.com/supervisory-hub/iam-api:<tag>Override repository only when an own mirror stores an image under a different name or in a subdirectory. A directory in front of the image name belongs in repository, not in global.imageRegistry:
global:
imageRegistry: registry.example.com/supervisory-hub
backend:
image:
repository: iam/iam-api
# Pulls registry.example.com/supervisory-hub/iam/iam-api:<tag>Traefik, Valkey, oauth2-proxy, keycloak-config-cli and the other images in the chart follow the same pattern, each with its own repository default.
Keycloak image and security context
Server image settings live under keycloak.image in the umbrella chart values (not in the Keycloak subchart defaults), matching backend/frontend:
keycloak:
image:
repository: iam-keycloak
tag: <chart-semver>
providersRepository: iam-keycloak-providers
providersTag: <chart-semver>
pullPolicy: IfNotPresentiam-keycloak is a thin wrapper around DHI Keycloak that applies group-0 / g=u permissions so OpenShift restricted-v2 arbitrary UIDs can run the process. On OpenShift, set keycloak.runAsUser, keycloak.runAsGroup, and keycloak.fsGroup to null so the SCC can assign identities. On GKE the chart defaults keep numeric 65532 (the image USER).
Login
Login Headline can be configured using keycloak realm -> Display name
Extending Keycloak Configuration
Configuring Keycloak through keycloak-config-cli (extraInlineConfig, extraConfiguration) is not recommended for routine setup. It is preferred to use the IAM API for initialization and ongoing changes.
Without sufficient expertise, keycloak-config-cli can produce unexpected results (including deletion of existing Keycloak resources) because imports are applied as desired state.
The IAM module provides two complementary methods for extending the default Keycloak realm configuration beyond what is provided out of the box. Both methods use adorsys/keycloak-config-cli to apply configuration declaratively from Helm values (merged into a ConfigMap on install/upgrade).
Declarative vs programmatic configuration
This section covers declarative configuration in values.yaml.
Built-in realm fragments live under helm/charts/keycloak/config/platform-realm/.
Overview
| Method | Purpose |
|---|---|
extraInlineConfig | Inject additional resources (clients, roles, groups, users) into existing configuration files |
extraConfiguration | Add entirely new configuration files that are processed alongside built-in files |
These methods allow you to customize your Keycloak realm without modifying the chart’s default configuration files directly, making upgrades smoother and configuration more maintainable.
Method 1: extraInlineConfig
What It Is
extraInlineConfig allows you to inject additional Keycloak resources directly into the built-in platform-realm configuration files without replacing or duplicating the default configuration. This is ideal for adding a few extra clients, roles, groups, or users that complement the platform’s defaults.
How It Works
The injection mechanism merges your values into existing configuration files at specific injection points:
- 10_clients.yaml: Additional OAuth/OIDC clients
- 20_groups.yaml: Additional realm roles, client roles, and groups
- 30_users.yaml: Additional users
Resources are added to arrays in these files, and processing order ensures dependencies are met (clients → roles → groups → users).
Configuration Structure
Add your configuration under keycloak.extraInlineConfig in your values.yaml:
keycloak:
extraInlineConfig:
clients: [] # Array of ClientRepresentation objects
roles: # RolesRepresentation object
realm: [] # Array of realm roles
client: {} # Map of clientId -> array of client roles
groups: [] # Array of GroupRepresentation objects
users: [] # Array of UserRepresentation objectsComplete Working Example
Here’s a comprehensive example showing all supported resource types:
keycloak:
extraInlineConfig:
# Additional OAuth/OIDC clients
clients:
- clientId: "dev-inline-test-client"
name: "Dev Inline Test Client"
enabled: true
protocol: openid-connect
publicClient: true
serviceAccountsEnabled: false
standardFlowEnabled: true
implicitFlowEnabled: false
directAccessGrantsEnabled: false
bearerOnly: false
consentRequired: false
rootUrl: 'https://iam.default.iam.dev.suptech.regnology.io'
baseUrl: 'https://iam.default.iam.dev.suptech.regnology.io'
redirectUris:
- 'https://iam.default.iam.dev.suptech.regnology.io/inline-test/callback'
- 'http://localhost:4200/inline-test/callback'
webOrigins:
- 'https://iam.default.iam.dev.suptech.regnology.io'
- 'http://localhost:4200'
defaultClientScopes:
- "web-origins"
- "profile"
- "email"
optionalClientScopes:
- "offline_access"
- "groups"
# Additional roles
roles:
realm:
- name: "technical-requester-inline"
description: "Technical role injected via extraInlineConfig"
- name: "technical-requester-inline-1"
description: "Technical role injected via extraInlineConfig"
client:
dev-inline-test-client:
- name: "inline-client-reader"
description: "Client role injected via extraInlineConfig"
- name: "inline-client-writer"
description: "Client role injected via extraInlineConfig"
# Additional groups
groups:
- name: "inline-technical-group"
realmRoles:
- "technical-requester-inline"
# Additional users
users:
- username: "inline-technical-user"
email: "inline-technical-user@example.com"
firstName: "Inline"
lastName: "Technical"
enabled: true
emailVerified: true
groups:
- "inline-technical-group"
realmRoles:
- "technical-requester-inline"
credentials:
- type: password
value: inline-technical-user
temporary: falseImportant Notes
- No Helm templating: Values are passed as raw YAML. The
{{ }}syntax will not be evaluated. Use literal values or compute them before passing toextraInlineConfig. - Roles schema: The
rolesstructure must follow Keycloak’sRolesRepresentationformat (an object withrealmandclientkeys), not a flat array. - Processing order: The configuration files are processed in numeric order (10, 20, 30…), ensuring clients are created before roles, which are created before users. This satisfies dependency requirements.
- Client fields: When defining clients, ensure all required fields are set. Missing fields like
serviceAccountsEnabledorbearerOnlymay cause import failures.
Use keycloak.extraInlineConfig to append into the built-in platform-realm files (10_clients, 20_groups, 30_users, etc.). Example — group and user membership:
keycloak:
extraInlineConfig:
users:
- username: example-user
enabled: true
emailVerified: true
groups:
- "/example-group"
groups:
- name: example-group
path: /example-groupMethod 2: extraConfiguration
What It Is
extraConfiguration allows you to add completely new configuration files that will be processed by keycloak-config-cli alongside the built-in files. This method is more powerful and flexible, suitable for complex configurations, environment-specific overrides, and scenarios requiring dynamic values.
How It Works
- Each key under
extraConfigurationbecomes a ConfigMap entry (filename) - Values are treated as Helm templates with full Go template evaluation using
tpl - Files are merged with built-in configuration files and processed in alphabetical order
- Naming convention:
default-platform-realm-<number>_<name>.yamlcontrols processing order (lower numbers first)
Configuration Structure
Add your configuration under keycloak.extraConfiguration in your values.yaml:
keycloak:
extraConfiguration:
<filename>.yaml: |
# Multi-line YAML content with Helm templating support
realm: {{ .Values.global.keycloak.realm | quote }}
# ... configuration ...Working Examples
Example 1: Adding Development Users
keycloak:
extraConfiguration:
default-platform-realm-31_users-dev.yaml: |
realm: {{ .Values.global.keycloak.realm | quote }}
enabled: true
users:
- username: admin
groups:
- administrator
credentials:
- type: password
value: admin
temporary: false
- username: principal
email: principal@example.com
firstName: Principal
lastName: Principal
enabled: true
emailVerified: true
credentials:
- type: password
value: principal
temporary: falseExample 2: Adding Identity Providers
Avoid automatic IDP redirect
Do not set authenticateByDefault: true on an IDP and do not add an Identity Provider Redirector execution to the browser flow. Both bypass the Keycloak login page and can make it impossible to log in as a different account (e.g., a local super_admin). See Known Pitfall: Do Not Enable Automatic IDP Login Redirect.
keycloak:
extraConfiguration:
default-platform-realm-50_identity-providers.yaml: |
realm: {{ .Values.global.keycloak.realm | quote }}
enabled: true
identityProviders:
- alias: "oidc"
displayName: "Okta"
providerId: "oidc"
enabled: true
config:
tokenUrl: "https://portal-test.regnology.net/oauth2/default/v1/token"
clientId: "0oa9t24z34e9JCF6U0x7"
clientSecret: "..."
authorizationUrl: "https://portal-test.regnology.net/oauth2/default/v1/authorize"Example 3: Adding an extra client with templated URLs
For the chart-managed oauth-client and api-service-account URLs, use keycloak.clientUrls instead of an extraConfiguration overlay.
Use keycloak.extraConfiguration to add whole import documents (each key becomes a ConfigMap file, for example default-platform-realm-99_my-overlay.yaml). Example — an additional environment-specific client with explicit callback URLs:
keycloak:
extraConfiguration:
default-platform-realm-11_extra-clients.yaml: |
realm: {{ .Values.global.keycloak.realm | quote }}
enabled: true
clients:
- clientId: my-extra-client
enabled: true
protocol: openid-connect
publicClient: false
standardFlowEnabled: true
redirectUris:
- 'https://{{ include "domain.main" . }}/extra/callback'
webOrigins:
- 'https://{{ include "domain.main" . }}'Comparison: Which Method to Use?
| Feature | extraInlineConfig | extraConfiguration |
|---|---|---|
| Purpose | Extend existing config files | Add new config files |
| Helm Templating | ❌ No (raw YAML only) | ✅ Yes (full tpl evaluation) |
| Dynamic Values | ❌ Must be literal | ✅ Can use {{ }}, helpers, values |
| File Control | ⚠️ Fixed injection points | ✅ Full control over file name/order |
| Use Case | Add resources to defaults | Complex configs, overrides, conditionals |
| Merging Behavior | Appends to arrays | Standalone file/realm import |
| Best For | Simple additions (clients, roles, users) | Environment-specific configs, identity providers |
Use extraInlineConfig when:
- Adding a few additional clients, roles, groups, or users
- Values are static or environment-specific (per values file)
- You want to leverage the existing configuration structure
- You don’t need Helm templating or dynamic value computation
Use extraConfiguration when:
- Adding complex configurations (identity providers, authentication flows)
- You need Helm templating for dynamic values (domains, computed values)
- Creating environment-specific overrides (dev vs prod users)
- You need full control over file processing order
- Configuration requires conditional logic or helper functions
- Chart-managed
oauth-clientandapi-service-accountURLs belong underkeycloak.clientUrls.extraConfigurationdoes not run the wildcard check on those two clients.
Combined Usage Example
Both methods can work together seamlessly:
keycloak:
# Add simple static resources using extraInlineConfig
extraInlineConfig:
roles:
realm:
- name: "technical-role"
description: "Static technical role"
groups:
- name: "technical-users"
realmRoles:
- "technical-role"
# Add complex dynamic configurations using extraConfiguration
extraConfiguration:
default-platform-realm-31_dev-users.yaml: |
realm: {{ .Values.global.keycloak.realm | quote }}
enabled: true
users:
{{- range $i := until 5 }}
- username: "test-user-{{ $i }}"
email: "test{{ $i }}@{{ $.Values.global.domain.base }}"
enabled: true
groups:
- "technical-users"
{{- end }}Troubleshooting
Issue: Cannot deserialize value of type RolesRepresentation from Array
Cause: Using array format for roles instead of object format.
Solution: Use the correct structure:
# ❌ INCORRECT (array format)
roles:
- name: "my-role"
# ✅ CORRECT (RolesRepresentation object)
roles:
realm:
- name: "my-role"
client:
my-client-id:
- name: "my-client-role"Issue: Helm Template Syntax Not Evaluated in extraInlineConfig
Cause: extraInlineConfig doesn’t support Helm templating.
Solution: Either:
- Use literal values in
extraInlineConfig, or - Switch to
extraConfigurationfor dynamic value support
Issue: Client Role Creation Fails with 400 Bad Request
Cause: Client doesn’t exist yet, or missing required client fields.
Solution:
- Ensure the client is created before roles that reference it (use file numbering)
- Verify all required client fields are set (
serviceAccountsEnabled,bearerOnly, etc.)
Issue: Resources Not Appearing After Upgrade
Cause: Configuration may be cached or not reapplied.
Solution:
- Ensure
keycloak-config-clijob runs successfully (check pod logs) - Verify your YAML syntax is valid
- Check ConfigMap contents:
kubectl get configmap <release-name>-keycloak-config -o yaml
Organisation-wide entity group
Catalog id of the organisation-wide entity group. A permission scoped to this id grants entity-axis access across all entities, all entity groups, and unscoped data for the roles in that permission (module and resource constraints still apply). IAM does not publish the group — set this to the id from the Global Entity Groups provider (for Datacollection: rsh.allEntityGroupId). A mismatch falls back to ordinary group-id matching. Default "all".
backend:
allEntityGroupId: "all"See Context Scoping — Organisation-wide entity group.
Entity catalogue cache
From IAM 1.6.4, the IAM API keeps the global entity and entity-group catalogues in process memory for backend.globalCatalogueCacheSeconds seconds instead of calling the provider on every request. Default 60. A value of 0 or less disables the cache, and each request that needs the catalogue fetches it from the provider.
backend:
globalCatalogueCacheSeconds: 60A change in the provider’s catalogue can take up to this long to appear in IAM.
Permission Mirroring
Permission mirroring enables automatic cross-module permission propagation driven entirely by configuration.
All settings are nested under backend.permissionMirroring in values.yaml.
| Parameter | Description | Default |
|---|---|---|
existingConfigmap | Name of the ConfigMap to mount. When set to the default value ({{ .), the chart generates the ConfigMap automatically. When changed to a different name, the chart expects a pre-existing ConfigMap with that name. | "{{ . |
json | Inline JSON string used when the chart generates its own ConfigMap (i.e. when existingConfigmap matches the default). Ignored when pointing to an external ConfigMap. | — |
Default (no mirroring)
When no json value is specified and no custom ConfigMap is provided, the chart generates a ConfigMap with { "PermissionMirroring": [] }, meaning no mirroring occurs.
Using a pre-existing ConfigMap
backend:
permissionMirroring:
existingConfigmap: "my-custom-configmap-name"Inline configuration
backend:
permissionMirroring:
json: |
{
"PermissionMirroring": [
{
"sourceModule": "IAM-Module",
"targets": [
{
"targetModule": "module-mock",
"defaultInTarget": [
{ "typename": "access", "role": "reportViewer" }
],
"rules": [
{
"from": { "typename": "action", "role": "manage" },
"to": { "typename": "access", "role": "holidaysAdmin" }
},
{
"from": { "typename": "resource" },
"to": { "typename": "dataCollection" }
}
]
}
]
}
]
}For a full description of the JSON schema, rule processing logic, and runtime behavior, see IAM: Permission Mirroring.
Module client registration roles
A module that registers its client through a Hub Integration Message can request IAM roles for that client. backend.moduleClientRegistration limits which of these roles IAM assigns. The limits do not affect endpoint permissions, which registration assigns to the IAM service account.
| Value | Effect | The "*" key | A module’s own entry | Default |
|---|---|---|---|---|
backend. | Roles that are never assigned | Applies to every module | Is added to the "*" entry | {} |
backend. | When not empty, only the listed roles are assigned | Applies only to modules without their own entry | Replaces the "*" entry | {} |
By default both maps are empty and no role filtering is applied to eligible clients. The limits apply to new assignments only. Roles that a client already has stay in place when limits are added later.
Registration always skips system clients (backend.systemClientIds), the API service account (global.backend.apiServiceAccount.clientId, default api-service-account), and clients already linked to another module. No roles are assigned to them.
Matching rules
The map keys are the applicationId that the module sends in its registration message, which is also the name of its module context in IAM, for example DataCollection-Module or licensing. The match is case-sensitive. They are not client IDs. The module key inside an entry restricts the module of the permission being assigned.
The two maps are evaluated separately, each with its own entries, so the "*" key means something different in each (see the table above). disallowedRoles is checked first and cannot be overridden by allowedRoles. IAM checks each requested permission on its own and assigns the ones that pass. A permission that expands to several roles is rejected as a whole when one of them is rejected. Each rejected permission is logged as a warning with the reason (disallowed, not allowed, or unrecognized role key).
disallowedRoles:
- Every entry must define
action. Aresourceormodulekey left out of the entry matches any value, and so does"*". A requested permission withoutresourceormodulealso matches the entry on that key. managedoes not coverview: denyingmanagestill allowsview.- The
contextof the entry is ignored.
allowedRoles:
- Once the map has any entry, a module with neither its own entry nor a
"*"entry receives no roles. Listing one module therefore restricts every other module too. "*"covers any value of that key, including a missing one. A"*"action also coverssuper_admin.managecoversview.- A missing
modulekey covers every module. A list of named modules does not cover a request withoutmodule. - A missing
resourcekey covers only roles without a resource. Use"*"to cover every resource. - The
contextmust match the requested context. A"*"inentitiesorentityGroupscovers that axis only, and the other axis must still match. An entry withoutcontextcovers only requests withoutcontext.
Both maps:
- Role keys are exact:
action,resource, andmodule(Actionis notaction). An entry without an action or with any other key stops the IAM API from starting. This includes an entry written withrole:instead ofroles:, which has no action. - While either map has an entry, a requested permission with any other role key is rejected.
An empty list does not refuse roles
An entry such as licensing: [] is dropped when the settings load. If it was the only entry, no allow-list restriction applies. Any disallowedRoles rules still apply. Next to other entries, licensing falls back to the "*" entry, or receives no roles when there is none. To refuse roles to a module, list them in disallowedRoles.
Example
backend:
moduleClientRegistration:
disallowedRoles:
"*":
- roles:
action: ["super_admin"]
allowedRoles:
"*":
- roles:
action: ["manage"]
resource: ["users"]
DataCollection-Module:
- roles:
action: ["view", "manage"]
resource: ["users"]
licensing:
- roles:
action: ["*"]
resource: ["*"]
module: ["*"]The table shows permissions requested without context. users:manage stands for action: manage with resource: users.
| Registering module | Allow entry that applies | users:manage | users:view | clients:manage | super_admin |
|---|---|---|---|---|---|
DataCollection-Module | its own | assigned | assigned | rejected, not allowed | rejected, disallowed |
licensing | its own, which would also cover super_admin | assigned | assigned | assigned | rejected, disallowed |
| any other module | "*" | assigned | assigned, because manage covers view | rejected, not allowed | rejected, disallowed |
licensing does not inherit anything from the "*" allow entry, because its own entry replaces it. The "*" deny entry still applies to it. Roles assigned before this configuration stay in place.
Common patterns
Block a role for every module. Add it to the "*" entry of disallowedRoles. Modules can request super_admin for their client, so agree a global block with the module owners first. After the change, the IAM API log names every rejected role.
backend:
moduleClientRegistration:
disallowedRoles:
"*":
- roles:
action: ["super_admin"]Allow a role for one module only. Use allowedRoles instead of disallowedRoles. Give the "*" entry the roles every module may receive, and give the one module its own entry that includes the extra role. Its own entry replaces "*", so it must list the shared roles as well.
backend:
moduleClientRegistration:
allowedRoles:
"*":
- roles:
action: ["view"]
resource: ["users"]
DataCollection-Module:
- roles:
action: ["view"]
resource: ["users"]
- roles:
action: ["super_admin"]Here DataCollection-Module can be assigned super_admin and users:view. Every other module can be assigned only users:view.
Block a role for one module only. Add an entry for that module to disallowedRoles. It applies together with the "*" entry.
backend:
moduleClientRegistration:
disallowedRoles:
licensing:
- roles:
action: ["manage"]
resource: ["clients"]The same role in both maps. disallowedRoles wins. With super_admin in the "*" deny entry and in the DataCollection-Module allow entry, DataCollection-Module is not assigned super_admin, and the warning gives the reason disallowed. To make an exception for one module, remove the role from disallowedRoles and use the allow-list pattern above.
OpenTelemetry
The IAM API exports traces and metrics over OTLP. Keycloak exports traces only, because its OpenTelemetry metrics are experimental. Export is off until an endpoint is set, and each signal is enabled by its own endpoint.
| Value | Description | Default |
|---|---|---|
backend. | service. of the IAM API | "iam-backend" |
backend. | OTLP endpoint for traces. Empty disables traces. | "" |
backend. | grpc or http/ | "grpc" |
backend. | Fraction of traces to sample, from 0 to 1 | "0. |
backend. | OTLP endpoint for metrics. Empty disables metrics. | "" |
backend. | grpc or http/ | "http/ |
keycloak. | service. of Keycloak | "iam-keycloak" |
keycloak. | OTLP collector base URL. Empty disables tracing. | "" |
keycloak. | grpc or http/ | "grpc" |
keycloak. | Fraction of traces to sample, from 0 to 1 | "0. |
Service names and endpoints are rendered with Helm tpl. Both components sample with parentbased_traceidratio and add the pod name, pod UID, namespace, and image tag as resource attributes.
The IAM API uses each endpoint as given, so with http/protobuf it includes the signal path, for example /v1/metrics. The Keycloak endpoint is the collector base URL without a signal path; with http/protobuf Keycloak appends /v1/traces itself. Both must be absolute http or https URLs. An invalid Keycloak endpoint fails rendering, and an invalid IAM API endpoint or protocol stops the IAM API from starting.
The Platform API bundled with IAM exports separately, configured under platform-api.api.openTelemetry.*.
backend:
openTelemetry:
traces:
endpoint: "http://opentelemetry-collector.monitoring.svc.cluster.local:4317"
metrics:
endpoint: "http://opentelemetry-collector.monitoring.svc.cluster.local:4318/v1/metrics"
keycloak:
openTelemetry:
traces:
endpoint: "http://opentelemetry-collector.monitoring.svc.cluster.local:4317"SMTP Configuration for Email Notifications
The IAM module sends email notifications for several user-facing events such as password setup/reset, “Forgot Password” flows, permission assignment changes and group membership changes. All of these flows depend on a working SMTP server configured via the Helm chart values. The configuration is applied to both Keycloak and the IAM API.
For an overview of when and which emails are sent, including templates and supported languages, see IAM: Email Notifications.
Email Notification Failures
Failures in sending email notifications do not result in the failure of the underlying request. All IAM operations (such as permission assignments, group changes, or user registration) will complete successfully even if the email notification cannot be sent due to SMTP issues or other delivery problems. This ensures that critical IAM operations are not blocked by email delivery issues.
Setup
SMTP server configuration is managed through the values.yaml file used for deployment. All SMTP settings are nested under global.smtpServer.
global:
## SMTP server configuration for email notifications
smtpServer:
from: "noreply@yourcompany.com"
fromDisplayName: "IAM System"
host: "smtp.yourcompany.com"
port: "587"
auth:
enabled: true
username: "smtp-user"
password: "smtp-password"
# starttls: false
# ssl: false # Note: SSL is automatically enforced in productionConfiguration Parameters
All parameters below are nested under global.smtpServer in values.yaml.
| Parameter | Description | Required | Default |
|---|---|---|---|
from | Email address used as sender | Yes | - |
fromDisplayName | Display name for the sender | Yes | - |
host | SMTP server hostname | Yes | - |
port | SMTP server port | Yes | - |
auth. | Enable SMTP authentication | No | false |
auth. | SMTP username (required if auth enabled) | Conditional | - |
auth. | SMTP password (required if auth enabled) | Conditional | - |
starttls | Enable STARTTLS | No | false |
ssl | Enable SSL/TLS | No | Environment dependent |
enabled | Send IAM notification emails. When false, the IAM API skips them; Keycloak emails are not affected | No | true |
overrideTo | Send every IAM notification email to this address instead of the original recipient, for example in test environments | No | - |
subjectPrefix | Text prepended to the subject of IAM notification emails | No | - |
STARTTLS negotiation
From IAM 1.6.3 (Keycloak 26.8.1), Keycloak does not send mail when starttls is true and STARTTLS negotiation with the SMTP server fails (CVE-2026-107121). Check that the SMTP server supports STARTTLS on the configured port, and check after the upgrade that Keycloak still sends mail.
Security Considerations
- Production Environment: SSL/TLS is automatically enforced regardless of the
sslconfiguration setting - Development Environment: Uses the configured
sslsetting for flexibility during testing - Always use authentication in production environments
- Individual SMTP settings, including the password, can be supplied from a Secret Manager instead of
global.smtpServer. See IAM external secrets: SMTP settings.
References
- Keycloak Admin REST API Documentation - ClientRepresentation, RoleRepresentation, UserRepresentation schemas
- adorsys keycloak-config-cli - Documentation and example import files
- IAM configuration files:
helm/charts/keycloak/config/platform-realm/*.yaml
Identity Providers
No identity providers are created by default. They can be configured using either method described above (recommended: extraConfiguration for complex IDP setups), or manually via the Keycloak Admin UI.
For detailed guides on integrating modules and connecting to external identity providers (IDPs), see the IAM: Keycloak OIDC and Identity Providers.
Whitelabeling
Whitelabeling can be configured using the whitelabel values.
For more information, see the whitelabeling documentation.