-
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
ReactiveManagementWebSecurityAutoConfiguration does not back off when oauth2 client configuration present #17949
Comments
@jgrandja Does this also apply to |
@philwebb I believe the main issue is with If you look at I believe the only fix required here is to add the following code to @Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
return http
.authorizeExchange()
.anyExchange().authenticated()
.and()
.oauth2Login()
.and()
.oauth2Client()
.and()
.build();
} What are your thoughts? |
@jgrandja Instead of duplicating what WebFluxSecurityConfiguration.springSecurityFilterChain() does, I think we can annotate |
@mbhave Annotating |
I had an attempt at fixing this in https://github.com/philwebb/spring-boot/tree/gh-17949 but it doesn't feel quite right. Specifically we're now pretty much duplicating I have a feeling that the problem does actually lie in I also wonder if we need something in |
I think the servlet setup is slightly different as you explicitly need to configure The main reason the separate management configurations exist, is for the health and info endpoints. With the default security configuration, we wanted these endpoints to be accessible without authenticating. When OAuth is added to the classpath we secure everything via OAuth, including the health and info endpoints (this was the plan for the reactive case as well but it doesn't behave this way because of this bug). Whether the change needs to be in I'm in favor of having everything secured by OAuth once OAuth is added to the classpath without making an exception for the |
ReactiveManagementWebSecurityAutoConfiguration
does not configureoauth2Login()
even whenspring-security-oauth2-client
is in classpath and properties have been configured. It only configureshttpBasic()
andformLogin()
for all cases.The configuration logic should follow the default configuration for
SecurityWebFilterChain
inWebFluxSecurityConfiguration.springSecurityFilterChain()
.Related spring-security#6314
The text was updated successfully, but these errors were encountered: