Skip to content

auth: immediately reject JWTs with mismatched azp or aud claims#1804

Open
jedisct1 wants to merge 3 commits into
mainfrom
fdenis/jwtfix
Open

auth: immediately reject JWTs with mismatched azp or aud claims#1804
jedisct1 wants to merge 3 commits into
mainfrom
fdenis/jwtfix

Conversation

@jedisct1
Copy link
Copy Markdown
Contributor

Change summary

A JWT with the wrong authorized party or audience was previously silently falling through to the token exchange instead of being rejected.

Not critical since signature verification would then fail, but we can return the error directly on mismatch, so we should do it.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

User Impact

None for legitimate users. JWTs minted for a different azp or aud will now be rejected at validation time with a clear error, instead of being passed on to the token exchange step.

Are there any considerations that need to be addressed for release?

No breaking changes.

A JWT with the wrong authorized party or audience was previously
silently falling through to the token exchange instead of being
rejected.

Not critical since signature verification would then fail, but
but we should return the error directly on mismatch.
@jedisct1 jedisct1 requested a review from a team as a code owner May 28, 2026 10:26
@jedisct1 jedisct1 added the Skip-Changelog do not add a changelog entry for this change label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip-Changelog do not add a changelog entry for this change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants