Temporal Authorizer and ClaimMapper with JWT

Self-hosted Temporal allows every API request until you configure an Authorizer. This page explains how a ClaimMapper and JWT plugin turn identity claims into namespace roles, and how to test each role.

On this page

Why self-hosted Temporal needs an Authorizer before anything goes live

A self-hosted Temporal Service with no Authorizer configured runs the default noopAuthorizer, which allows every API request with no authentication or access control. Anyone who can reach the frontend can start, signal, reset or terminate workflows in any namespace, and workers that connect with no credentials are trusted the same way. The ClaimMapper and Authorizer pair replaces that default: the ClaimMapper turns the identity in each request, carried as JWT or certificate claims, into a set of namespace roles, and the Authorizer decides whether those roles permit the requested API call. Until both are configured and tested, the cluster should not hold data or serve workers that matter to you.

Teams usually need this before go-live rather than after, and the trigger is not the size of the cluster alone. Regulated data, a shared cluster that several products use, or more than one team or environment writing to the same Service all make an open API a finding waiting to happen. The Temporal self-hosted security documentation describes the controls in this area, and your own review should confirm which of them your version and deployment method support. Ask your platform team who can reach the frontend today, and whether any worker or operator credential is shared across environments.

This page covers how to replace the default with a ClaimMapper and Authorizer, how the default JWT plugin maps claims to roles, how to scope roles to namespaces, and how to test that each role can do exactly what it should and nothing more. Decisions about which identity provider issues the tokens, and how workers and operators obtain them, shape the rest of the build, so they are worth settling before the configuration starts. The sections that follow take these in order.

How a Temporal API request is authenticated and authorized

The diagram starts with a worker or client sending a gRPC request that carries a JWT or client certificate to the Temporal frontend, the trust boundary where authentication and authorization happen. The ClaimMapper turns the token or certificate claims into roles and namespace permissions, and the Authorizer returns allow or deny. Only allowed requests reach the internal history, matching and worker services. Check that the identity provider, claim names and namespace mappings match what your Authorizer expects before you test.

Authentication and authorization happen at the frontend before any internal service handles a request.

Which ClaimMapper and Authorizer options fit which environment

This table compares four ways to control API access in self-hosted Temporal: the default noopAuthorizer, the JWT-based ClaimMapper and Authorizer plugin, certificate-claim mapping, and a custom Go build. Read each row against your identity provider, your namespace layout and the team that will maintain the setup. The main takeaway is that anything other than the default requires you to decide who is trusted and how claims become namespace roles before go-live.

OptionIdentity trustedRole to namespace mappingOperational effort and fit
noopAuthorizer (default)Nothing. Every API request is allowed without authentication or access controlNot applicable, so every caller has full access to every namespaceZero setup. Acceptable only for local development or a lab that is not reachable from other networks; not suitable for regulated production
JWT ClaimMapper and Authorizer pluginTokens signed by an identity provider whose keys and issuer you configureClaims in the token are read by the ClaimMapper and matched to namespace roles you defineModerate. Requires an OIDC or JWT issuer, claim design and role tests; fits most teams already running a central identity provider
Certificate claim mappingClient certificates issued by your internal certificate authority, validated through mTLSCertificate subject or attributes are mapped to namespace roles, so access follows certificate issuanceModerate to high. Needs a certificate lifecycle, rotation and revocation process; fits workers and services with machine identities
Custom ClaimMapper or Authorizer in GoWhatever your code validates, such as an internal token service or a legacy directoryDefined in your Go code, so any rule your organization can express is possibleHigh. You own the code, its tests, upgrades across Temporal Server versions and its security review; fit only when the standard plugin cannot express your rules

How to configure the ClaimMapper and Authorizer step by step

This sequence replaces Temporal's allow-all default with identity-based access, so each team's identities can reach only the namespaces and actions their role allows. Each step closes with a check you can run before moving on.

  1. Define namespaces and the roles each team needs

    Work with the platform owner and each consuming team to list the namespaces they will use, such as one per environment and service, and the actions each role needs in each one, for example starting workflows, reading histories or operating workers. Keep roles narrow and write them down in a table that security and the team leads both sign off. Done means every namespace has a named owner and every role has a list of permitted operations that nobody disputes. Confirm the exact role and permission names your Authorizer expects in the Temporal self-hosted security documentation before you write them into configuration.

  2. Choose the identity source and its signing keys

    Select the identity provider that will issue tokens for workers, clients and operators, and confirm it can issue JWTs with the claims your role table needs. Record the issuer URL, the audience value the frontend will expect, and where the public signing keys are published. Your security team should confirm who controls the signing keys, how they rotate, and how a compromised key is revoked. Done means you can fetch the public keys from the issuer and decode a sample token that carries the claims you plan to map.

  3. Configure the ClaimMapper to map claims to roles

    Set the ClaimMapper on the Temporal frontend so it reads the issuer's claims and converts them into system and namespace roles. Map each claim value you chose in the first two steps to exactly one namespace role, and avoid any mapping that grants system-wide admin to a group that only needs one namespace. Keep the configuration in version control and review it like code. Done means a token from a test identity produces the expected role set when you run the mapper against it, and a token with an unmapped claim produces no roles.

  4. Enable the Authorizer and set its policy

    Replace the default noopAuthorizer, which allows every API request, with the Authorizer you selected and point it at the role-to-permission rules from step one. Restart or roll the frontend in a controlled window so every service picks up the change, and make sure the internal services that talk to the frontend are configured with the authority they need so internal calls are not blocked. Done means the server starts cleanly with the Authorizer active, and the server logs or status show that the default allow-all policy is no longer in effect.

  5. Restrict the frontend network path

    Confirm that the frontend is reachable only from the networks where workers, clients and the Web UI run, and that the database and internal services are not reachable from the public internet, as the self-hosted deployment guidance recommends. Check the path from a host outside the approved network and confirm the connection fails. Done means an external test host cannot open a connection to the frontend port, and an approved worker host can, so the Authorizer is not the only barrier between an outside caller and the API.

  6. Verify that unauthorized calls are denied

    Write a test set that runs before every release. Include calls with no token, an expired or wrongly signed token, a token from an unknown issuer, and a valid token for a role that lacks the permission being tested, such as a worker identity starting a workflow in another team's namespace. Each of these should return an authorization error, and each permitted call from the matching role should succeed. Done means every denied case fails as expected and every allowed case passes, and the results are saved as evidence for reviewers.

  7. Document the permission matrix and schedule re-tests

    Publish the final role-to-permission matrix, the mapping rules and the test results in the operations runbook, with the owner of each identity source and the process for granting or removing roles. Add the permission tests to the upgrade checklist, because server upgrades can change configuration defaults and authorization behavior should be retested after each one. Done means a new team member can find the matrix and the tests in one place, and the upgrade process requires the authorization tests to pass before the change is accepted.

How JWT and certificate claims become namespace roles

The ClaimMapper is the component that turns an identity into permissions, so the design of your claims determines how well namespace boundaries hold. When a request arrives, the ClaimMapper reads the identity values carried by the JWT or the client certificate, such as the subject, the audience, group membership or certificate attributes, and converts them into Temporal roles. Roles exist at two levels: system-level roles that apply across the cluster, and namespace-level roles that apply to a single namespace. Your first design task is to list which identity values you can trust, which system you issue them from, and which of them will be the basis for each role. Confirm the exact claim field names the default JWT plugin reads, and the configuration keys that point it at your key set and audience, against the current self-hosted security documentation before you write any mapping rules, because these details change between releases.

Coarse roles are simpler to operate: one group grants read access to every namespace, or one administrator role covers the whole cluster. Per-namespace roles require a group or claim for each team and environment pair, so the identity provider grows with the number of namespaces, but a stolen or misused credential reaches only the namespaces it was granted. For regulated workloads, most teams end up with a small set of cluster-level operators and per-namespace roles for application teams. Namespace scoping is only as strong as the claim design: if a group can be self-assigned, if a service account carries a broad group, or if the audience check is missing, the ClaimMapper will faithfully grant access that the namespace model was meant to prevent. Treat the claim contract as a security control, review it when teams change, and test it with one token per role, as the testing section of this page describes.

How to test permissions for each role before production

The platform admin role is the most sensitive grant, because it can reach cluster-level and namespace-level operations across the deployment. Tests for this role confirm that the mapped claims reach the intended system-level permissions and nothing narrower or broader. Run these tests in a non-production cluster that uses the same ClaimMapper and Authorizer configuration as production, so that the results describe the real decision path rather than a simplified copy.

  • Allowed operations: Confirm that the admin identity can create and describe namespaces, and can change namespace configuration through the operator tooling you have approved.
  • Denied operations: Confirm that an admin token issued for one environment cannot act on another environment's cluster or endpoint.
  • Web UI actions: Sign in through your OIDC single sign-on flow and check which namespaces appear and which administrative pages load.
  • CLI actions: Run the same namespace listing and describe commands from an admin token and from a developer token, and record both outputs.
  • Evidence: Store the token claims, the commands run and the results in the test record.

Confirm with your own environment which operations your admin role must perform, and treat every other operation as a denied test case.

Security risks in ClaimMapper and Authorizer design

Replacing the allow-all default is the first step, but a ClaimMapper and Authorizer that trust the wrong tokens, grant broad roles or share worker identities can leave the same gaps in place. The cards below pair each risk with a control you can check before go-live.

Tokens from untrusted issuers

The ClaimMapper decides which claims count, so it must only accept JWTs signed by the identity provider you chose. Confirm the configured issuer, audience and signing keys match that provider, and test that a token from another issuer, or one with a forged audience, is rejected. Because the default noopAuthorizer allows every request, a missing or permissive mapper fails silently unless you test for it.

Security docs

Over-broad roles granting admin

Mapping a broad group claim, such as all employees or every engineer, to an admin role gives those users rights to change namespaces and workflows they should not touch. Map each claim to the least role per namespace, and keep admin roles to a short list of named platform owners. Review the group-to-role mapping whenever identity groups change.

Workers sharing one identity

If every worker uses one credential across namespaces, a compromised worker can read and act on workflows in environments it should never reach. Issue a separate identity per service and namespace, with worker permissions limited to the task queues it polls. Test that a worker token for one namespace is refused in another.

Frontend exposed beyond trusted networks

Authorization does not replace network controls. Temporal services should run on hosts not reachable from the public internet, with access restricted to trusted internal networks. Confirm the frontend is reachable only from worker and client networks, and verify this from outside those networks during a test.

Deployment docs

Signing key rotation for tokens

Signing keys for JWTs need a rotation plan that does not lock out legitimate users or leave old keys trusted indefinitely. Document how the identity provider publishes new keys, how the ClaimMapper picks them up, and when retired keys stop working. Rehearse a rotation in a non-production namespace before relying on it.

Audit logging of allowed and denied requests

Without logs of both allowed and denied calls, you cannot tell whether a role is too broad or whether someone probed the API. Confirm your deployment records authorization decisions with subject, namespace and operation, and ship those logs to a store your security team controls. Review denied requests for patterns, not only incidents.

What buyers ask before configuring Temporal authorization

How much effort does replacing the Temporal allow-all default take?

The effort depends mostly on how many identity sources, namespaces and roles you need, and on whether the default JWT plugin covers your token format without changes. Replacing the default noopAuthorizer is a configuration change on the server, but the real work is deciding who may do what in each namespace, mapping your identity provider's claims onto those decisions, and proving the result with tests. A small, single-namespace setup with one identity provider is far smaller than a multi-team deployment with separate production and staging namespaces, each with its own roles. Ask any partner to break the quote into identity mapping, namespace and role design, custom Authorizer work if needed, and permission testing.

Can our platform team configure ClaimMapper and Authorizer in-house?

Yes, many platform teams can do the configuration themselves if they already operate an identity provider and understand how Temporal namespaces and workers connect. The harder parts are usually outside the config file: agreeing on role definitions with application owners, handling tokens that carry inconsistent claims, and writing tests that show a worker identity cannot reach a namespace it should not use. If your team has no experience with OIDC claims or gRPC authentication, a fixed-scope engagement with a partner can cover design, implementation and a written test result, and your team keeps the knowledge to maintain it.

What do we need to provide before the work starts?

You will need administrative or read access to the identity provider that issues tokens, a list of the namespaces and environments in scope, and named owners who can approve role definitions. A test environment that mirrors production identity settings is important, because permission tests run against real token issuance and claim contents. You also need a decision on whether workers authenticate with JWTs or client certificates, since the ClaimMapper handles both. Confirm these items in writing before any scope is agreed, because missing identity access is one of the most common causes of delay.

How do we verify that permissions work for each role?

Verification means testing each role against each namespace with tokens that represent real identities, and confirming that allowed calls succeed while denied calls fail with the expected error. Build a matrix of roles, namespaces and operations, such as starting workflows, querying histories, signaling and administrative calls, then run those checks in a test environment after every configuration change. Keep the results as evidence for your security review. Testing also should cover expired tokens, missing claims and tokens issued for a different audience, because those are the cases where misconfigured mappings usually leak access.

What changes after go-live, and what recurs?

Role definitions change as teams and services change, so each new namespace, worker identity or identity provider change requires a review of the mapping and a rerun of the permission matrix. Identity provider changes, such as renamed claims or new token issuers, are a frequent source of breakage and should be part of your change process. Server upgrades also need a check that authorization behavior still matches your tests. Ask a partner whether post-delivery retesting and upgrade support are included in the quote or offered as a separate retainer.

Does a custom Authorizer add significant cost?

A custom Authorizer adds cost only when the default JWT-based authorization cannot express your access rules, for example when permissions depend on data outside the token. Building one means writing code, testing it, and maintaining it through Temporal server upgrades, so it is a larger and recurring cost. Before commissioning one, confirm that the ClaimMapper and default JWT plugin cannot meet the requirement with namespace roles. This decision should be written into the scope so that the quote reflects the actual design rather than an assumption.

What should a partner's quote include for this work?

A useful quote lists the identity sources in scope, the number of namespaces and roles to design, whether a custom Authorizer is needed, the test environment you will provide, and the set of permission tests that will run. It should state the deliverables, such as configuration, a role matrix, test scripts and a findings report, along with what is excluded, such as ongoing identity administration. Because DeployOpen works on fixed scope agreed in writing, ask each bidder to tie its price to these items and to explain what would trigger a change request.

How DeployOpen scopes Temporal authorization work

DeployOpen scopes Temporal authorization work as a fixed-scope engagement, with the namespace and role model agreed in writing before any configuration changes are made. The first stage is a design workshop with your security, platform and workflow owners. In it, the team lists which namespaces exist (typically by environment and service), which identities call the frontend (human operators, workers, the Web UI, CI pipelines), and which roles each identity needs in each namespace. The output is a written role matrix that names the claims the ClaimMapper will read, the roles it will emit, and the operations each role may perform. Confirm early which identity provider issues your tokens and which claim names it uses, because those names drive the rest of the build.

During implementation, DeployOpen works in your infrastructure, with your identity provider, your secrets handling and your change process. The work covers a custom ClaimMapper that turns JWT or certificate claims into namespace roles, an Authorizer that enforces those roles on each API request, and test coverage that shows every role can do what it should and nothing more. Permission tests run per role against a non-production cluster, and the results, configuration files and known gaps are delivered as a document with the agreed deliverables. The deliverables also list what your team must provide, such as test identities, a staging environment and a named approver for the role matrix.

DeployOpen prepares controls and evidence that your compliance or audit team can review, such as the role matrix, test results and configuration records. It does not issue audit reports, attestations or certifications. Those come from the independent auditor or certification body your organization uses, and you should confirm early with that party which evidence format it accepts. Ongoing changes to roles after go-live can be handled through a separate scope or a retainer, so ask for that split to be written into the quote.

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.