-
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
Do not validate parameters in ServerBearerTokenAuthenticationConverter
and DefaultBearerTokenResolver
if not enabled
#16039
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolver.java # oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web/server/authentication/ServerBearerTokenAuthenticationConverter.java # oauth2/oauth2-resource-server/src/test/java/org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolverTests.java
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 @jonah1und1! I have provided some feedback on tests below.
...server/resource/web/server/authentication/ServerBearerTokenAuthenticationConverterTests.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolverTests.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolverTests.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolverTests.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolverTests.java
Outdated
Show resolved
Hide resolved
…tAndNotSupportedThenTokenIsNotResolved()] spring-projectsgh-16038
Thanks for the feedback! |
Thanks for providing updates @jonah1und1! I wanted to let you know an update from my side as well: I spoke with a team member on our approach here to validate parameters up front. I realize I should have done this prior to responding to the original PR, as the feedback I received pointed out an alternative to this approach. The alternative approach is to actually have multiple implementations of
Having the option to do one or the other of these is clearly more flexible, at the expense of requiring user-defined delegation logic. So we would need to provide one of the delegating patterns above as well, and would need to choose which one to provide. In any case, if we took this approach, we would have to go back to the drawing board on this PR. Long story short, I think I'd like to pause on this for a bit and think about it more before deciding how to move forward. We don't want to make a change only to realize it was the wrong change, so I think it best to hold off and not merge anything into the upcoming release. I apologize for any inconvenience, and thank you for contributing what you have so far. Let me know if anything I said doesn't make sense. |
Closes issue: #16038