-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add Support for Opaque OAuth2 Tokens to Resource Server #6352
Conversation
3830e0b
to
02faaa8
Compare
...auth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2TokenWithClaims.java
Outdated
Show resolved
Hide resolved
...curity/oauth2/server/resource/authentication/IntrospectedOAuth2TokenAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...curity/oauth2/server/resource/authentication/IntrospectedOAuth2TokenAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
0f1fc4d
to
5faa47b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jzheaux. Please see my comments.
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...mework/security/oauth2/server/resource/authentication/OpaqueTokenAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...auth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2TokenWithClaims.java
Outdated
Show resolved
Hide resolved
...curity/oauth2/server/resource/authentication/IntrospectedOAuth2TokenAuthenticationToken.java
Outdated
Show resolved
Hide resolved
@rwinch I've updated to use |
978482f
to
ebadab9
Compare
...config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurer.java
Outdated
Show resolved
Hide resolved
...config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurer.java
Outdated
Show resolved
Hide resolved
.../oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2TokenAccessor.java
Outdated
Show resolved
Hide resolved
...th2resourceserver-opaque/src/main/java/sample/OAuth2ResourceServerSecurityConfiguration.java
Outdated
Show resolved
Hide resolved
oauth2: | ||
resourceserver: | ||
opaque: | ||
introspection-uri: ${mockwebserver.url}/introspect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to ensure we think about if/how this aligns with OAuth2 Log In. Do we support discovery? If an application is supporting oauth2 log in and resource server do we want them to have to configure the client id/secret twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think discovery makes sense through the issuer-uri
once it supports the /.well-known/oauth-authorization-server
endpoint, which defines introspection_endpoint
as an attribute.
As for the client, ideally, the user wouldn't need to specify the same client twice as I imagine that the 95% case is that they are the same. If there is only one client in client registration, it seems reasonable to infer that client is the same for the introspection endpoint.
.../springframework/security/oauth2/server/resource/authentication/IntrospectionClaimNames.java
Outdated
Show resolved
Hide resolved
fe6a7bc
to
a0a08d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzheaux I resolved my previous comments and added a couple new minor ones. This should be it on my end.
...k/security/oauth2/server/resource/authentication/OAuth2IntrospectionAuthenticationToken.java
Outdated
Show resolved
Hide resolved
...ecurity/oauth2/server/resource/authentication/OAuth2IntrospectionAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...ecurity/oauth2/server/resource/authentication/OAuth2IntrospectionAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...ecurity/oauth2/server/resource/authentication/OAuth2IntrospectionAuthenticationProvider.java
Show resolved
Hide resolved
...config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurer.java
Outdated
Show resolved
Hide resolved
89693f0
to
eb80815
Compare
Thanks @jzheaux. Good to go on my end. As an FYI, it's best to not force push while in the review process as it's difficult to keep track of changes between review steps. I would just keep adding commits as you update based on feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. Please feel free to squash, merge, and polish all metadata (labels, milestones, etc).
NOTE: Reactive support is being tracked at #6513
This is now merged into |
No description provided.