0

我能够通过部署在 IIS 之上的程序(代码如下)获取 Shibboleth 返回的信息。

<% @ Page Language="C#" %>
<%
Response.Write("<h3>Server Variables</h3>");
Response.Write("mail= " + Request["mail"] + "<br>");
Response.Write("name = " + Request["name"] + "<br>");
%>

但是,当我使用以下设置跳转到 glassfish 时,我无法获取身份验证信息

<httpRedirect enabled="false" destination="https://glassfish.fujitsu.com:8443/info" exactDestination="true" httpResponseStatus="Found" />

经过调查发现,在IIS时,shibboleth返回的信息只能存在于请求头中。

我可以做些什么来让 glassfish 的应用程序可以使用这些信息

我的环境如下 OS:windows 2016 IIS:10 GlassFish:5.1.0

我的 shibboleth2.xml 如下:

<ISAPI normalizeRequest="true" safeHeaderNames="true" useHeaders="true">
<SSO entityID="http://adfs-srv.fujitsu.com/adfs/services/trust"
 discoveryProtocol="SAMLDS" discoveryURL="https://ds.example.org/DS/WAYF">
              SAML2
 </SSO>
...

attribute-map.xml 的设置如下:

<Attribute name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" id="mail" />
<Attribute name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" id="name" />

浏览器返回iis程序的结果如下:

Server Variables

mail= ***@cn.**.com
name= y*

谢谢!!等待您的帮助!

4

0 回答 0