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

Simplify RequestMatcherDelegatingAuthorizationManager.Builder matcher registration #11624

Closed
jzheaux opened this issue Jul 26, 2022 · 2 comments · Fixed by #13110
Closed

Simplify RequestMatcherDelegatingAuthorizationManager.Builder matcher registration #11624

jzheaux opened this issue Jul 26, 2022 · 2 comments · Fixed by #13110
Assignees
Labels
in: web An issue in web modules (web, webmvc) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Jul 26, 2022

It would be easier to use RequestMatcherDelegatingAuthorizationManager.Builder if it used builder methods similar to MessageMatcherDelegatingAuthorizationManager.Builder.

Specifically, it would be nice to be able to do things like the following:

RequestMatcherDelegatingAuthorizationManager.builder()
    .requestMatchers(new RegexRequestMatcher(...)).hasAuthority("message:read")
    .requestMatchers(new RegexRequestMatcher(...)).hasAuthority("message:read")
    .anyRequest().authenticated()
    .build();

Then, when applications need to decorate AuthorizationManager behavior, they can still take advantage of the authorization DSL.

Given #11347, this ticket should only introduce anyRequest and requestMatchers.

@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement labels Jul 26, 2022
@jzheaux jzheaux added this to the General Backlog milestone Jul 26, 2022
@evgeniycheban
Copy link
Contributor

@jzheaux I can work on it.

@marcusdacoregio
Copy link
Contributor

Closing in favor of #13110

@github-project-automation github-project-automation bot moved this from Prioritized to Done in Spring Security Team Jun 22, 2023
@marcusdacoregio marcusdacoregio added the status: duplicate A duplicate of another issue label Jun 22, 2023
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) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
Status: Done
3 participants