Running into issues with upgrading 3.1.6 project to 3.2.0, using webflux + oauth2-resource-server:
Caused by: java.lang.IllegalArgumentException: authenticationManager cannot be null
at org.springframework.util.Assert.notNull(Assert.java:172)
at org.springframework.security.web.server.authentication.AuthenticationWebFilter.<init>(AuthenticationWebFilter.java:94)
...
Looks very similar to #37504
To reproduce:
- webflux + oauth-resource-server starters - Initializr link
- run
contextLoads() test
Looks like in 3.2 the ReactiveUserDetailsServiceAutoConfiguration backs off because of the @ConditionalOnMissingClass ReactiveOpaqueTokenIntrospector that oauth-resource-server brings along.
In my @SpringBootTests I don't have any resource server configured, I'm expecting it to fall back to the default WebFluxSecurityConfiguration, as it did in 3.1.6
Looking at this, there would be another problem when you have oauth2-login on the classpath, which brings along ClientRepository ?