Skip to content

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.superAdminUsername User granted super admin permissions in the IAM application "admin"
keycloak.adminUsername Initial user created in the Keycloak application realm "admin"
keycloak.adminEmail Email for that initial realm user ""
keycloak.auth.adminUser 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.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.

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.authGateway.ingress.enabled is true; otherwise no edge resource
ingress Ingress
gateway Chart-owned Gateway when gateway.parentRefs 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-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 does not reference a TLS secret. The chart sets route.openshift.io/termination: edge, and the route terminates TLS.
  • 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.

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.clientUrls.oauthClient.redirectUris https://<domain.main>/oauth2/callback
keycloak.clientUrls.oauthClient.webOrigins https://<domain.main>
keycloak.clientUrls.oauthClient.postLogoutRedirectUris https://<domain.main> (auth-gateway logout target)
keycloak.clientUrls.apiServiceAccount.redirectUris https://<domain.main>
keycloak.clientUrls.apiServiceAccount.webOrigins none
keycloak.clientUrls.allowWildcards 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.

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.image.repository iam-api
frontend.image.repository iam-ui
keycloak.image.repository iam-keycloak
keycloak.image.providersRepository 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: 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 / module integration 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. For runtime integration (Hub Integration Messages or API calls), see Module Integration with IAM.

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

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


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 ({{ .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"
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.


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.

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.

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.enabled Enable SMTP authentication No false
auth.username SMTP username (required if auth enabled) Conditional -
auth.password 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 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.