JWT Verification Strategies

Field reference for JWT Verification Strategy configuration, which defines reusable bearer-token validation rules that surfaces reference to authenticate callers.

A JWT Verification Strategy is a named, reusable configuration that tells the gateway which issuer to trust and where to find the public signing keys for bearer token validation. Use this page to manage trusted issuers centrally, so that key rotations and policy changes apply at every surface that references the strategy without requiring surface-level edits.

Overview

Strategies are managed under Credentials → JWT Verification in the dashboard. A strategy stores the trusted issuer URL and the public signing keys: either fetched from a remote JWKS endpoint or stored statically. Surfaces reference a strategy via the Caller Context element’s JWT Bearer configuration rather than holding issuer details directly.

This separation means that multiple surfaces can share the same issuer configuration and be updated centrally when keys rotate. Changing a strategy’s JWKS URI or static keys takes effect on the next inbound request at every surface that references it.

To create a strategy and use it on a surface, follow Validate bearer tokens on a surface. Its first step creates the strategy, and it lists what you need from your identity provider first.

Fields

FieldTypeRequiredDefaultDescription
NamestringYes—Human-readable label. Shown in the JWT Verification Strategy dropdown on the Caller Context configuration panel.
Expected IssuerstringYes—The exact value the token’s iss claim must match. Trailing slash differences cause rejection.
Caller identity claimstringNosubThe token claim whose value names the caller. The gateway uses it to tell callers apart, for example to keep each caller’s delegated credentials separate. Leave it empty to use sub. The field’s hint reads “Leave empty to use sub. Use oid for Microsoft Entra, whose sub differs for each application.” Fixed once the strategy is created: to use another claim, create a new strategy. See Caller identity claim.
JWKS Source—YesRemote URLHow the gateway obtains public signing keys. Select Remote URL to fetch keys from a JWKS endpoint, or Static Keys to provide the keys inline.
JWKS URIURLWhen Remote URL—The JWKS endpoint the gateway fetches keys from. Keys are cached per the server’s Cache-Control header (default 24 h). The dashboard validates the URI as you type (800 ms pause). Saving is blocked until the check passes. Select Check URI to trigger validation manually. A green JWKS URI is reachable and valid message confirms success.
JWK ArrayJSONWhen Static Keys—One or more public keys as a JSON array of JWK objects, stored directly in the strategy. Rotating keys requires updating this field manually.
New JWT Verification Strategy form with a Microsoft Entra v2 issuer as Expected Issuer, Caller identity claim set to oid with its hint below, and JWKS Source Remote URL with a JWKS URI marked reachable and valid.

Caller identity claim

Caller identity claim decides which caller a token stands for. It is what keeps each caller’s delegated credentials and token exchanges apart, so choose it when you create the strategy:

  • Keep the default, sub, for most identity providers.
  • Use oid for Microsoft Entra, because Entra gives the same user a different sub in each application.
  • A claim other than sub names different callers than sub would, even when the two claims hold the same value.

The gateway refuses a claim that describes the token rather than a caller, such as its issuer, audience, client application, session or lifetime. Examples are iss, aud, exp, azp, client_id, scope and sid. A token that lacks the claim, or whose value is not a non-empty string, names no caller.

Give every strategy for one issuer the same Caller identity claim. While two strategies name an issuer’s callers by different claims, the gateway’s token exchange refuses that issuer’s tokens. Saving such a strategy returns a warning, which appears in a toast that stays open until you close it.

Token validation sequence

For each request at a surface that references a strategy:

Read the token

The gateway reads the token from the Authorization: Bearer header.

Load the strategy

The strategy referenced by the surface’s Caller Context element is loaded.

Obtain signing keys

Keys are fetched from the remote JWKS URI and cached, or read from the static JWK array.

Verify the signature

The token signature is verified against the matching key.

Validate claims

The token’s iss must equal the strategy’s Expected Issuer. The token must not be expired, and it must not be used before its nbf (not before) time. The gateway allows 60 seconds of clock difference on both times, so a token whose nbf is more than 60 seconds in the future is refused.

Check audience

If the Caller Context element specifies accepted audiences, the token’s aud claim must contain at least one of them. With authorization server discovery on, the token’s aud must instead be the resource URL the Access Point advertises.

Pass claims to policy

On success, the validated token claims are available to OPA policy evaluation at input.source_auth.claims, with input.source_auth.method set to jwt_bearer.

What happens to a missing or invalid token (wrong signature, expired, not yet valid, wrong issuer, wrong audience) depends on the Access Point’s state:

  • On a closed Access Point, the default for surfaces created from version 1.0.4, the gateway answers 401 before policy runs.
  • On a public or legacy Access Point, the outcome is recorded as input.source_auth.method == "failed", and the surface forwards the request with no caller identity unless a policy explicitly denies it. See OPA policies reference.
  • An MCP Access Point with authorization server discovery on answers 401 with its challenge, whatever its state.

See Access Point readiness. If the remote JWKS endpoint itself is unreachable at request time, that is a server-side fault rather than a caller credential problem, and the request still fails.

Accepted audiences

The Accepted Audiences list is configured on the Caller Context element attached to a surface, not on the strategy itself. A strategy can therefore be shared by surfaces with different audience requirements. Leave the Accepted Audiences list empty on the Caller Context element to accept tokens with any audience.

Deleting a strategy