You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Starting with Spring Security 6.0.0-M7 (used by Spring Boot 3.0.0-M5), calls to permitAll() when configuring ServerHttpSecurity seem to be ignored.
I'm working on preparing a Spring Boot 2.7-based application for Spring Boot 3.
When upgrading from Spring Boot 3.0.0-M4 to 3.0.0-M5, I started to get 401 on APIs that are configured to not require any authorization. The problem remains in Spring Boot 3.0.0-RC1.
To Reproduce
Unzip the attached sample code.
Build and start the server with: ./gradlew clean test bootRun
This is related to #11653.
Now, in addition to @EnableWebFluxSecurity, you also have to add @Configuration to the class in order to make Spring pick it up and define its beans. If you don't add the annotation, Spring Boot will add the default security and all the endpoints will be protected, resulting in 401 for your endpoints.
Before this commit splitting the authorities claim was done by a
hardcoded regex " ". This commit allows to configure to set any regex
to split the authorities claim while keeping the previously
hardcoded regex as a default.
Closesgh-12074
Describe the bug
Starting with Spring Security 6.0.0-M7 (used by Spring Boot 3.0.0-M5), calls to
permitAll()
when configuringServerHttpSecurity
seem to be ignored.I'm working on preparing a Spring Boot 2.7-based application for Spring Boot 3.
When upgrading from Spring Boot 3.0.0-M4 to 3.0.0-M5, I started to get 401 on APIs that are configured to not require any authorization. The problem remains in Spring Boot 3.0.0-RC1.
To Reproduce
Unzip the attached sample code.
Build and start the server with:
./gradlew clean test bootRun
Run the following three curl commands:
Expect them to return:
Change the Spring Boot version in the file
build.gradle
to3.0.0-M5
or3.0.0-RC1
Repeat steps 2 and 3. The responses from the curl commands will now be:
Expected behavior
That the APIs configured to "permit-all" (
/actuator/health
and/api/open
) do not return 401.Sample
product-composite-service.zip
The Security configuration looks like:
The text was updated successfully, but these errors were encountered: