-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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 integration test to ensure ErrorPageSecurityFilter works with custom endpoint matchers #29564
Comments
One thing I hadn't bothered to notice before is that in that reproduction when running the application you do get the correct 401/403, but it comes with HTML (apparently from Tomcat) and the |
It looks like this is an issue that's been triggered by the fix for spring-projects/spring-security#10554. If I update the sample with snapshot repos, downgrade to Spring Boot 2.6.3 and add It looks like This feels similar to spring-projects/spring-security#10208. I'll open a Spring Security issue. |
I've opened spring-projects/spring-security#10779 which you may want to subscribe to. Thanks for raising the issue. |
Reopening because it struck me that we didn't have any test in 3.0.x fail so it would be good to add one. |
We since removed |
Starting with 3.0.0-M1, a second
WebSecurityConfigurer
appears to be triggering "ServletContext must not be null" underneath theErrorPageSecurityFilter
when a request fails authentication.We have a library which configures security for the actuator, then applications will configure their own security. This works fine so far up through 2.6.3, although I'm happy to hear if we are doing something unexpected.
Testing with 3.0.0-M1 all tests in this configuration which hit 401/403 errors are throwing this error from the actuator-specific matcher in
RequestMatcherDelegatingWebInvocationPrivilegeEvaluator#delegates
.I know there's a lot going on with
ErrorPageSecurityFilter
recently but I did not see this problem in particular called out anywhere.I was able to isolate this into minimal repro here, where the error can be found/eliminated based on enabling/disabling the second
WebSecurityConfigurer
:https://github.com/jeffbswope/null-servletcontext-errorpagefilter
The text was updated successfully, but these errors were encountered: