Resource server using AuthenticationManagerResolver and disabled anonymous authentication: "An AuthenticationManager is required" #10475
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: declined
A suggestion or change that we don't feel we should currently apply
Describe the bug
When OAuth 2.0 Resource Server support is configured, in combination with disabling anonymous authentication, then
org.springframework.security.access.intercept.AbstractSecurityInterceptor
throwsIllegalArgumentException
with the message "An AuthenticationManager is required".Similar to #8031, but my configuration has
oauth2ResourceServer().authenticationManagerResolver(...)
instead ofoauth2ResourceServer().jwt()
.To Reproduce
Configure
HttpSecurity
similar to below and run the application.Expected behavior
The application should start without requiring an
AuthenticationManager
to be configured.Sample
See cselagea@25931e5.
The text was updated successfully, but these errors were encountered: