require azp when oidc id token has multiple audiences#3166
Closed
dxbjavid wants to merge 1 commit into
Closed
Conversation
Contributor
|
I don't see the claim in https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation that "requires azp to be present once a token lists more than one audience" - can you point me to the exact text please? |
Contributor
Author
|
You're right, that's on me. The wording I had in mind, "If the ID Token contains multiple audiences, the Client SHOULD verify that an azp Claim is present," is step 4 in the original Core 1.0 and in errata1, but errata set 2 (the version you linked) dropped it and replaced it with the weaker "validate the azp value as specified by those extensions" text. So the current spec doesn't require it the way I framed here. I'll close this one. Thanks for checking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed OidcClaimsValidator only checks the azp claim when it is present. A multi-audience ID token that omits azp is accepted as long as the aud array contains the client id, so a token minted for a different relying party can be replayed here. OIDC Core 3.1.3.7 requires azp to be present once a token lists more than one audience; this rejects that case while leaving single-audience tokens unchanged.