-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implement OpenID client registration endpoint #189
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
Conversation
Hi @jgrandja . Happy New Year! I opened a draft PR as I still have to finish the unit tests, javadoc and some polishing to double check that I did not missed anything. The implementation should be more or less ready and I think it would be a good to have a fast feedback. Looking forward to your comments :) |
Happy new year @ovidiupopa91 ! I hope you had a great holiday break :) I took a quick glance at the changes and it looks good to me - it follows the implementation patterns of The one minor thing I noticed in I also noticed that the build is failing but I'm guessing because this is a draft anyway and you're aware of it. Just a heads up that I likely won't be doing a detailed review for at least 2 weeks as I'm trying to ramp up on a couple of higher priority items for 0.1.0 release later this month. This will likely get merged into 0.1.1. Thanks for your work! |
The PR build failures are all due to the same issues:
|
Yep, I am aware that the build is failing. There are two issues (copyright and a whitespace). I will fix both of them with the next push. |
Hi @ovidiupopa91 ! Glad to see you are working on this. I think it would be cool if this functionality were enabled/disabled via configuration. I can see cases where the owner of the authorization server might not want to allow new client registration via this endpoint. |
@joshuatcasey The default configuration will NOT enable the registration endpoint. You have to opt-in via custom configuration. This will reside in |
fce99ea
to
8c28a18
Compare
b3514ef
to
8f8b15e
Compare
b22a2da
to
f520dc8
Compare
@ovidiupopa91 I'm finally circling back to this now! FYI, I updated the main issue #57 comment with requirements for the "Initial Access Token". Let me know if you have any questions. |
hi @jgrandja. Only one thing that is not very clear to me: (initial) access token that was obtained using the client_credentials grant. This means that when calling the token endpoint (client_credentials grant_type), |
@ovidiupopa91
Correct. An existing registered client will obtain an access token via the |
hi @jgrandja I will try yo wrap everything up today (convert the PR from draft to ready for review) |
@ovidiupopa91
No, there is no need to create a new We just need to ensure that As well, in http
...
.authorizeRequests(authorizeRequests ->
authorizeRequests
.antMatchers("/connect/register").access("hasAuthority('SCOPE_client.create')")
.anyRequest().authenticated()
)
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt)
... We will need to take into account that the Client Registration endpoint URI may be customized via |
@jgrandja awesome this is how I did it. But I had second thoughts right at the end and wanted to check with you that I am not missing anything. Thank you. |
Excellent @ovidiupopa91 ! |
@jgrandja I was quite busy in the last couple of days -> had not time to finish the PR. After it's used, the access token must be invalidated, as it can be used only once. There's one small issue here. It's not possible to call |
@ovidiupopa91 No rush. I'm quite back logged anyway.
For now, just duplicate the logic in the |
@ovidiupopa91 Just a reminder to let me know when this is ready for review. Thanks! UPDATE: I just saw that you marked it for review. I will start it first thing tomorrow. |
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.
Thanks for the PR @ovidiupopa91 ! Please see review comments.
...rc/main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimNames.java
Show resolved
Hide resolved
...main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimAccessor.java
Show resolved
Hide resolved
...main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimAccessor.java
Outdated
Show resolved
Hide resolved
...main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimAccessor.java
Show resolved
Hide resolved
...main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimAccessor.java
Outdated
Show resolved
Hide resolved
...work/security/oauth2/server/authorization/oidc/web/OidcClientRegistrationEndpointFilter.java
Show resolved
Hide resolved
...work/security/oauth2/server/authorization/oidc/web/OidcClientRegistrationEndpointFilter.java
Outdated
Show resolved
Hide resolved
...work/security/oauth2/server/authorization/oidc/web/OidcClientRegistrationEndpointFilter.java
Outdated
Show resolved
Hide resolved
...security/oauth2/server/authorization/oidc/web/OidcClientRegistrationEndpointFilterTests.java
Outdated
Show resolved
Hide resolved
...nnotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationCodeGrantTests.java
Outdated
Show resolved
Hide resolved
Hi @jgrandja. This is now ready for a new round of review. Looking forward to the next comments 👍 |
296e12a
to
fdaa269
Compare
@ovidiupopa91 Apologies for the delay in the review. I'll be circling back to this later this week. |
Thanks for all the work on this feature @ovidiupopa91. This is now merged! FYI, I needed to move some of the logic in the Please let me know if you have any questions. |
Hi there @jgrandja. It looks a lot better after the polish commit. I have only one question. I noticed that you removed the Also let me know if there is any other feature that I could start looking at. Thanks! |
@ovidiupopa91 The next release will be focusing on some of the items in #139 and this is where the equivalent of I'm going to plan out the features for |
@ovidiupopa91 Would you be interested in gh-245? If not, I can find another one. |
Hi @jgrandja . Sure, I will take a look at that one. |
Thanks @ovidiupopa91. Can you please respond in that issue asking for it so I can assign it to you. |
See: https://openid.net/specs/openid-connect-registration-1_0.html#ClientRegistration
Fixes gh-57