Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting HttpOnly and Secure attributes in Struts2

 
Bill Wied
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two of the OWASP security recommendations for web applications involve setting the HttpOnly and secure attributes within the session cookie, however the following link below from OWASP indicates that it is not possible to set these flags programatically in Struts2.

https://www.owasp.org/images/b/be/A_Gap_Analysis_of_Application_Security_in_Struts2.pdf

Are there other recommend ways of doing this?

One recommended solution that was suggested was to use a Servlet filter to rewrite the cookie and adding these attributes. Has anyone taken this approach?

I am operating using Java 1.5, Websphere 7.0 and Struts Servlet container 2.4.

Thanks in advance for your help.

Bill
 
Joe Ess
Bartender
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting paper. I'm not a security expert, but I'm curious why, on page 14, the author proposes to "bring back the validate() method" when that method is available in com.opensymphony.xwork2 ActionSupport for providing programmatic validation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic