【问题标题】:ColdFusion / Shibboleth - REMOTE_USERColdFusion / Shibboleth - REMOTE_USER
【发布时间】:2018-05-14 14:24:07
【问题描述】:

我的 IIS 服务器上托管了一个 ColdFusion 应用程序。我将Shibboleth 服务添加到我的Web IIS,并设置了CGI/过滤器以使用它。我将我的应用程序添加到testshib 联盟,并且能够成功登录。现在我正在尝试将会话变量放入 ColdFusion 代码中。

当我转储 CGI 范围时,我看到 shibboleth 会话保存在 HTTP_COOKIE 下,但 REMOTE_USER 是一个空字符串。这是因为REMOTE_USER不能按照docs使用。相反,请求标头变量应该命名为HTTP_REMOTE_USER,但我在 CGI 转储中没有看到它。有人为什么会这样吗?我是否必须设置我的 shibboleth 属性映射或在 ColdFusion 中?

索引.cfm

CGI dUMP
<cfdump var = "#cgi#" > 
<br>HTTP_REMOTE_USER
<cfdump var="#CGI.HTTP_REMOTE_USER#">
<br>Get Request
<cfset x = GetHttpRequestData()> 
<cfdump var="x">

转储结果

HTTP_COOKIE:_shibsession_64656487474733a2f2f6465736f6d2f73686962626f6c657468=_ecb60f7e4bf7616ab3522; 

会话

Miscellaneous
Session Expiration (barring inactivity): 479 minute(s)
Client Address: 224.61.30.228
SSO Protocol: urn:oasis:names:tc:SAML:2.0:protocol
Identity Provider: https://idp.testshib.org/idp/shibboleth
Authentication Time: 2017-11-30T14:48:48.255Z
Authentication Context Class: urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
Authentication Context Decl: (none)

Attributes
affiliation: 2 value(s)
entitlement: 1 value(s)
eppn: 1 value(s)
persistent-id: 1 value(s)
unscoped-affiliation: 2 value(s)

【问题讨论】:

    标签: iis coldfusion cgi saml shibboleth


    【解决方案1】:

    我相信 ColdFusion 不会在 &lt;cfdump&gt; 中公开所有可能的 CGI 变量,只公开最常见的变量。这并不意味着您不能直接访问似乎缺少的 CGI 变量。尝试更改您的转储以专门针对您需要的转储,例如:

    &lt;cfdump var="#CGI.HTTP_REMOTE_USER#"&gt;

    如果仍未将其写入 CGI 范围,您或许可以使用 getHTTPRequestData() 通过页面请求访问该特定请求标头变量。

    【讨论】:

    • 返回 HTTP_REMOTE_USER : [空字符串]。连同 getHTTPRequstData。如果我通过 asp 页面转储它,它会显示 HTTP_REMOTEUSER:myself@testshib.org 。
    • 将 GetHttpRequestData 设置为标头,不知何故让它工作。谢谢,我会在 2 天内符合条件时给你赏金。
    • 听起来有些东西被 ColdFusion/IIS 连接器丢弃了。从这篇博文中,看起来其他人过去也看到过类似的行为:grokbase.com/t/tomcat/users/128v2r7gf4/…
    猜你喜欢
    • 2016-09-01
    • 1970-01-01
    • 2012-11-24
    • 1970-01-01
    • 2016-08-08
    • 2011-09-30
    • 1970-01-01
    • 1970-01-01
    • 2010-12-25
    相关资源
    最近更新 更多