Skip to content
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

ServerHttpSecurity.authorizeExchange().pathMatchers(...) doesn't accept reactive EndpointRequest #11952

Closed
rwinch opened this issue Feb 7, 2018 · 3 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@rwinch
Copy link
Member

rwinch commented Feb 7, 2018

Originally Reported via spring-projects/spring-security#5002

HttpSecurity.authorizeRequests().requestMatchers(EndpointRequest.to(...)) works fine with org.springframework.security.config.annotation.web.builders.HttpSecurity and org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.

However, ServerHttpSecurity.authorizeExchange().pathMatchers(EndpointRequest.to(...)) doesn't work with org.springframework.security.config.web.server.ServerHttpSecurity and org.springframework.boot.actuate.autoconfigure.security.reactive.EndpointRequest.

@wilkinsona
Copy link
Member

AFAIK, this isn't a bug. org.springframework.boot.actuate.autoconfigure.security.reactive.EndpointRequest will give you a EndpointServerWebExchangeMatcher that is intended for use with ServerHttpSecurity.authorizeExchange().matchers().

@wilkinsona
Copy link
Member

There are a couple of examples of the intended usage in the WebFlux security sample.

@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 7, 2018
@mrdapotts
Copy link

mrdapotts commented Apr 11, 2021

The problem is caused because there is a org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest; and a org.springframework.boot.actuate.autoconfigure.security.reactive.EndpointRequest which have different arguments.

This type of daft issue might be avoid if people included the import list in their example programs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants