【问题标题】:changeSessionIdOnAuthentication in WebSphere 8.5?WebSphere 8.5 中的 changeSessionIdOnAuthentication?
【发布时间】:2016-08-03 13:45:24
【问题描述】:

我们的安全团队运行了一次扫描,告诉我们我们很容易受到会话固定的影响,并且文档告诉我们在 tomcat 中我们应该使用 context.xml 中的 changeSessionIdOnAuthentication 设置。

WebSphere 8.5 中的等效移动是什么?

【问题讨论】:

  • 他们扫描的是 WebSphere 还是 Tomcat?如果您正在使用应用程序安全和会话安全集成(默认情况下在 8.5 中启用),那么您应该不会受到攻击。
  • @Gas 他们扫描应用程序。它是一些安全程序,你提供应用程序的 URL,它会尝试各种东西并检测各种漏洞。有些结果是 B.S.,但这是合法的结果之一。我可以根据互联网看到Tomcat具有此功能,但不确定WAS,或者它在WAS中的位置。
  • 我们有这方面的更新吗?

标签: websphere session-fixation


【解决方案1】:

我在使用 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"/>

【讨论】:

    【解决方案2】:

    WebSphere 8.5 is using a servlet api version that is < 3.1,因此不能使用 HttpServlet Request 的 changeSessionId() 方法。

    你可以做的是,当你在你的应用程序中验证你的用户时,可能是尝试身份验证() 或类似方法,你可以这样做:

    HttpSession session = request.getSession(false);
    
    if(session != null)
        session.invalidate();
    
    session = request.getSession();
    

    以上提供了针对session fixation攻击的保护。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多