Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
This commit is contained in:
@@ -2265,7 +2265,7 @@ For more about Spring Security, see the {spring-security}[Spring Security projec
|
||||
|
||||
[[howto-switch-off-spring-boot-security-configuration]]
|
||||
=== Switch off the Spring Boot Security Configuration
|
||||
If you define a `@Configuration` with a `WebSecurityConfigurerAdapter` in your application, it switches off the default webapp security settings in Spring Boot.
|
||||
If you define a `@Configuration` with a `WebSecurityConfigurerAdapter` or a `SecurityFilterChain` bean in your application, it switches off the default webapp security settings in Spring Boot.
|
||||
|
||||
|
||||
[[howto-change-the-user-details-service-and-add-user-accounts]]
|
||||
|
||||
@@ -3656,8 +3656,8 @@ You can register multiple relying parties under the `spring.security.saml2.relyi
|
||||
For security purposes, all actuators other than `/health` and `/info` are disabled by default.
|
||||
The configprop:management.endpoints.web.exposure.include[] property can be used to enable the actuators.
|
||||
|
||||
If Spring Security is on the classpath and no other WebSecurityConfigurerAdapter is present, all actuators other than `/health` and `/info` are secured by Spring Boot auto-configuration.
|
||||
If you define a custom `WebSecurityConfigurerAdapter`, Spring Boot auto-configuration will back off and you will be in full control of actuator access rules.
|
||||
If Spring Security is on the classpath and no other `WebSecurityConfigurerAdapter` or `SecurityFilterChain` bean is present, all actuators other than `/health` and `/info` are secured by Spring Boot auto-configuration.
|
||||
If you define a custom `WebSecurityConfigurerAdapter` or `SecurityFilterChain` bean, Spring Boot auto-configuration will back off and you will be in full control of actuator access rules.
|
||||
|
||||
NOTE: Before setting the `management.endpoints.web.exposure.include`, ensure that the exposed actuators do not contain sensitive information and/or are secured by placing them behind a firewall or by something like Spring Security.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user