Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify retrieving Introspection-specific attributes #8740

Closed
wants to merge 1 commit into from
Closed

Simplify retrieving Introspection-specific attributes #8740

wants to merge 1 commit into from

Conversation

qavid
Copy link
Contributor

@qavid qavid commented Jun 21, 2020

Fixes gh-6489

@qavid qavid changed the title Simplify retrieving Introspection-specific attributes #6489 Simplify retrieving Introspection-specific attributes Jun 21, 2020
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 21, 2020
@jzheaux jzheaux self-assigned this Jun 22, 2020
@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 22, 2020
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @qavid! I've left some feedback inline.

@qavid qavid requested a review from jzheaux July 8, 2020 21:16
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, @qavid! I've left one more comment inline.

@jzheaux jzheaux added this to the 5.4.0-RC1 milestone Jul 8, 2020
@qavid qavid requested a review from jzheaux July 8, 2020 22:36
@jzheaux
Copy link
Contributor

jzheaux commented Jul 9, 2020

Thanks again, @qavid. In preparation for merging, will you please squash your commits and format the commit message?

In order to simplify retrieving of OAuth 2.0 Introspection specific attributes, OAuth2IntrospectionClaimAccessor interface was introduced and also new OAuth2AuthenticatedPrincipal implementing this new interface (OAuth2IntrospectionAuthenticatedPrincipal).

Also DefaultOAuth2AuthenticatedPrincipal was replaced by OAuth2IntrospectionAuthenticatedPrincipal in cases where OAuth 2.0 Introspection is performed (NimbusOpaqueTokenIntrospector, NimbusReactiveOpaqueTokenIntrospector). DefaultOAuth2AuthenticatedPrincipal can be still used by applications that introspected the token without OAuth 2.0 Introspection.

OAuth2IntrospectionAuthenticatedPrincipal will also be used as a default principal in tests where request is post-processed/mutated by OpaqueTokenRequestPostProcessor/OpaqueTokenMutator.

Closes gh-6489
@qavid
Copy link
Contributor Author

qavid commented Jul 9, 2020

I have squashed commits and updated commit message.

Btw,

format the commit message

link is pointing to non-existing document. Same incorrect link is on this wiki page
Correct URL is: https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.adoc (note .adoc suffix instead of .md)

@jzheaux
Copy link
Contributor

jzheaux commented Jul 9, 2020

Thanks, @qavid, I've updated my message as well as my reply template.

@jzheaux
Copy link
Contributor

jzheaux commented Jul 10, 2020

Thanks, @qavid! This is now merged into master via af1c96b. Note that I added a small polish in 221c33f and updated the Opaque Token Sample in 19f0628 to document how the feature works.

@jzheaux jzheaux closed this Jul 10, 2020
@qavid qavid deleted the gh-6489 branch July 16, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify retrieving Introspection-specific attributes
3 participants