ColdFusion / Shibboleth - REMOTE_USER

ColdFusion / Shibboleth - REMOTE_USER

我的 IIS 服务器上托管了一个 ColdFusion 应用程序。我添加了 Shibboleth service to my web IIS, and the CGI/Filters are setup to use it. I added my application to the testshib 联盟并且能够成功登录。现在我正在尝试将 session 变量放入 ColdFusion 代码中。

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

index.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; 

Session

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)

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

<cfdump var="#CGI.HTTP_REMOTE_USER#">

如果它仍未写入 CGI 范围,您可以使用 getHTTPRequestData().

通过页面请求访问该特定请求 header 变量