-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add servletPath support to AuthorizeHttpRequests #13857
Conversation
Thanks, @jzheaux . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work so far @jzheaux! As mentioned below, I particularly like the separation between creating RequestMatcherBuilder
through a factory and use of that interface for creating RequestMatcher
instances. I'm not sure if we could improve on the contract needing an ApplicationContext
at this point, but will ponder it some more.
...rg/springframework/security/config/web/util/matcher/ServletRequestMatcherBuilderFactory.java
Outdated
Show resolved
Hide resolved
docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc
Outdated
Show resolved
Hide resolved
...c/main/java/org/springframework/security/config/web/util/matcher/RequestMatcherBuilders.java
Outdated
Show resolved
Hide resolved
...rg/springframework/security/config/web/util/matcher/ServletRequestMatcherBuilderFactory.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/springframework/security/config/web/util/matcher/RequestMatcherBuilders.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Josh. I've left some feedback inline.
...c/main/java/org/springframework/security/config/web/util/matcher/RequestMatcherBuilders.java
Outdated
Show resolved
Hide resolved
docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc
Outdated
Show resolved
Hide resolved
docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc
Outdated
Show resolved
Hide resolved
.../java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/springframework/security/config/web/util/matcher/RequestMatcherBuilders.java
Outdated
Show resolved
Hide resolved
...java/org/springframework/security/config/web/util/matcher/ServletRegistrationCollection.java
Outdated
Show resolved
Hide resolved
45f2a18
to
678fd07
Compare
9cf81e7
to
795c382
Compare
This PR extracts the logic
AuthorizeHttpRequestsConfigurer
uses to generateRequestMatcher
instances, simplifying howAntPathRequestMatcher
andMvcRequestMatcher
instances are generated.It exposes this through the
forServletPattern
DSL method.Closes gh-13562