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

Prepare Request Matching for Spring Framework Changes #16417

Open
8 tasks
jzheaux opened this issue Jan 14, 2025 · 2 comments
Open
8 tasks

Prepare Request Matching for Spring Framework Changes #16417

jzheaux opened this issue Jan 14, 2025 · 2 comments
Assignees
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Jan 14, 2025

In future versions of Spring Security, we should move away from PathMatcher (used by AntPathRequestMatcher) and HandlerMappingIntrospector (used by MvcRequestMatcher) as they are deprecated Spring Framework 7.0 M1.

This will also assist with efforts to simplify construction of path-based RequestMatchers.

  • Add PathPatternRequestMatcher #16429

  • Simplify Specifying servletPath in the Java DSL #16430

  • Deprecate MvcRequestMatcher

  • Deprecate AntPathRequestMatcher

  • Deprecate usages of PathMatcher in Web Socket support

  • Update HandlerMappingIntrospector Usage in CORS support

  • Update HandlerMappingIntrospector Usage in Cache filter support

  • Favor using PathPatternRequestMatcher in Java DSL
    We can default to Framework's PathPatternParser for MVC endpoints when HandlerMappingIntrospector#allHandlerMappingsUsePathPatternParser returns true

    We can default to Framework's PathPatternParser for non-MVC endpoints

    This should have an opt-in mechanism in order to remain passive.

@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement labels Jan 14, 2025
@jzheaux jzheaux added this to the 6.5.x milestone Jan 14, 2025
@jzheaux jzheaux self-assigned this Jan 14, 2025
@evgeniycheban
Copy link
Contributor

Hi, @jzheaux, can I work on this? I'd want to start with adding PathPatternRequestMatcher along with tests.

@jzheaux
Copy link
Contributor Author

jzheaux commented Jan 15, 2025

Hi, @evgeniycheban, thanks for volunteering! Some of this is already addressed in a draft PR, so allow me to clean that up first so it's clear what work remains. I'll report back here when that's ready, and then we can divvy out the remaining work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants