spring - CSRF protection in Tomcat 7 -
how can prevent csrf protection using tomcat 7 ?
i have heard tomcat 7 provides csrf filter http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/csrfpreventionfilter.html
but thread safe ?
or shall custom protection in our spring 3 application ?
csrfpreventionfilter
way prevent csrf attacks, altough it's part of tomcat code base , based on putting token in url.
this means token logged etc, it's better put token in hidden field in each form of page.
spring security 3.2 have built-in support, , solution work in other application servers. depending on application there no need building custom protection @ spring level, tomcat solution works ok.
the tomcat filter thread-safe, given each http request handled beginning end 1 thread, , token cache has synchronized access.
Comments
Post a Comment