-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Spring Boot 3.2 app that uses WebFlux, Security, and Actuator may fail to start due to a missing authentication manager #39096
Comments
What version were you using previously?
If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
Edited*, will try to find some time tomorrow to set up something |
Update: Somehow I missed some conditionals so the entire SecurityConfig is not loaded. Then through auto configuration it leads to
What would be the recommended approach to conditionally disable security ? Define a web filter chain with permitAll, or disable some auto configurations ? |
It's hard to say. In your case, |
Created this demo project. |
Thank you. It works in 3.1.x due to the auto-configuration of a It does not work in 3.2.x due to #35338 which means that the This fix made in afad358 doesn't work here due to the auto-configuration ordering. The deny-all authentication manager is auto-configured by Lines 59 to 64 in d032b9d
For the purposes of Actuator security, I think we need to auto-configure a deny-all authentication manager when there's no |
Closed by 6ec56da. |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [nu.ndw.nls.springboot:openapi](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | build | patch | `3.2.6` -> `3.2.8` | | [nu.ndw.nls.springboot:oauth2-client-credentials](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | patch | `3.2.6` -> `3.2.8` | | [nu.ndw.nls.springboot:test](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | test | patch | `3.2.6` -> `3.2.8` | | [nu.ndw.nls.springboot:security](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | patch | `3.2.6` -> `3.2.8` | | [nu.ndw.nls.springboot:messaging](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | patch | `3.2.6` -> `3.2.8` | | [nu.ndw.nls.springboot:datadog](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | patch | `3.2.6` -> `3.2.8` | | [nu.ndw:nls-nwb-data-access-jooq](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | patch | `4.2.5` -> `4.2.6` | | [org.springframework.boot:spring-boot-starter-parent](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | parent | patch | `3.2.1` -> `3.2.2` | --- ### Release Notes <details> <summary>spring-projects/spring-boot (org.springframework.boot:spring-boot-starter-parent)</summary> ### [`v3.2.2`](https://github.com/spring-projects/spring-boot/releases/tag/v3.2.2) [Compare Source](spring-projects/spring-boot@v3.2.1...v3.2.2) #### 🐞 Bug Fixes - SslBundle implementations do not provide useful toString() results [#​39167](spring-projects/spring-boot#39167) - JarEntry.getComment() returns incorrect result from NestedJarFile instances [#​39166](spring-projects/spring-boot#39166) - Mixing PEM and JKS certificate material in server.ssl properties does not work [#​39158](spring-projects/spring-boot#39158) - Having AspectJ and Micrometer on the classpath is not a strong enough signal to enable support for Micrometer observation annotations [#​39128](spring-projects/spring-boot#39128) - Actuator endpoints with no operations that use selectors are not accessible when mapped to / [#​39122](spring-projects/spring-boot#39122) - Spring Boot 3.2 app that uses WebFlux, Security, and Actuator may fail to start due to a missing authentication manager [#​39096](spring-projects/spring-boot#39096) - management.observations.http.server.requests.name no longer has any effect [...
After migration to spring boot 3.2.1 (from 3.1.2) I'm facing the following issue:
Relevant dependencies:
Configuration file:
Codebase remains unchanged, aside from version upgrade.
The text was updated successfully, but these errors were encountered: