gpt4 book ai didi

iis - ColdFusion/Shibboleth - REMOTE_USER

转载 作者:行者123 更新时间:2023-12-02 03:43:32 27 4
gpt4 key购买 nike

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

当我转储 CGI 范围时,我看到 shibboleth session 保存在 HTTP_COOKIE 下,但 REMOTE_USER 是一个空字符串。这是因为根据 docs 不能使用 REMOTE_USER 。相反,请求 header 变量应命名为 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; 

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 变量。 .

关于iis - ColdFusion/Shibboleth - REMOTE_USER,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47577145/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com