【问题标题】:Websphere 6.1: How to add version to cookies?Websphere 6.1:如何向 cookie 添加版本?
【发布时间】:2011-03-21 11:44:29
【问题描述】:

默认情况下,WebSphere 6.1 不将版本包含在 LtpaToken 和 JSESSIONID cookie 中。有没有办法为这些 cookie 强制执行 cookie 版本 1?

WebSphere 7.0 有这个选项吗?

-- 编辑--

这是一个例子: 当我登录到部署在 WebSphere 上的某个 Web 应用程序时,会在某个时间点创建会话。然后它的 ID 被发送到客户端浏览器(这里是 FireBug 的一些输出):

GET /myApp/somepage.jsf HTTP/1.1
Host: 127.0.0.1:9080
...
Referer: http://127.0.0.1:9080/myApp/somepage.jsf
Cookie: someMyCookie=whatever;LtpaToken=9eC8Nk3Pu; JSESSIONID=00005YXN:-1;

我切掉了 cookie,因为它们的内容无关紧要。但我想看看:

GET /myApp/somepage.jsf HTTP/1.1
Host: 127.0.0.1:9080
...
Referer: http://127.0.0.1:9080/myApp/somepage.jsf
Cookie: someMyCookie=whatever;LtpaToken="9eC8Nk3Pu";Version=1; JSESSIONID="00005YXN:-1";Version=1;

我可以控制我的 cookie (someMyCookie) 并设置它们的版本。但是我无法控制 JSESSIONID 和 LtpaToken。有没有办法将它们设置为版本 1?

问候

【问题讨论】:

    标签: websphere websphere-6.1 websphere-7


    【解决方案1】:

    您的要求不合理。

    JSESSIONID 没有版本不兼容或版本不同,它只是本地已知(或与单元共享)的 ID 号。 LTPAKEY 始终是版本 1。LTPAKEY2 命名的 cookie 始终包含版本 2。可能当版本 3 出现时,新的 cookie 将被命名为 LTPAKEY3。

    【讨论】:

      【解决方案2】:

      您是否尝试跨旧服务器进行 SSO? 您可能想尝试管理控制台中的互操作性模式设置:全局安全 > 单点登录 (SSO)

      互操作模式

      Specifies that an interoperable cookie is sent to the browser to support back-level servers.
      
      In WebSphere® Application Server, Version 6 and later, a new cookie format is needed by the security attribute propagation functionality. When the interoperability mode flag is enabled, the server can send a maximum of two single sign-on (SSO) cookies back to the browser. In some cases, the server just sends the interoperable SSO cookie.
      

      【讨论】:

      • 感谢您的关注。这不完全是我想要实现的。我编辑了我的问题并添加了示例。请看一看。
      • 这背后的意图是什么?
      • 这是对项目的新要求。其他应用程序用作代理(在 Websphere 应用程序和客户端浏览器之间)并且需要 cookie 版本 1。
      • 我不知道这个的具体设置,但我想知道你是否可以在前端 http 服务器上使用 mod_headers 来添加这个。
      猜你喜欢
      • 2018-07-16
      • 2011-04-12
      • 1970-01-01
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      • 2013-05-22
      • 2011-03-28
      • 1970-01-01
      相关资源
      最近更新 更多