|

JWT Claim Validation Has Three Assumptions. Cloudflare Access Just Tested One.

8 MIN READ
ARCHITECT'S BRIEFExecutive summary for technical decision-makers
Field Notes — Engineering Notes from the Complexity Gap | Rack2Cloud

JWT claim validation is a contract between a token issuer and every service that checks its tokens, and most services never write that contract down. On November 19, Cloudflare’s status page reported that a recent Cloudflare Access release removed the sub claim from service token JWTs, which can cause authentication failures for applications that strictly validate token claims. The change was reverted. The incident tests one assumption that validators make, and there are two more it did not test.

JWT claim validation: three assumptions, with the sub claim missing from a service token
Present, non-empty, context-dependent: the incident tested the first.

What Cloudflare’s Status Page and Docs State

Everything in the table is Cloudflare’s own text or the RFC’s, read on November 21. NOT STATED marks something those pages do not say; it is not a finding that the answer is no. A token consumer’s dependency on its issuer is a cloud architecture strategy question before it is a library setting.

SourceWhat it states
Status incident, November 19, 06:48 to 08:56 UTCA recent Access release removed the sub claim from service token JWTs; applications that strictly validate token claims can see authentication failures. The change was reverted and the fix was rolling out globally at 06:48, implemented and monitored at 08:32, resolved at 08:56.
Application token docs, user tokensub is the user’s ID, unique to an email address per account.
Application token docs, service tokensub contains an empty string. The documented payload also carries type, aud, exp, iss, common_name (the service token’s Client ID) and iat.
Validate JWTs docsCheck the signature, iss against your team domain, aud against your application’s AUD tag, exp and nbf. Cloudflare’s Python example requires exp, iss and aud.
RFC 7519Which claims a JWT must contain to be valid is context dependent and outside the specification. Use of sub is optional and its processing is application specific.
NOT STATEDRelease time, intent, root cause, number of affected accounts or applications, named third-party breakage, the post-release payload, whether any library or framework failed.

Two details frame the JWT claim validation question. Cloudflare’s documentation never lists sub among the claims an origin should require. And for service tokens it documented sub as present and empty, not absent. The status page says the claim was removed; it shows no post-release payload, so this post treats the claim as absent and goes no further.

Three Assumptions Inside JWT Claim Validation

JWT claim validation can rest on three separate assumptions about a claim, and each fails differently. The first is that the claim is present: the key exists in the payload. The second is that it is non-empty: when the key exists, the value means something. The third is that both hold on every authentication path, which depends on how the caller authenticated and on an issuer that can change either answer.

The documentation had already put the second assumption on record. A user token carries a user ID in sub; a service token carries an empty string. A validator requiring a non-empty sub would have rejected every service token before November 19, so the incident did not cause its failures. A validator requiring sub to be present while tolerating an empty value matched the documented behavior until the key went missing. That is the assumption the incident tested. A validator that checks the signature, iss, aud and exp, the set Cloudflare documents, never depended on sub.

That last group is the point. The exposure sat in requirements a consuming team added beyond what the issuer documents. Whether a given service added one deliberately is exactly what a claim contract records, and what JWT claim validation without one leaves unrecorded. This is analysis of the documented behavior; no application’s code was examined.

The third assumption sits underneath the other two. Google’s run-as check, covered in the run-as service account post, has the same shape in a different product: one control, several identity paths, and behavior that differs by path.

The Claim Contract

The JWT claim validation contract is a worksheet with one row per claim your application reads or requires, answered separately for each authentication path. The user-token and service-token columns record what the documentation shows. The last column is the validation rule, which is proposed method, not Cloudflare guidance.

ClaimUser token (docs)Service token (docs)Validation rule (proposed)
issCloudflare Access domain URLSameRequired. Exact match to your team domain.
audArray containing the application’s AUD tagSameRequired. Must contain your application’s AUD tag.
expExpiration timestampSameRequired. Reject expired tokens.
nbfIn the documented payloadNot in the documented payloadEnforce where present. Do not require on the service path.
subUser ID, unique to an email address per accountEmpty stringPresence and meaning differ by path. Require it only where your application uses it, and record the empty case separately.
common_nameNot in the documented payloadClient ID of the service tokenVerify against your own tokens first. Infer no identity semantics beyond the docs.
emailAuthenticated user’s verified emailNot in the documented payloadDo not require on the service path.

Two rows deserve a second look. If an application uses sub as the key for audit records, rate limits or ownership, every service token documented with an empty sub shares one key, so sub cannot tell one service token from another. The docs describe common_name as the service token’s Client ID, which can. Whether your application keys on either is something its row has to say. The Dependency Architecture stage maps identity as one of five dependency classes, and each claim your validator requires is a hard dependency on the issuer’s token shape.

Five sub claim inputs entering one illustrative truthiness check: valid and wrong-type accepted, empty, absent and null rejected
Five different inputs, one check: the number gets in, and three distinct states look the same.

Negative Tests for JWT Claim Validation

Present, empty, absent, null and the wrong type are five different inputs to JWT claim validation. RFC 7519 allows a claim value to be any JSON value and defines sub as a string, so each is a legitimate thing for a validator to meet. A single truthiness check in a common scripting language rejects the empty string, the absent claim and null identically, and accepts a number where a string belongs.

InputExample for subQuestion the test answers
Valid value"sub": "a1b2c3"Does the validator accept the documented user-token shape?
Empty string"sub": ""Does the service path accept the documented service-token shape?
Absentno sub keyIs presence required, and on which path? This is the state the status page describes.
Null"sub": nullIs null treated as absent, as empty or as invalid?
Unexpected type"sub": 12345Is a non-string rejected, coerced or ignored?

Run the matrix for each claim your application reads and each token path, using synthetic tokens signed by a test key against a staging validator pointed at that key. Record the expected outcome for every cell before running it; a cell with no recorded expectation is an assumption nobody examined. Keep the signature, iss, aud and exp checks on in every test. The aim is to know which claims you require and why, not to tolerate missing ones. A claim your contract marks required must fail closed when absent, and a claim it marks optional must not break the request. That is the policy fail mode decision applied to a token claim, made per rule instead of inherited from a library. The same discipline runs through testing MCP policy enforcement: ask the control to do what it is meant to refuse, somewhere that is safe. Re-run the matrix when the issuer’s status page, changelog or token documentation changes.

What This Post Does Not Establish

It does not establish why the release removed the claim, whether that was intended, when it shipped, or how many accounts or applications were affected; the status page gives none of those. It shows no post-release payload, so it treats the claim as absent and nothing more. It names no application or library that failed and examined no application’s code. The documentation pages describe behavior as read on November 21 and can change. Cloudflare’s Python example shows what its documentation demonstrates, not what any deployment requires. And nothing here argues that a validator should accept arbitrary missing claims: Cloudflare states that the origin must validate the token, and that checking only that the header exists is not sufficient.

Architect’s Verdict

JWT claim validation is a contract, and a contract needs both parties to know its terms. Cloudflare Access removed a claim its documentation listed with an empty value and reverted the change. The incident demonstrates how a validator that requires a documented claim’s presence can fail when the issuer changes its payload. The issuer’s documented checks never included sub.

The real problem is that the requirement had no owner. Present, non-empty and path-dependent are three separate assumptions, and a validator that mixes them leaves nobody able to say which claim it depends on or why. Writing the contract per claim and per token path turns each assumption into an explicit decision.

Make JWT claim validation explicit: test the five inputs, keep the checks the issuer documents, and treat any claim you require beyond that set as your own dependency. A claim your validator requires and nobody can explain is a dependency you never agreed to.

Additional Resources

View 1 more resource

Editorial Integrity & Security Protocol

This technical deep-dive adheres to the Rack2Cloud Deterministic Integrity Standard. All benchmarks and security audits are derived from zero-trust validation protocols within our isolated lab environments. No vendor influence.

Last Validated: October 2026   |   Status: Production Verified
RM - Senior Technical Solutions Architect
About The Architect

RM

I’m a Senior Solutions Architect with 25+ years of experience in HCI, cloud strategy, and data resilience. I lead Rack2Cloud, delivering lab-verified guidance for complex enterprise transitions. View Credentials →

>_ The Dispatch

Get the Playbooks Vendors Won’t Publish

Choose the architecture problems you care about. Get field-tested playbooks and frameworks delivered to your inbox.

  • > AI Infrastructure & Inference Economics
  • > Cloud Strategy & Hidden Cost Models
  • > Virtualization & Deterministic Migration
  • > Kubernetes, IaC & Modern Infrastructure
  • > Data Protection & Recovery Engineering
[+] Select My Playbooks

Zero spam. Includes The Dispatch weekly drop.

>_ Architectural Guidance

Need Architectural Guidance?

Independent review before major infrastructure decisions.

  • > Validate assumptions
  • > Identify hidden dependencies
  • > Quantify migration risk
  • > Challenge vendor narratives
>_ Request Triage Session

Triage · Advisory · Fractional · Direct Hire