Skip to content
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

@EnableReactiveMethodSecurity#useAuthorizationManager should be true #12506

Closed
anschnapp opened this issue Jan 9, 2023 · 2 comments
Closed
Assignees
Labels
in: config An issue in spring-security-config type: bug A general bug
Milestone

Comments

@anschnapp
Copy link

anschnapp commented Jan 9, 2023

Describe the bug
In the documentation to migrating a reactive application to spring security 6.0.0 is an issue (or the implementation is wrong)
It describes that the annotation @EnableReactiveMethodSecurity now uses a default value of true for the attribute useAuthorizationManager.

But in the code the default is (still: like in version 5.8) set to false.

Therefore the migration step which is described would result to different (and most properly unwanted) behaviour. So, if someone has set it before to true and now removes the explicit definition then the authorization manager would not be used.

To Reproduce
See in migration documentation first step (for reactive migration):
https://docs.spring.io/spring-security/reference/migration/reactive.html

See code:

Version 6.0.0:
https://github.com/spring-projects/spring-security/blob/6.0.0/config/src/main/java/org/springframework/security/config/annotation/method/configuration/EnableReactiveMethodSecurity.java#L76

Still in version 6.0.1:
https://github.com/spring-projects/spring-security/blob/6.0.1/config/src/main/java/org/springframework/security/config/annotation/method/configuration/EnableReactiveMethodSecurity.java#L76

Expected behavior
Documentation should fit to the implementation (and vice versa)

@anschnapp anschnapp added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Jan 9, 2023
@jzheaux jzheaux self-assigned this Jan 9, 2023
@jzheaux jzheaux added in: config An issue in spring-security-config and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 9, 2023
@jzheaux jzheaux added this to the 6.0.2 milestone Jan 9, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Jan 9, 2023

Thanks, @anschnapp. I believe useAuthorizationManager should be false. We'll take care of this in the next point release.

@anschnapp
Copy link
Author

anschnapp commented Jan 10, 2023

That's great to hear!

For myself i have set this attribute explicit for now, so I don't have any issue currently myself. But as I wrote it could cause issues for people who follow the migration steps; so great that you take care of it in the next point release!

@jzheaux jzheaux changed the title Reactive migration documentation for @EnableReactiveMethodSecurity is wrong (or implementation is wrong) @EnableReactiveMethodSecurity#useAuthorizationManager should be true Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config type: bug A general bug
Projects
Status: Done
Development

No branches or pull requests

2 participants