JWT Verification Strategies
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| Name | string | Yes | — | Human-readable label. Shown in the JWT Verification Strategy dropdown on the Caller Context configuration panel. |
| Expected Issuer | string | Yes | — | The exact value the token’s iss claim must match. Trailing slash differences cause rejection. |
| Caller identity claim | string | No | sub | The 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 | — | Yes | Remote URL | How 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 URI | URL | When 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 Array | JSON | When 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. |

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
oidfor Microsoft Entra, because Entra gives the same user a differentsubin each application. - A claim other than
subnames different callers thansubwould, 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
401before 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
401with 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
Deleting a strategy immediately breaks any surface whose Caller Context references it. Those surfaces respond to every bearer token request with a 500 server error until a new strategy is assigned, since the missing strategy is a configuration fault rather than a caller credential problem. The dashboard warns before deletion.
Related
- Validate bearer tokens on a surface: step-by-step guide to creating a strategy and attaching it to a surface.
- Use JWT claims to control surface access: write OPA Rego rules that use validated JWT claims as enforcement conditions via
input.source_auth.claims. - Access Point: Access Point field reference, including the Caller Context source authentication options.
- Credentials: conceptual overview of how JWT verification strategies fit the gateway’s credential model.
Glad to hear it. Thanks for letting us know.
Sorry to hear that. Thanks for letting us know.
Still stuck? Ask the community on Discord or contact us.