Temporal Web UI single sign-on with Keycloak

Put the self-hosted Temporal Web UI behind Keycloak with OIDC, then add server-side claim mapping and authorization so API access is controlled too. This page covers the settings, sequence, mapping and failure points.

On this page

Temporal Web UI single sign-on with Keycloak: what the integration does

A platform team running self-hosted Temporal usually needs people to sign in to the Web UI with the identity provider they already use. Keycloak connects to the Web UI through OIDC, configured with the TEMPORAL_AUTH_ENABLED and TEMPORAL_AUTH_TYPE=oidc settings plus the provider, issuer, client ID and client secret values. Keycloak is an open source identity and access management server licensed under Apache 2.0, and it supports OpenID Connect, OAuth 2.0 and SAML 2.0, so the Web UI integration uses a protocol most identity teams already operate. The exact setting names and accepted values should be confirmed against the Temporal Web UI configuration reference for the Web UI version you deploy.

The most important point to plan for is that UI sign-in controls access to the interface only. A user who signs in through Keycloak to the Web UI has not thereby been authorized to make Temporal Service API calls. API authorization is a separate layer that runs on the server, built from a ClaimMapper that maps token or certificate claims to namespace roles and an Authorizer that decides whether each request is allowed. If no Authorizer is configured, the default noopAuthorizer allows every API request, so a team that only enables Web UI login can still leave the API open to any client that can reach the frontend. Treat the two layers as separate work items with separate owners and tests.

Before building, decide which Keycloak realm, client and groups will carry Web UI access, how those groups map to Temporal namespace roles, and who can change either side. Confirm that the Keycloak claims your ClaimMapper will read appear in the tokens you expect, and that the Temporal services sit on networks not reachable from the public internet, as the Temporal self-hosted security guide and deployment guidance recommend. These decisions shape every later step in this page, from client registration to the authorization tests.

What you need before configuring Keycloak and Temporal

Four pieces must be in place before the Web UI sign-in flow works: a self-hosted Temporal Server reachable only on an internal network, a Keycloak realm and client for the Web UI, TLS on both ends, and a persistence store that is a supported production choice. Each card below is a check to complete before you edit any configuration.

Self-hosted Temporal Server and Web UI

Confirm that the Temporal Service and its Web UI run on hosts that are not reachable from the public internet, with network access limited to trusted internal networks. Record the Server version you run and the Web UI version that ships with it, then check the Web UI configuration reference for the settings that match that version. Settings for OIDC sign-in change between releases, so the reference for your version is the source of truth.

Deployment docs

Supported persistence store

Choose a persistence store that Temporal tests for production: PostgreSQL 13 to 16, MySQL 5.7 or 8.0.19 or later, or Cassandra 3.11, 4.0 or 5.0.4 or later. SQLite is meant only for development and testing. Confirm the exact versions your Server release supports in the persistence docs before provisioning, because a database version outside that list is a support question, not a configuration tweak.

Persistence docs

Keycloak realm and Web UI client

Create a dedicated Keycloak realm for Temporal users and a confidential OIDC client for the Web UI. Record the issuer URL, client ID and client secret, which map to the Web UI's provider, issuer, client ID and client secret settings. Keep the realm separate from other applications so that group and role changes for Temporal do not affect unrelated sign-ins. Keycloak's production database must be a supported choice such as PostgreSQL 14 to 18. The dev-file database is for development only and should not carry any shared or production identities.

Keycloak production guide

TLS on both ends

Plan certificates for the Web UI endpoint, the Keycloak endpoint and the Temporal frontend. The browser must reach the Web UI over HTTPS and the Web UI must reach the Keycloak issuer over HTTPS so the OIDC redirects and token checks succeed. Confirm which certificate authority your users and services trust, and whether mTLS is required for internode or frontend traffic, since those are separate settings in the security docs.

Security docs

Authorization design for the Temporal Service

Decide before you start how namespace roles will be granted. The Web UI sign-in only controls who can open the interface. API calls are authorized by a ClaimMapper and an Authorizer on the Temporal Service. If no Authorizer is configured, the default noopAuthorizer allows every API request, so plan the claim-to-role mapping and the Authorizer plugin as part of this rollout, not as a later step.

Keycloak upgrade and update controls

Keycloak plans four minor releases a year, and its Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended upgrades. Decide who approves Keycloak updates, whether schema migration runs automatically at startup or manually through SQL, and how a Keycloak change is tested against the Temporal sign-in flow before it reaches production. Confirm these choices against the upgrading guide for the release you run.

Keycloak upgrading guide

How to configure the Web UI OIDC sign-in step by step

This sequence puts the self-hosted Temporal Web UI behind a Keycloak sign-in, so people authenticate before they reach the interface, and it confirms each stage works before the next one starts.

  1. Confirm the Keycloak realm and discovery endpoint

    Identify or create the Keycloak realm that will hold Temporal operators, and confirm its OpenID Connect discovery document resolves from the network where the Web UI runs. Keycloak publishes this document under the realm's issuer path, and the Web UI needs the issuer value to match it exactly. Check the issuer string in a browser or with an HTTP client from the Web UI host. The step is done when the document loads over HTTPS and the issuer field matches the value you plan to configure. Confirm the Keycloak version and hostname with your identity team before you rely on the exact path.

  2. Create a confidential OIDC client in Keycloak

    In the Keycloak admin console, create an OpenID Connect client for the Web UI with client authentication turned on, so Keycloak issues a client secret. Register the Web UI callback URL as a valid redirect URI, using the exact scheme, host and port that users will reach in the browser. Limit web origins to the same host. Record the client ID and generate the secret, then store the secret in your secrets manager rather than in a file. The step is done when the client appears in the realm with client authentication enabled and the redirect URI saved.

  3. Set the TEMPORAL_AUTH variables for the Web UI

    Set TEMPORAL_AUTH_ENABLED to enable sign-in, and set TEMPORAL_AUTH_TYPE to oidc. Then supply the provider, issuer, client ID and client secret settings described in the Web UI configuration reference, using the values from the Keycloak client and realm. Inject the client secret at runtime from your orchestrator's secret store, for example as an environment variable populated from a Kubernetes Secret or a vault agent, so it does not appear in Helm values, Compose files or Git history. The step is done when the Web UI process reads the settings without a startup error about the provider or issuer.

  4. Keep the client secret out of source control

    Move the client secret out of every file that is committed or templated in plain text, including Docker Compose files, Helm values files and environment files in repositories. Reference the secret by name in the deployment manifest and let the platform supply the value. Scan the repository and the rendered manifests for the secret string before you merge, and rotate the Keycloak client secret if it was ever committed. The step is done when a search of the repository and the rendered deployment returns no secret value, and the Web UI still starts with the secret supplied from the store.

  5. Restart the Web UI and check the sign-in redirect

    Restart the Web UI so it loads the new settings, then open the Web UI address in a clean browser session without an existing Keycloak cookie. An unauthenticated request should be redirected to the Keycloak login page for the configured realm. If the browser shows a redirect error, compare the redirect URI and issuer against the Keycloak client settings. The step is done when the redirect to Keycloak happens and the Web UI does not show any namespace or workflow data before sign-in.

  6. Verify a test login lands on the namespace list

    Sign in with a test user who has an account in the Keycloak realm. After Keycloak returns the user to the Web UI, the namespace list should load. Confirm that the user can see the namespaces the Web UI displays, and that signing out ends the session. Use a test account rather than a personal administrator account. The step is done when the test user reaches the namespace list and the Web UI session ends on sign-out.

  7. Confirm API access is still controlled on the server

    Sign-in to the Web UI does not authorize calls to the Temporal Service, so test an API call made outside the browser, such as a request from the Temporal CLI or an SDK client with no credentials. Without a configured Authorizer, the default noopAuthorizer allows the request, so this check is expected to show the gap. Record the result and plan the ClaimMapper and Authorizer configuration on the server as the next change. The step is done when you have a documented result showing whether unauthenticated API access is still possible.

Why UI sign-in does not authorize Temporal API calls

Signing in to the Temporal Web UI with Keycloak does not decide what any caller may do to the Temporal Service. The OIDC session controls who can open the browser interface. It does not control gRPC calls from SDK clients, workers, the temporal CLI or scripts, because those callers never pass through the browser and never receive the Web UI session. Each of those callers reaches the Frontend service directly, so the Service has to make its own access decision for every request. Teams that treat the Keycloak login as their access control for Temporal have, in effect, protected only one of several entry points.

The default behavior is the risk to plan for. If no Authorizer is configured, self-hosted Temporal uses the default noopAuthorizer, which allows every API request with no authentication or access control. Enabling Web UI sign-in does not change that setting, so an unconfigured cluster can still accept unauthenticated gRPC calls from anywhere that can reach the Frontend. The deployment docs say Temporal services should run on hosts not reachable from the public internet, which limits exposure but does not replace authorization on the internal network.

The server-side pair is a ClaimMapper and an Authorizer plugin. The ClaimMapper turns claims in a JWT or in a client certificate into the identity and namespace roles that the Service recognizes. The Authorizer then decides, for each request, whether those roles may perform the requested operation on the requested namespace. Before building, confirm the exact plugin interfaces, the configuration keys that load them and the claim names your Keycloak tokens will carry in the Temporal self-hosted security documentation. Decide early which Keycloak clients, groups or roles map to which namespace permissions, because that mapping is the policy your auditors will ask to see.

How Keycloak claims map to Temporal namespace roles

This table traces each Keycloak source (realm roles, client roles, groups and service account clients) to the token claim the Temporal ClaimMapper reads and to the namespace role it grants. Read each row as a decision that a named owner must approve, because the Web UI login alone grants no Temporal API permissions. Keep worker and client identities separate from people, and review the mappings whenever teams change.

Keycloak sourceToken claimTemporal role or namespaceWho owns the decision
Keycloak realm role for platform administratorsrealm_access.roles, carried into the access tokenSystem-level administration on the Temporal Service, granted only through the ClaimMapper configurationPlatform team lead with security sign-off
Client role on a team-owned client (for example, orders-team)resource_access.<client>.roles, mapped by the ClaimMapperRead or write role on the namespace that team operatesTeam lead, approved by the platform team
Keycloak group named after a namespace (for example, /temporal/payments)groups claim, if the group mapper is enabled on the clientNamespace role for the matching namespace onlyDirectory or IAM administrator, reviewed with the namespace owner
Service account client for a worker deploymentazp or client_id claim from the client credentials grantWorker role on the namespace and task queues that deployment pollsApplication owner, with a separate client per deployment
Service account client for a client application that starts workflowsazp or client_id claim from the client credentials grantClient role limited to starting and signaling workflows in one namespaceApplication owner, with a separate client per application
Human engineer in an on-call groupgroups claim and the user's own subjectRead-only or limited operator role, with time-bound elevation if your process allows itEngineering manager and security team
Web UI sign-in only (no Temporal role mapped)Valid OIDC session, no Temporal claimsNo API authorization. Sign-in opens the UI, but the Authorizer still denies calls without a mapped roleConfirm with the platform team during design
Unmapped or default usersAny claim not matched by the ClaimMapperNo namespace role. Confirm your Authorizer denies these requests by defaultPlatform team, verified in test cases

Hardening the UI and the server side together

Signing in to the Web UI with Keycloak only controls who reaches the interface. The controls below cover the Temporal Service itself, the Keycloak admin plane and the workflow payloads, so that a successful login does not become the only barrier between users and the platform.

Keep services off the public internet

The Temporal deployment docs say Temporal services should run on hosts that are not reachable from the public internet, with network access restricted to trusted internal networks. Apply this to the frontend, the Web UI and the database and visibility stores. Check it from outside your network, not only from your architecture diagram, and confirm that the Web UI is reached through your internal ingress or VPN rather than a public address.

Deployment docs

Enable mTLS for internode and frontend

Temporal supports mTLS with separate settings for internode traffic between Temporal services and for frontend traffic from clients and workers. Configure both paths deliberately, because a certificate on the Web UI login does not secure service-to-service calls. Ask your team to verify which certificates each path trusts, how they are issued and how they are rotated.

Security docs

Replace the noopAuthorizer first

If no Authorizer is configured, self-hosted Temporal uses the default noopAuthorizer, which allows every API request with no authentication or access control. Pair the ClaimMapper with a real Authorizer before any shared use, and test with a non-admin identity that it is denied the namespaces it should not reach. Sign-in to the Web UI does not replace this step.

Security docs

Restrict Keycloak admin and rotate secrets

The OIDC client secret for the Web UI is a credential that can be copied from configuration files or pipelines. Limit Keycloak administrator roles to a small named group, require separate accounts for administration, and set a rotation procedure for the client secret that updates the Keycloak client and the Web UI settings together. Review admin events on a schedule so that changes to the client or its redirect URIs are visible.

Keycloak admin guide

Treat payload encryption as a separate control

Payload encryption through custom codecs and a codec server is a separate control from sign-in, mTLS and authorization. It protects workflow inputs and results at the data layer, and it does not change who may call the API. Decide early which payloads are sensitive, who holds the key material and whether operators in the Web UI need to see decoded data, and confirm that design with your security team.

Security docs

How a browser login and an SDK API call take different paths

The diagram starts with a person opening the Temporal Web UI in a browser, which redirects them to Keycloak for OIDC sign-in and returns a token to the UI. A separate worker or client calls the Temporal frontend directly with its own token, and that call is judged by the ClaimMapper and Authorizer, not by the UI session. The dashed boundary marks the public edge, so check that the frontend and internal services stay on the trusted network while only the browser path crosses it.

UI sign-in and API authorization are separate checks on separate paths.

Why the redirect loops and API calls still succeed without login

This table lists the failures teams hit when putting the Temporal Web UI behind Keycloak, with the likely cause and the fix for each. Read it when sign-in loops or when API calls succeed without any login, because the two symptoms point to different layers of the setup.

SymptomLikely causeFix
Redirect loop or discovery failure at sign-inThe issuer URL or OIDC discovery endpoint is unreachable from inside the Web UI container, often because it points at a public or localhost address.Set the issuer to a Keycloak address the Web UI container can resolve and reach, then test the discovery document from inside that container before changing anything else.
Keycloak rejects the login with an invalid redirect URI errorThe valid redirect URI on the Keycloak client does not match the callback URL the Web UI sends, including scheme, host, port or path.Copy the callback URL from the Web UI configuration into the client's valid redirect URIs exactly, then retry in a private browser session.
Sign-in fails after the client secret was rotatedThe Web UI still holds the old client secret, or the secret was changed in Keycloak without updating the deployment that reads TEMPORAL_AUTH settings.Update the client secret in your secret store, roll the Web UI pods so they read the new value, and confirm the Keycloak client shows the same secret.
TLS handshake or certificate errors against KeycloakKeycloak is served with a certificate issued by a private CA that the Web UI container does not trust.Add the private CA certificate to the trust store used by the Web UI image or mount it into the container, and confirm the trust with a direct HTTPS request from that container.
Sign-in to the UI works, but API calls succeed with no credentialsNo Authorizer is configured, so the server uses the default noopAuthorizer, which allows every API request. UI sign-in never governs API access on its own.Configure a ClaimMapper and an Authorizer on the Temporal Service, then test that an unauthenticated API call is rejected. The Web UI login alone does not provide this control.
Users sign in but lose namespace access or see no namespacesClaims that the ClaimMapper expects, such as roles or groups, are missing from the token because the Keycloak client scope or protocol mapper does not include them.Add a protocol mapper for the required claim to the client scope used by the Web UI client, request that scope, decode a sample token, and check the claim appears before changing server settings.

Questions teams ask before configuring Keycloak with Temporal

How much effort does Temporal Web UI single sign-on with Keycloak take?

The Keycloak side is a configured client and realm, and the Temporal side is a handful of TEMPORAL_AUTH_* settings, so the Web UI change itself is small. The effort grows with what sits around it: whether Keycloak already runs in production, how many realms and clients your identity team manages, whether you use groups or roles that must map to Temporal namespaces, and how much server-side authorization you add with a ClaimMapper and Authorizer. Ask your implementer to split the quote into the Keycloak client setup, the Web UI settings, the server-side authorization design and the verification plan, since those four parts have different owners and different effort drivers.

Can an internal team set this up alone?

Often yes, if the team already operates Keycloak or another OIDC provider, runs Temporal Server in Kubernetes or on hosts it controls, and has someone who can write the authorization policy. The harder part is not the settings but the design decisions: which claims identify a user, how roles map to namespace permissions, and how service accounts for workers and automation are kept separate from human sign-in. If none of these skills is in-house, a fixed-scope implementation with a written design and a retest is a common alternative. Confirm your team's Keycloak and Temporal experience before deciding.

What does the work need from identity and platform owners?

Plan for three inputs before the build starts:

  • Identity owners: a Keycloak realm or client for Temporal, the claims the token will carry, group or role naming, and who may change those mappings.
  • Platform owners: the Temporal Web UI hostname, TLS termination, network reachability from the browser, and the secret store for the client secret.
  • Security owners: the rules for which roles can read or act on each namespace, and how access is removed when someone leaves.

If these owners are not engaged early, the Web UI may work in a demo and still leave the cluster open to API calls.

How long does it take to verify the setup?

Verification time depends on how many user roles you must test and how many namespaces they reach, not on the single sign-on flow itself. Test four things: a user without a role cannot see restricted namespaces, a user with read-only access cannot start or terminate workflows, a logged-out session is refused, and an API call with a UI-issued token is checked against the Authorizer. Document each case with the expected result. Your implementer or internal team should confirm the duration in writing against the number of roles and environments in scope.

Does UI single sign-on alone secure the Temporal cluster?

No. Web UI sign-in controls who can open the interface, but it does not authorize calls to the Temporal Service. Self-hosted Temporal uses a default noopAuthorizer when none is configured, and that allows every API request with no authentication or access control. A secure setup therefore needs a ClaimMapper that maps JWT or certificate claims to namespace roles, an Authorizer that enforces those roles on API calls, and network controls that keep the frontend off the public internet. Those controls are also what your auditors will ask to see.

Which Keycloak version and upgrade rules should we plan around?

Pin the Keycloak version you test against and record it in your change plan. The current Keycloak release is 26.8.1, published October 13, 2026, and the project plans four minor releases a year, with breaking changes in minor releases opt-in. Keycloak migrates its database schema automatically at startup by default, and manual migration is available for large deployments. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates. Confirm with your identity team which upgrade mode and cadence they will use before the Temporal client configuration is locked in.

Does Temporal Cloud handle this for us instead?

Temporal Cloud includes SAML SSO on its pay-as-you-go plan, according to Temporal's pricing page, and SCIM is listed on its Enterprise and Mission Critical support tiers. That changes who operates the identity integration, but it does not remove the need to design role mapping and access rules for your workflows. If you run self-hosted Temporal for data residency or control reasons, the Keycloak pattern in this page still applies. Ask Temporal Cloud sales to confirm which identity features are included in the plan you are considering.

Keeping Keycloak upgrades and high availability from breaking sign-in

Keycloak is the identity provider behind the Temporal Web UI sign-in, so a Keycloak upgrade or outage can lock operators out of the UI even though the Temporal Service itself keeps running. Plan Keycloak's release cadence as part of this integration. Keycloak has said since version 26.0 that it plans four minor releases a year and a major release every two to three years, and that breaking changes in a minor release will be opt-in. That makes the upgrade cost smaller than it would be otherwise, but opt-in changes still need a review of the realm, client and provider settings used by the temporal-web client before each move. The current release is 26.8.1, published October 13, 2026, according to keycloak.org; confirm the version you deploy against the Keycloak backwards compatibility notes at the time of your rollout, because the release line moves quickly.

Schema handling is the step most likely to block sign-in during an upgrade. Keycloak migrates its database schema automatically at startup by default. For a small deployment that is usually acceptable, but for a large one the upgrading guide suggests applying the SQL manually, so a DBA can review it and schedule it outside the sign-in path. Keep one tested rollback plan per upgrade, and confirm the database is in the supported list for your version: PostgreSQL 14 to 18 is listed in the Keycloak database guide, along with other production options. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates, so that a new Keycloak image does not roll out to the cluster without a person choosing the time.

High availability raises the stakes. Keycloak documents three architectures: a single cluster, optionally spread across availability zones; multi-cluster deployments (v2) without an external Infinispan cluster; and the deprecated multi-cluster v1 that used a separate Infinispan cluster per site. Both supported multi-site designs require a synchronously replicated database, so the database replication design is a decision to make before the Keycloak design is final. Ask your platform team to confirm how the database handles failover and whether the replication mode meets your recovery objectives. Test a sign-in through the Temporal Web UI after each planned failover and each Keycloak upgrade, because a healthy Keycloak cluster does not prove that the Temporal Web UI redirect URIs and client secret still match.

How DeployOpen scopes, delivers and supports this integration

DeployOpen plans and builds the Keycloak sign-in for the self-hosted Temporal Web UI inside your own infrastructure, then pairs it with server-side ClaimMapper and Authorizer settings so interface access and API access are governed separately. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.

How we scope

  • Confirm the Temporal Server version, deployment method and whether Web UI access is in scope for every namespace.
  • Map which Keycloak realm, client and group claims will grant read-only, writer or admin roles in each namespace.
  • Document the Keycloak version, database and high availability design you will run, and who approves operator updates.

How we build

  • Configure the TEMPORAL_AUTH_ENABLED, TEMPORAL_AUTH_TYPE and OIDC provider, issuer, client ID and client secret settings for the Web UI.
  • Implement the ClaimMapper and Authorizer on the Temporal Server so API calls are checked against the same identity claims.
  • Test sign-in, denied access, token expiry and direct API calls with an unauthenticated client to confirm the noopAuthorizer is replaced.

How we hand over

  • Deliver the configuration files, Keycloak client definitions and claim mapping rules in your own version control.
  • Provide a runbook covering role changes, secret rotation, certificate renewal and Keycloak upgrade steps.
  • Walk your security and platform teams through the test evidence so they can review the access model independently.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover re-testing after Temporal Server or Keycloak upgrades, including schema steps called out in release notes.
  • Regular reviews of role assignments and Authorizer behavior can be included in a retainer scope agreed in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.