-
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
authorizeHttpRequests should consider GrantedAuthorityDefaults #13215
Comments
Hi @dmngb, thanks for the report. We will consider adding this to the next minor version since this is a new, optional feature. As you mentioned, you can still get the old behavior by using However, there is nothing in the migration guide that mentions what users should do if they are changing the prefix and migrating to |
@marcusdacoregio, Can I work on this one? |
…ityDefaults for custom rolePrefix Closes spring-projectsgh-13215
Absolutely @kandaguru17, it's yours. |
We use a custom prefix for our roles (e.g. we want roles to be something like MYPREFIX_USER instead of ROLE_USER):
If we define our security filter like below (with deprecated
authorizeRequests
), everything works as expected and the custom prefix is taken into account:If we change our code to use the recommended
authorizeHttpRequests
, then the custom prefix is ignored andROLE_
is used instead:Our workaround is to use something like :
Found in Spring Boot 3.1.0 / Spring Security 6.1.0
The text was updated successfully, but these errors were encountered: