Relax client_id validation in AtJwtBuilder#18890
Open
gbaso wants to merge 1 commit intospring-projects:mainfrom
Open
Relax client_id validation in AtJwtBuilder#18890gbaso wants to merge 1 commit intospring-projects:mainfrom
gbaso wants to merge 1 commit intospring-projects:mainfrom
Conversation
RFC 9068 requires that access token JWTs include the `client_id` claim, but it does not require resource servers to validate it against a specific value. Relates to spring-projectsgh-18381 Signed-off-by: Giacomo Baso <gbaso@users.noreply.github.com>
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.
AtJwtBuildercurrently requires configuring a specificclient_idvalue, and tokens that containing a differentclient_idare rejected. As discussed in #18381 (comment), this is a stronger requirement than that specified in RFC 9068, which only requires that aclient_idclaim is present.In scenarios like the
client_credentialsgrant type, multiple clients may obtain tokens from the same issuer and call the same resource server. In these cases, the resource server may not even know all possibleclient_idvalues in advance.This change relaxes the default behavior of
AtJwtBuilderso that it validates only the presence of theclient_idclaim. A specific value can still be required by callingAtJwtBuilder#clientId(...), just as before.Relates to gh-18381