File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Setting HttpOnly and Secure attributes in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Setting HttpOnly and Secure attributes in Struts2" Watch "Setting HttpOnly and Secure attributes in Struts2" New topic
Author

Setting HttpOnly and Secure attributes in Struts2

Bill Wied
Greenhorn

Joined: Mar 11, 2009
Posts: 9
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

Joined: Oct 29, 2001
Posts: 8997
    
    9

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.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting HttpOnly and Secure attributes in Struts2