Tomcat hardening

From TempusServa wiki
Revision as of 09:16, 7 February 2018 by old>Admin (→‎CRSF filter)
Jump to navigation Jump to search


Secure headers

in the server web.xml (<tomcat>\conf\web.xml) add the following sections

CRSF filter

In the APPLICATION web.xml (<tomcat>\webapps\<app>\WEB_INF\web.xml) add the following sections

 <filter>
   <filter-name>CsrfFilter</filter-name>
   <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
   <init-param>
     <param-name>entryPoints</param-name>
     <param-value>/login, /login.do</param-value>
   </init-param>
 </filter>
 <filter-mapping>
   <filter-name>CsrfFilter</filter-name>
   <url-pattern>/*</url-pattern>
 </filter-mapping>