【发布时间】:2012-08-10 09:48:24
【问题描述】:
根据 tomcat 文档,tomcat7 不易受到会话固定攻击。但是我的 tomcat 7.0.25 和 7.0.27 很容易受到这种攻击。成功登录后,JSESSIONID cookie 值不会更改。
我在我的 conf/context.xml 中添加了以下 Valve。但这没有用。请帮帮我。
<Valve className="org.apache.catalina.authenticator.BasicAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.SSLAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.SpnegoAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.DigestAuthenticator" changeSessionIdOnAuthentication="true" />
<Valve className="org.apache.catalina.authenticator.FormAuthenticator" changeSessionIdOnAuthentication="true" />
我还了解到 JSESSION ID cookie 值只会在身份验证时发生变化。身份验证是什么意思?是否将应用程序从 http 切换到 https ?
是否已经构建了可以更改登录时 jsession id 值的任何东西?现在我正在通过代码更改它。
提前致谢。如果您需要更多信息,请告诉我。
问候,
普拉尚·古普塔
【问题讨论】:
-
您找到问题的答案了吗?请提供反馈...
标签: tomcat7 sessionid jsessionid