I need to prevent Session Fixation, a particular type of session hijacking, in a Java web application running in JBoss. However, it appears that the standard idiom doesn’t work in JBoss. Can this be worked around?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This defect (found here) points the way to the solution. The Tomcat instance that runs in JBoss is configured with emptySessionPath=’true’, rather than ‘false’, which is the default. This can be modified in
.../deploy/jboss-web.deployer/server.xml; both the HTTP and AJP connectors have this option.The feature itself is used to eliminate the context path (eg. ‘foo’ in http://example.com/foo) from being included in the JSESSIONID cookie. Setting it to false will break applications that rely on cross-application authentication, which includes stuff built using some portal frameworks. It didn’t negatively affect the application in question, however.