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 Prevent's oauth2Login from being defaulted #6314

Open
jgrandja opened this Issue Dec 20, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@jgrandja
Copy link
Collaborator

jgrandja commented Dec 20, 2018

If org.springframework.boot:spring-boot-starter-actuator is on the classpath than ReactiveManagementWebSecurityAutoConfiguration will build a SecurityWebFilterChain, which will get @Autowired to WebFluxSecurityConfiguration.securityWebFilterChains. This configuration will result in a bypass of OAuth2ClasspathGuard.shouldConfigure().

So if oauth2-client is actually on the classpath and the required properties are configured, than ServerHttpSecurity.oauth2Login() will not be applied.

Related spring-cloud-security#171

/cc @rwinch @spencergibb

@jgrandja jgrandja added the OAuth2 label Dec 20, 2018

@spencergibb

This comment has been minimized.

Copy link
Member

spencergibb commented Dec 20, 2018

For the sample app I'm doing the following temporarily:

spring:
  autoconfigure:
    exclude: org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration
@jgrandja

This comment has been minimized.

Copy link
Collaborator Author

jgrandja commented Dec 20, 2018

@spencergibb I have a workaround for you here

@rwinch rwinch changed the title WebFluxSecurityConfiguration bypasses OAuth2ClasspathGuard ReactiveManagementWebSecurityAutoConfiguration Prevent's OAuth Log In from being defaulted Dec 20, 2018

@rwinch rwinch changed the title ReactiveManagementWebSecurityAutoConfiguration Prevent's OAuth Log In from being defaulted ReactiveManagementWebSecurityAutoConfiguration Prevent's oauth2Login from being defaulted Dec 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment