Skip to content

Add order offset to @EnableMethodSecurity #13214

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

Closed
jzheaux opened this issue May 23, 2023 · 2 comments · Fixed by #14052
Closed

Add order offset to @EnableMethodSecurity #13214

jzheaux opened this issue May 23, 2023 · 2 comments · Fixed by #14052
Labels
in: config An issue in spring-security-config status: ideal-for-contribution An issue that we actively are looking for someone to help us with type: enhancement A general enhancement

Comments

@jzheaux
Copy link
Contributor

jzheaux commented May 23, 2023

Since @EnableMethodSecurity defines multiple method interceptors, an order attribute may be misleading. That said, it would be nice to be able to change the default position its method interceptors have in the Spring AOP advisor chain.

This is already possible by re-declaring each method interceptor as a bean and setting their individual order values one-by-one.

Instead, an attribute would make this easier. Something like:

@EnableMethodSecurity(offset = 1000)

would mean that the method interceptors should be given values increasing from 1000, allowing applications to select where the interceptors should be placed.

@jzheaux jzheaux added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels May 23, 2023
@jzheaux jzheaux added in: config An issue in spring-security-config status: ideal-for-contribution An issue that we actively are looking for someone to help us with and removed status: waiting-for-triage An issue we've not yet triaged labels May 24, 2023
@Kiriakos1998
Copy link

Hello @jzheaux , I would like to work on this. However it's not clear to me how the ordering will take place according to the offset. Are the interceptors expected to have for example an order value like 1005, 1007 if the offset is set to be 1000?

@ykardziyaka
Copy link
Contributor

Hi @Kiriakos1998. Are you still working/planing to work on the issue? I would like to give it a try, if you're not.

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

Successfully merging a pull request may close this issue.

3 participants