Skip to Content
IAM
Installation
IAM Helm Chart Configuration

IAM Helm Chart Configuration

Warning

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 ValuePurposeDefault
backend.superAdminUsernameUser granted super admin permissions in the IAM application"admin"
keycloak.adminUsernameInitial user created in the Keycloak application realm"admin"
keycloak.adminEmailEmail for that initial realm user""
keycloak.auth.adminUserKeycloak 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.superAdminUsername to the same value as keycloak.adminUsername so 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, superAdminUsername can 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-password

The 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 example example.com). Do not include protocol or subdomains; the chart will prefix hostnames as iam. and iam.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 set host, port, from and enable auth if 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.

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.modeResult
"" (default)Ingress when global.authGateway.ingress.enabled is true; otherwise no edge resource
ingressIngress
gatewayChart-owned Gateway when gateway.parentRefs is empty, otherwise customer-owned Gateway
noneNo 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-staging
  • ingress.tlsEnabled enables TLS on the Ingress. On OpenShift the chart also sets route.openshift.io/termination: edge.
  • ingress.existingTlsSecret selects 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 when ingress.existingTlsSecret is set. When it is empty, the route terminates TLS with the OpenShift router certificate.
  • ingress.annotations are added to the Ingress. A cert-manager issuer annotation provisions the TLS secret automatically.
  • edge.mode: ingress requires ingress.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-staging
  • gateway.className is required and names a GatewayClass installed in the cluster.
  • gateway.tlsEnabled enables TLS termination on the Gateway.
  • gateway.existingTlsSecret selects 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, and issuer fail the render. Use the Ingress or a customer-owned Gateway when the hosts need TLS.
  • gateway.port overrides the listener port when the controller matches listeners on an internal entrypoint, for example Traefik websecure on 8443.
  • gateway.clusterIssuer is a cert-manager ClusterIssuer, one issuer for the whole cluster. gateway.issuer is a cert-manager Issuer in the release namespace. The chart renders a Certificate from clusterIssuer when it is set, and from issuer only when clusterIssuer is empty. When both are empty, no Certificate is 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: https
  • gateway.parentRefs lists the Gateways and listeners the route attaches to.
  • gateway.tlsEnabled is false. className, port, existingTlsSecret, clusterIssuer, and issuer are 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: none

An empty edge.mode together with ingress.enabled: false has the same result.

Migrating from Ingress to Gateway

  1. Make the Gateway API available: install the custom resources and a GatewayClass, or prepare a shared Gateway that allows routes from the IAM namespace.
  2. Set edge.mode: gateway together with gateway.className (chart-owned) or gateway.parentRefs (customer-owned).
  3. For a chart-owned Gateway, move ingress.tlsEnabled to gateway.tlsEnabled and ingress.existingTlsSecret to gateway.existingTlsSecret. Move the cert-manager annotation by its key:
    • cert-manager.io/cluster-issuer goes to gateway.clusterIssuer. A ClusterIssuer is available in every namespace.
    • cert-manager.io/issuer goes to gateway.issuer. An Issuer exists only in the release namespace.
    • When both annotations are present, keep only gateway.clusterIssuer. The chart ignores gateway.issuer in that case.
    • When neither annotation is present, leave both fields empty. The Gateway then uses gateway.existingTlsSecret, or <release>-auth-gateway-tls when that field is also empty, and renders no Certificate.
  4. For a customer-owned Gateway, set gateway.tlsEnabled to false and leave className, port, existingTlsSecret, clusterIssuer, and issuer empty. TLS and its certificate stay on that Gateway.
  5. Remove ingress.annotations. A non-empty map is invalid in Gateway mode.
Warning

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.

ValueDefault when empty
keycloak.clientUrls.oauthClient.redirectUrishttps://<domain.main>/oauth2/callback
keycloak.clientUrls.oauthClient.webOriginshttps://<domain.main>
keycloak.clientUrls.oauthClient.postLogoutRedirectUrishttps://<domain.main> (auth-gateway logout target)
keycloak.clientUrls.apiServiceAccount.redirectUrishttps://<domain.main>
keycloak.clientUrls.apiServiceAccount.webOriginsnone
keycloak.clientUrls.allowWildcardsfalse
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.

Warning

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.

Warning

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:

ValueChart default
backend.image.repositoryiam-api
frontend.image.repositoryiam-ui
keycloak.image.repositoryiam-keycloak
keycloak.image.providersRepositoryiam-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: IfNotPresent

iam-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

Warning

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).

Note

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

MethodPurpose
extraInlineConfigInject additional resources (clients, roles, groups, users) into existing configuration files
extraConfigurationAdd 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 objects

Complete 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: false

Important Notes

  • No Helm templating: Values are passed as raw YAML. The {{ }} syntax will not be evaluated. Use literal values or compute them before passing to extraInlineConfig.
  • Roles schema: The roles structure must follow Keycloak’s RolesRepresentation format (an object with realm and client keys), 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 serviceAccountsEnabled or bearerOnly may 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-group

Method 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 extraConfiguration becomes 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>.yaml controls 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: false

Example 2: Adding Identity Providers

Warning

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?

FeatureextraInlineConfigextraConfiguration
PurposeExtend existing config filesAdd 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 CaseAdd resources to defaultsComplex configs, overrides, conditionals
Merging BehaviorAppends to arraysStandalone file/realm import
Best ForSimple 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-client and api-service-account URLs belong under keycloak.clientUrls. extraConfiguration does 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 extraConfiguration for 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-cli job 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: 60

A 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.

ParameterDescriptionDefault
existingConfigmapName of the ConfigMap to mount. When set to the default value ({{ .Release.Name }}-permission-mirroring), the chart generates the ConfigMap automatically. When changed to a different name, the chart expects a pre-existing ConfigMap with that name."{{ .Release.Name }}-permission-mirroring"
jsonInline 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.

ValueEffectThe "*" keyA module’s own entryDefault
backend.moduleClientRegistration.disallowedRolesRoles that are never assignedApplies to every moduleIs added to the "*" entry{}
backend.moduleClientRegistration.allowedRolesWhen not empty, only the listed roles are assignedApplies only to modules without their own entryReplaces 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. A resource or module key left out of the entry matches any value, and so does "*". A requested permission without resource or module also matches the entry on that key.
  • manage does not cover view: denying manage still allows view.
  • The context of 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 covers super_admin.
  • manage covers view.
  • A missing module key covers every module. A list of named modules does not cover a request without module.
  • A missing resource key covers only roles without a resource. Use "*" to cover every resource.
  • The context must match the requested context. A "*" in entities or entityGroups covers that axis only, and the other axis must still match. An entry without context covers only requests without context.

Both maps:

  • Role keys are exact: action, resource, and module (Action is not action). An entry without an action or with any other key stops the IAM API from starting. This includes an entry written with role: instead of roles:, which has no action.
  • While either map has an entry, a requested permission with any other role key is rejected.
Warning

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 moduleAllow entry that appliesusers:manageusers:viewclients:managesuper_admin
DataCollection-Moduleits ownassignedassignedrejected, not allowedrejected, disallowed
licensingits own, which would also cover super_adminassignedassignedassignedrejected, disallowed
any other module"*"assignedassigned, because manage covers viewrejected, not allowedrejected, 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.

ValueDescriptionDefault
backend.openTelemetry.serviceNameservice.name of the IAM API"iam-backend"
backend.openTelemetry.traces.endpointOTLP endpoint for traces. Empty disables traces.""
backend.openTelemetry.traces.protocolgrpc or http/protobuf"grpc"
backend.openTelemetry.traces.samplingRatioFraction of traces to sample, from 0 to 1"0.1"
backend.openTelemetry.metrics.endpointOTLP endpoint for metrics. Empty disables metrics.""
backend.openTelemetry.metrics.protocolgrpc or http/protobuf"http/protobuf"
keycloak.openTelemetry.serviceNameservice.name of Keycloak"iam-keycloak"
keycloak.openTelemetry.traces.endpointOTLP collector base URL. Empty disables tracing.""
keycloak.openTelemetry.traces.protocolgrpc or http/protobuf"grpc"
keycloak.openTelemetry.traces.samplingRatioFraction of traces to sample, from 0 to 1"0.1"

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.

Note

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.

values.yaml
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 production

Configuration Parameters

All parameters below are nested under global.smtpServer in values.yaml.

ParameterDescriptionRequiredDefault
fromEmail address used as senderYes-
fromDisplayNameDisplay name for the senderYes-
hostSMTP server hostnameYes-
portSMTP server portYes-
auth.enabledEnable SMTP authenticationNofalse
auth.usernameSMTP username (required if auth enabled)Conditional-
auth.passwordSMTP password (required if auth enabled)Conditional-
starttlsEnable STARTTLSNofalse
sslEnable SSL/TLSNoEnvironment dependent
enabledSend IAM notification emails. When false, the IAM API skips them; Keycloak emails are not affectedNotrue
overrideToSend every IAM notification email to this address instead of the original recipient, for example in test environmentsNo-
subjectPrefixText prepended to the subject of IAM notification emailsNo-
Warning

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 ssl configuration setting
  • Development Environment: Uses the configured ssl setting 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


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.