2012-08-14 125 views
0

根据tomcat文档,tomcat7不易受到会话固定攻击。但是我的tomcat 7.0.25以及7.0.27很容易受到这种攻击。在成功登录时,JSESSIONID cookie值不会发生变化。用Tomcat更改JSESSION ID 7

我将以下阀添加到我的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值?现在我正在通过代码改变这一点。

在此先感谢。如果您需要更多信息,请告诉我。

问候,

PRASHANT古普塔

+0

您是否找到自己的问题的答案?请提供反馈... – 2012-08-17 09:00:58

回答

0

你确定你的应用程序使用的服务器的安全性。

如果您使用它们,这些配置只会影响此行为。

如果您的身份验证使用例如自定义或弹簧安全身份验证,则它们将不适用,您必须自己执行此操作。

例如在spring sec中有参数。

Regards