-
Notifications
You must be signed in to change notification settings - Fork 6k
Add support OAuth 2.0 Step-up Authentication Challenge Protocol #15091
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
Comments
@CrazyParanoid thanks for the issue. Before reviewing the PR, I'm reviewing RFC 9470 and it appears that there is more to that specification than just validating claims. The issue title "Add support OAuth 2.0 Step-up Authentication Challenge Protocol" seems to imply complete support. Do you have any thoughts about supporting other parts of the spec? For example, can anything be added on the client side to handle the challenge response (as mentioned in Section 3) and make challenge parameters available for subsequent requests to the authorization endpoint (as mentioned in Section 4)? Can anything be done with information in the ID token, as mentioned in Section 5? Can anything be configured automatically when additional metadata from the authorization server is returned, as mentioned in Section 7? I wonder if a sample would help identify anything else that's needed for full support? |
Hi @sjohnr. I think this issue should be split into two issues: "Add support Oauth 2.0 Step-up Authentication Challenge Protocol for resource server" and "Add support Oauth 2.0 Step-up Authentication Challenge Protocol for client". This will simplify implementation and review.
There are two cases to consider for the client:
It seems that the first case is easier to implement. In any case, I think this issue is worth dividing. @sjohnr what do you think about that? |
@CrazyParanoid thanks for the additional details!
Eventually I think that might make sense, but I don't think we should do that right away. It's often best to work through the entire spec and understand what the bigger picture would look like while it is captured as a single issue. The main benefit is that community members can weigh in and upvote without needing to find multiple issues. If it were immediately obvious that this feature will be useful to a wide variety of users (in other words, it will almost certainly get used) we could proceed directly to the PR stage, but with cases like this where there is also some design and planning needed I think it is best to wait.
Just a note that configuration properties are a Spring Boot feature and can't be added directly in this project. Further, only core configuration that applies to every (or nearly every) deployment would be good candidates for properties. Currently, I don't see this feature being a clear candidate for that. It is quite easy for users to add their own properties and publish beans with fully configured components.
Agreed, but I wonder whether users would consider the feature complete without the second case? This is an area where I'd like to hear from a few folks who are using (or plan to use) this specification with Spring Security. I would also like to know if there is strong demand for supporting this specification. Regarding the existing PR, I would also say that I think introducing small standalone classes that possibly could be (but are not currently) part of a bigger feature is not ideal, because you are exposing public APIs that may need to change in the future when the encompassing feature actually comes together. When introducing new APIs (public classes and constructors for example), we want to make sure these will work in the larger context of the entire feature. Discovery of these classes is also challenging, and so they may not get used very often. For now, I think it would be best to start by producing a sample that fully implements the Step-up protocol for OAuth2 (client and server). This will help users evaluate this issue and proposed support, as well as help us see the bigger picture. Is that something you'd be interested in working on? If not, we could also ask if someone else would be interested in doing so. |
@sjohnr tanks for your feedback!
I opened this issue for a reason. There is at least this, this, this and this. I think that's enough. All these issues can be solved as part of the work on the OAuth 2.0 Step-up Authentication Challenge Protocol.
Perhaps this makes sense. I can share an example of my client implementation and server resource for keycloak. |
Need to add support OAuth 2.0 Step-up Authentication Challenge Protocol.
Now I use custom validators on the server resource side:
JwtAuthenticationContextClassReferenceValidator
andJwtMaxAgeValidagtor
. I can add it to spring security.The text was updated successfully, but these errors were encountered: