我们的安全团队运行了一次扫描,告诉我们我们很容易受到会话固定的影响,并且文档告诉我们在 tomcat 中我们应该使用 context.xml 中的 changeSessionIdOnAuthentication 设置。
WebSphere 8.5 中的等效移动是什么?
我们的安全团队运行了一次扫描,告诉我们我们很容易受到会话固定的影响,并且文档告诉我们在 tomcat 中我们应该使用 context.xml 中的 changeSessionIdOnAuthentication 设置。
WebSphere 8.5 中的等效移动是什么?
我对 WAS 8.5 也有同样的问题。最终使用 spring security 来配置会话固定问题。
<security:session-management invalid-session-url="/login" session-authentication-error-url="/login" session-fixation-protection="newSession">
<security:concurrency-control error-if-maximum-exceeded="true" max-sessions="1" expired-url="/login"/>
WebSphere 8.5 使用的是 < 3.1 的 servlet api 版本,因此您不能使用 HttpServlet Request 的 changeSessionId() 方法。
相反,您可以做的是,在您在应用程序中对用户进行身份验证时,可能是尝试身份验证()或类似方法,您可以执行以下操作:
HttpSession session = request.getSession(false);
if(session != null)
session.invalidate();
session = request.getSession();
以上提供了针对会话固定攻击的保护。