0

After upgrading to Spring Security 5, i started seeing lot of exceptions in my logs related to firewall. Is there a way to handle these exceptions in Spring Boot (it wont work with @ExceptionHandler) so that i can do some analytics with these exceptions, or atleast decide not to clog log files with these big stacktraces?

org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized.
    at org.springframework.security.web.firewall.StrictHttpFirewall.getFirewalledRequest(StrictHttpFirewall.java:248)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:193)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)

I am using Spring Boot 1.5.14

I could not even find a mechanism to turn off logging for these exceptions.

Munish Chandel
  • 3,572
  • 3
  • 24
  • 35

0 Answers0