Shibboleth SP将错误的用户身份传递给应用程序

我有一个使用Shibboleth SP(最新版本-2.4.2)进行Shibboled的Rails应用程序。我正在Apache 2.2中使用它。我的IdP是MS AD FS 2.0服务器。 一切似乎都正常运行-用户访问该站点,将其重定向到AD FS,进行身份验证,然后返回并登录到该站点。 问题在于,一旦完成此操作,几乎不可能及时以其他用户身份登录。您可以清除所有cookie(我正在Mac上使用Safari和Chrome尝试此操作)并重新启动浏览器,但是如果我先通过Alice身份验证,然后尝试以Carol身份登录,我仍然会被登录进入应用程序作为爱丽丝。 shibd清除Cookie后收到的SAML响应中包含正确的身份:
<AttributeStatement>
  <Attribute Name=\"http://schemas.xmlsoap.org/claims/CommonName\">
    <AttributeValue>Carol</AttributeValue>
  </Attribute>
  <Attribute Name=\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress\">
    <AttributeValue>carol@dev.REDACTED.com</AttributeValue>
  </Attribute>
  <Attribute Name=\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn\">
    <AttributeValue>carol@dev.REDACTED.com</AttributeValue>
  </Attribute>
</AttributeStatement>
但是,当Shibboleth SP将环境变量传递给我的应用程序时,它将发送错误的凭据:
[DEBUG 05/19 16:30:09]   ENV:  Shib-Session-ID => _615014991ed1b7dcc43f647ceb1f4944
[DEBUG 05/19 16:30:09]   ENV:  Shib-Identity-Provider => http://REDACTED/adfs/services/trust
[DEBUG 05/19 16:30:09]   ENV:  Shib-Authentication-Instant => 2011-05-19T21:17:23.861Z
[DEBUG 05/19 16:30:09]   ENV:  Shib-Authentication-Method => urn:federation:authentication:windows
[DEBUG 05/19 16:30:09]   ENV:  Shib-AuthnContext-Class => urn:federation:authentication:windows
[DEBUG 05/19 16:30:09]   ENV:  Shib-Session-Index => _cadfb4e6-ffb2-45f9-aab5-6bce8c3bc17a
[DEBUG 05/19 16:30:09]   ENV:  cn => alice
[DEBUG 05/19 16:30:09]   ENV:  email => alice@dev.REDACTED.com
[DEBUG 05/19 16:30:09]   ENV:  principal => alice@dev.READACTED.com
尽管取消了所有cookie,但Shib-Session-ID仍然相同。似乎是以某种方式将两个交互关联起来并重新建立现有会话,而不是使用SAML响应中的帐户信息进行新会话。 我已将所有可以找到的缓存超时值设置为60秒,但是在关闭浏览器的情况下等待2-3分钟不足以使它进行新的会话。
<StorageService type=\"Memory\" id=\"mem\" cleanupInterval=\"60\"/>
<SessionCache type=\"StorageService\" StorageService=\"mem\" cacheTimeout=\"60\" 
   inprocTimeout=\"60\" cleanupInterval=\"60\" />
...
<Sessions lifetime=\"60\" timeout=\"60\" checkAddress=\"false\" relayState=\"ss:mem\"
    handlerSSL=\"false\">
重新启动apache和shibd可以正常工作,就像关闭浏览器并让它坐了很长时间(10-15分钟?)一样,我也无法确切地知道它需要多长时间。 我想念什么?我还应该寻求其他途径?     
已邀请:
关键是我们的应用程序是一个Rails应用程序,是使用Passenger部署的。似乎在第一个调用之后“乘客”没有更新环境变量,因此您可能会得到旧数据。 切换为通过标头(ShibUseHeaders on)传递用户信息解决了该问题。     

要回复问题请先登录注册