-
Notifications
You must be signed in to change notification settings - Fork 6.1k
AuthorityAuthorizationManager
incorrectly compares GrantedAuthority
#10566
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
Labels
in: core
An issue in spring-security-core
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Comments
Added example. |
When using a custom |
AuthorityAuthorizationManager
incorrectly compares GrantedAuthority
terminux
added a commit
to terminux/spring-security
that referenced
this issue
Dec 8, 2021
marcusdacoregio
pushed a commit
that referenced
this issue
Dec 8, 2021
marcusdacoregio
pushed a commit
that referenced
this issue
Dec 8, 2021
Fixed via #10588 |
Thanks folks. This is now merged into |
marcusdacoregio
pushed a commit
that referenced
this issue
Dec 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: core
An issue in spring-security-core
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Hi, in commit 86c24da there was a slight change in comparison of allowed authorities to endpoints. However in our use case this was huge breaking change.
Lines:
86c24da#diff-8c62a1a24d0860e1da929cdb7cdbf50a8e7daa565fd03f05673299917891f33bR40
86c24da#diff-eb4576063aa24fd635f700152f04a2590973ce56a20899414957e53a2584da74R38
In our Kotlin environment, we implement enum which implements GrantedAuthority and custom Authentication class, when this enum reaches ReactiveAuthorizationManager check method, its compared to SimpleGrantedAuthority (class implementing GrantedAuthority, breaking change from changes above) instead of underlying string authority, which results in non equality and thus denying access to endpoint.
To Reproduce
Expected behavior
Allow access to given endpoint.
Sample
https://github.com/legas1/ss.grantedauthority.demo
Does it make sense or do you need more clarification? Or I am completely wrong about my understanding of upper changes? The solution in my opinion would be to revert those changes or maybe adjust equal method of SimpleGrantedAuthority to count with GrantedAuthority interface.
Cheers, Daniel
The text was updated successfully, but these errors were encountered: