根据 tomcat 文档,tomcat7 不易受到会话固定攻击。但是我的 tomcat 7.0.25 和 7.0.27 很容易受到这种攻击。成功登录后,JSESSIONID cookie 值不会更改。
我在我的 conf/context.xml 中添加了以下阀门。但这没有用。请帮我。
<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 值的任何东西?现在我正在通过代码更改它。
提前致谢。如果您需要更多信息,请告诉我。
问候,
普拉尚古普塔