Skip to content

Commit e900ca3

Browse files
committed
Polish Method Security Preparation Steps
- Add instruction to declare 5.8 defaults Issue gh-11337
1 parent b4974bb commit e900ca3

File tree

1 file changed

+38
-7
lines changed

1 file changed

+38
-7
lines changed

docs/modules/ROOT/pages/migration.adoc

+38-7
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,47 @@ xref:reactive/authorization/method.adoc[Method Security] has been xref:reactive/
519519

520520
'''
521521

522+
In Spring Security 5.8, `useAuthorizationManager` was added to {security-api-url}org/springframework/security/config/annotation/method/configuration/EnableReactiveMethodSecurity.html[`@EnableReactiveMethodSecurity`] to allow applications to opt in to ``AuthorizationManager``'s features.
523+
524+
==== Declare the 5.8 default
525+
526+
First, declare the 5.8 default:
527+
528+
====
529+
.Java
530+
[source,java,role="primary"]
531+
----
532+
@EnableReactiveMethodSecurity
533+
----
534+
535+
.Kotlin
536+
[source,kotlin,role="secondary"]
537+
----
538+
@EnableReactiveMethodSecurity
539+
----
540+
====
541+
542+
to:
543+
544+
====
545+
.Java
546+
[source,java,role="primary"]
547+
----
548+
@EnableReactiveMethodSecurity(useAuthorizationManager = false)
549+
----
550+
551+
.Kotlin
552+
[source,kotlin,role="secondary"]
553+
----
554+
@EnableReactiveMethodSecurity(useAuthorizationManager = false)
555+
----
556+
====
557+
558+
This is helpful because, if the remaining preparation steps cannot be taken, you can still upgrade to 6.0 while keeping this feature as-is.
559+
522560
[[reactive-change-to-useauthorizationmanager]]
523561
==== Change `useAuthorizationManager` to `true`
524562

525-
In Spring Security 5.8, `useAuthorizationManager` was added to {security-api-url}org/springframework/security/config/annotation/method/configuration/EnableReactiveMethodSecurity.html[`@EnableReactiveMethodSecurity`] to allow applications to opt-in to ``AuthorizationManager``'s features.
526-
527563
To opt in, change `useAuthorizationManager` to `true` like so:
528564

529565
====
@@ -556,11 +592,6 @@ changes to:
556592
----
557593
====
558594

559-
[NOTE]
560-
=====
561-
In 6.0, `useAuthorizationManager` defaults to `true`.
562-
=====
563-
564595
'''
565596

566597
[[reactive-check-for-annotationconfigurationexceptions]]

0 commit comments

Comments
 (0)