-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Deprecate Authorization Logic that uses FilterInvocation
#17884
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
base: main
Are you sure you want to change the base?
Conversation
Closes: spring-projectsgh-17781 Signed-off-by: Andrey Litvitski <[email protected]>
|
However, I believe that we can also replace However, there is a nuance: in |
|
Hi, @therepanic, thanks for the PR. Can you clarify where it is that the dummy request is created, as far as JSP Tag usage is concerned? I imagine that an evaluating tag would have access to the original I agree that this is used in the default |
|
Thanks for your reply, @jzheaux. Yes, I was probably wrong. I've thought about it now, and I think we can't replace If we do that, it will be a breaking change. We can see a tests like this: @Test
@SuppressWarnings(“rawtypes”)
public void expressionFromChildContext() throws IOException {
SecurityContextHolder.getContext().setAuthentication(new TestingAuthenticationToken(“user”, ‘pass’, “USER”));
DefaultWebSecurityExpressionHandler expected = new DefaultWebSecurityExpressionHandler();
...In order for this to work, I believe we need to replace DefaultWebSecurityExpressionHandler in the test, but this would again be a breaking change. If we cannot replace them, do we need to deprecate WDYT? |
|
@therepanic, good question. This issue is also addressed in Let's consider having it continue to look for In a separate ticket, we can look at How do you feel about that plan? |
|
Hi, @jzheaux. I think that's a great plan and will be better. Avoiding the breaking change while enabling the deprecation path is the right approach. I suppose we need to create an adapter something like this? As I understand it, you mean searching for the class RequestAuthorizationContextToFilterInvocationExpressionHandlerAdapter
implements SecurityExpressionHandler<FilterInvocation> { |
Closes: gh-17781