我正在使用 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 在身份验证成功后不会更改。)