-
Notifications
You must be signed in to change notification settings - Fork 6k
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
JwtDecoders and ClientRegistrations should support RFC 8414 #6500
Comments
Hi @jzheaux |
Certainly, that would be awesome! Please double check the compatibility section of the spec as we'll want to follow it carefully. Let me know where I can help out. |
Hi @jzheaux , I am looking into this issue right now. I read some of
We might have to provide a mechanism to accept both issuer along with configuration i.e. The The Also I noticed that with Also, this the the PR for this go against master or there is a separate Lastly, just to be sure that I start on the right path. Can you provide me with some general (high-level) pointers that you think would help me. Thanks for your time and useful feedback as always 👍 |
@rhamedy Great questions.
Yes, this sounds like a separate ticket, though agreed that RFC 8414 suggests that authorization servers may expose custom endpoints.
We rely on the Nimbus API to parse those fields for us. Anything that isn't yet clearly needed is placed in the
These should be in
I like creating my own branch in my own fork for things like this. I usually call it
|
Hi @jzheaux, I have made some progress with this issue and I wanted to briefly described it here before creating a PR to ensure that I have not invented something new. Assumption: Modifications:
Enum is my way of making the
If I understand correctly, the point of this issue is to come up with a Sorry for so too much details, I might be suffering from Thanks. |
@rhamedy You are correct that My thoughts on the method are that it would just be The rest of what you are saying sounds reasonable, though it will probably become clearer once you submit a PR.
I think it's a good level of detail. :) Writing things down often helps the writer think things through as well. (That's the case with me, anyway.) |
If I understand correctly, the new I will raise a PR next week! Thanks for clarifying my confusions 🙂 |
Correct, This also means that |
I will go with |
Added support for OAuth 2.0 Authorization Server Metadata as per the RFC 8414 specification. Updated the existing implementation of OpenId to comply with the Compatibility Section of RFC 8414 specification. Fixes: spring-projectsgh-6500
@rhamedy thanks for your patience while @rwinch and I did a bit more experimentation around this API and what it might grow into down the road. Let's make a slight adjustment to the two contracts:
The second method is a convenience method, trying numerous strategies to get the configuration metadata. The reason to hit the OIDC endpoint first is because Spring Security OAuth 2.0 Clients are OIDC applications by default and it's the most likely intent of the user, between OIDC and OAuth. We should try OIDC and then legacy OIDC in order to adhere to RFC 8414. And, if folks want to just still hit the legacy endpoint directly (bypassing RFC 8414), they can continue to use Are you okay with moving forward that way? |
Hi @jzheaux I will look into what you are suggesting and come back if I have any questions. If the order |
@rhamedy I suppose you could look at a private method that takes a list of URIs and hits them in sequence. Then As I've played around with the Nimbus API, I found it a bit easier to just use |
Simplifed some of the branching logic in the implementations. Updated the JavaDocs. Simplified some of the test support. Issue: gh-6500
Related to #5543
JwtDecoders
andClientRegistrations
can already retrieve configuration via an OIDC Provider Configuration Endpoint:RFC 8414 defines a metadata endpoint not tied directly to OIDC, meaning that we should not use the OIDC-specific method here but instead introduce a new one.
One possibility is:
This more generic name is important since it may still perform the OIDC call as a compatibility measure in addition to the OAuth 2.0 discovery endpoint.
The text was updated successfully, but these errors were encountered: