-
Notifications
You must be signed in to change notification settings - Fork 6k
Reintroduce expressions for http security #13184
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
Comments
You can use That said, I agree that the use case for extracting path parameters could use some work. Would you mind if we repurposed this ticket to take a look at that? |
Having the same expressions on url security and method security is a great value (as I mentioned, I have provided an example, in our applications we have complicated expressions). Please, use this ticket as you wish. |
Thanks, @puskaiz. Given your response, I think it would be better to leave this ticket open and watch for votes. While I am hesitant to reintroduce expressions -- since as you mentioned, they have a tendency to encourage complicated expressions -- I don't mind leaving this ticket for others to find and explain their point of view. I've added #13256 to address path extraction. |
In Spring Security 5.7 (currently 5.7.9), WebExpressionAuthorizationManager is not defined and the method access already does not accept a string as argument unless the deprecated authorizeRequests method is used, instead of authorizeHttpRequests. How should we use expressions? Actually, the code in the documentation does not work: https://docs.spring.io/spring-security/reference/5.7/servlet/authorization/expression-based.html#_tabs_2 |
Would it be hard to reintroduce expressions? |
any chances to re-introduce expressions? |
When trying to migrate our codebase to Spring 3, I realized, that our security configuration cannot be migrated easily.
Code, that cannot be migrated (not real code, just an example):
According to the documentation, we should write an AuthorizationManager for this use-case.
We have used the same expressions on method security - and that was awesome.
It would be nice if expressions on http security would work again.
The text was updated successfully, but these errors were encountered: