【问题标题】:Changing JSESSION ID with Tomcat 7使用 Tomcat 7 更改 JSESSION ID
【发布时间】: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


【解决方案1】:

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

这些配置仅在您使用时才会影响此行为。

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

例如在 spring sec 中有参数。

问候

【讨论】:

    猜你喜欢
    • 2017-12-22
    • 2023-04-10
    • 1970-01-01
    • 1970-01-01
    • 2011-09-17
    • 2014-06-16
    • 2015-06-04
    • 2021-10-17
    • 1970-01-01
    相关资源
    最近更新 更多