O'Reilly logo

Hands-On High Performance with Spring 5 by Dinesh Radadiya, Prashant Goswami, Pritesh Shah, Subhash Shah, Chintan Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring a security filter for incoming requests

When implementing security in a web application, it is better to validate all of the incoming requests. In Spring Security, the framework itself looks at the incoming request and authenticates the user to perform an action, based on the provided access. To intercept all of the incoming requests to a web application, we need to configure filter, DelegatingFilterProxy, which will delegate the requests to a Spring-managed bean, FilterChainProxy:

<filter>    <filter-name>springSecurityFilterChain</filter-name>    <filter-class>        org.springframework.web.filter.DelegatingFilterProxy    </filter-class></filter><filter-mapping>    <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required