Join our Newsletter — 33% off our NHI Course

JWT aud claim validation: are your service tokens really scoped?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 21730
Topic starter  

TL;DR: Skipping JWT audience validation lets a valid token issued for one service be replayed against another, even when signature, issuer, and expiry checks all pass, according to WorkOS. The control is simple, but the failure mode is structural: trust assumptions break when multi-service tokens are accepted without explicit audience checking.

Editorial analysis by NHI Mgmt Group, based on content published by WorkOS: “How to validate the JWT aud claim and why it matters”.

Key questions

Q: What breaks when JWTs are signed without strict issuer and audience validation?

A: Without issuer and audience validation, a token may be accepted in the wrong application boundary or from the wrong trust context.

Q: Why do JWTs become risky when service boundaries are inconsistent?

A: JWTs become risky when one service validates them properly and another does not.

Q: How can security teams tell whether audience checks are working?

A: Audience checks are working when a token accepted by one service is consistently rejected by another unless that second service is explicitly listed in aud.

Practitioner guidance

  • Enforce explicit audience matching Require every API and backend service to validate aud against its own unique identifier before trusting any other claim.
  • Assign service-specific audience values Use audience strings that identify one service or one clearly bounded API surface, not an organisation name or wildcard domain.
  • Handle string and array audiences Treat aud as either a single value or an array and reject tokens if your service identifier is absent in either form.

Bottom line: Skipping aud validation allows a valid JWT to be replayed across services even when issuer and expiry checks succeed.

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 4 days ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 5 months ago
Posts: 21566
 

Audience validation is a recipient-boundary control, not a JWT nicety: The aud claim is what stops a valid token from becoming portable across services. Signature checks only confirm origin, while audience checks confirm destination, and those are different security questions. In modern API estates, that distinction is the difference between contained access and cross-service replay.

A question worth separating out:

Q: What is the difference between the iss and aud claims in a JWT?

A: The iss claim identifies who issued the token, while the aud claim identifies who the token is meant for. In practice, both checks matter because one confirms the source of trust and the other confirms the intended recipient. A valid issuer does not make a token usable everywhere, and audience validation prevents a legitimate token from being accepted in the wrong place.

👉 Read our full editorial: JWT audience validation failures create replay risk across services


This post was modified 4 days ago by NHI Mgmt Group

   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.