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

Add PermitAll and DenyAll AuthorizationManager instances #16590

Open
jzheaux opened this issue Feb 14, 2025 · 2 comments
Open

Add PermitAll and DenyAll AuthorizationManager instances #16590

jzheaux opened this issue Feb 14, 2025 · 2 comments
Assignees
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Feb 14, 2025

It would be nice to have an AuthorizationManager that returned a static response:

public final class SingleResultAuthorizationManager<C> implements AuthorizationManager<C> {
    private final AuthorizationResult result;

    // ...

    public static <C> SingleResultAuthorizationManager<C> permitAll() { ... }

    public static <C> SingleResultAuthorizationManager<C> denyAll() { ... }
}

This ticket would also look for and replace code that creates a permit-all or deny-all lambda like in AuthorizeHttpRequestsConfigurer#AuthorizeUrl and RequestMatcherDelegatingAuthorizationManager#AuthorizeUrl.

@jzheaux jzheaux added in: core An issue in spring-security-core status: ideal-for-contribution An issue that we actively are looking for someone to help us with type: enhancement A general enhancement labels Feb 14, 2025
@franticticktick
Copy link
Contributor

Hi @jzheaux , could you assign this ticket to me please?

@jzheaux
Copy link
Contributor Author

jzheaux commented Feb 14, 2025

Yes, @franticticktick. Will you in your review please also ping @plll0123 as they were recently involved in a similar polish? I'd like to see if I can encourage them to make more contributions.

@jzheaux jzheaux removed the status: ideal-for-contribution An issue that we actively are looking for someone to help us with label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants