首页 文章

Apache Ignite似乎会导致会话固定

提问于
浏览
1

我正在使用Apache Ignite来集群Web会话,并使用Spring安全性来执行基于表单的身份验证 . 我使用的软件是:

  • JDK 1.8.0_60

  • Apache Tomcat 7.0.68

  • Apache Ignite 1.5.0.final

  • Spring Security 3.1.3.RELEASE

(如果没有Apache Ignite,基于表单的身份验证工作正常,并且在身份验证成功时会更改JSESSIONID cookie,以防止会话固定攻击,如预期的那样 . )

使用Apache Ignite,我无法登录,并收到以下警告:

2016-04-18 16:49:07,283 WARN  org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy/onAuthentication 102 - Your servlet container did not change the session ID when a new session was created. You will not be adequately protected against session-fixation attacks

如果我在Spring配置中关闭会话固定保护,如下所示:

<http>
    ...
    <session-management session-fixation-protection="none" />
    ...
</http>

有用 . (但结果是,JSESSIONID cookie在认证成功后不会改变 . )

2 回答

  • 1

    正如Valentin所建议的那样(感谢),我尝试了Apache Ignite的版本1.6.0-SNAPSHOT#20160419-sha1:186c8604的the nightly build . 确实,它有效 .

    它适用于以下Spring安全配置:

    <http>
        ...
        <session-management session-fixation-protection="none" />
        ...
    </http>
    

    当然,JSESSIONID cookie在Spring安全认证成功后不会改变 .

    然后我注释掉以下配置:

    <session-management session-fixation-protection="none" />
    

    它也有效 . 在身份验证成功后,JSESSIONID cookie会按预期进行更改 .

    好的,我现在将使用Ignite版本1.5.0.final(没有session-fixation-protection),并等待1.6.x版本的发布 .

  • 0

    Tomcat 7具有内置的会话固定功能,

    • 更改身份验证的jsessionid以完全防止会话固定攻击

    Tomcat不允许应用程序更改会话ID .

相关问题