将 AD 属性作为 AD FS 声明发送到 Shibboleth SP 属性

将 AD 属性作为 AD FS 声明发送到 Shibboleth SP 属性

我已经设置了 AD FS 声明提供商,并且 Shibboleth SP 已成功对其进行身份验证。

我正在尝试将 Active Directory 属性发送到 SP。

我按照这篇文章尝试发送索赔: https://technet.microsoft.com/en-us/library/gg317734(v=ws.10).aspx

相关部分是Step 2: Configure AD FS 2.0 as the Identity Provider and Shibboleth as the Relying Party--> Configure AD FS 2.0--> Edit Claim Rules for Relying Party Trust--> To configure eduPerson claims for sending to a relying party trust

在步骤 16 中,它指出我应该粘贴或输入以下内容(并将其放在 2 个代码块中):

c:[Type == "http://schemas.xmlsoap.org/claims/Group", Value == "Domain Users"]

=> issue(Type = "urn:oid:1.3.6.1.4.1.5923.1.1.1.9", Value = "[email protected]", Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/attributename"] = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri");

我相信这应该是一个单一的陈述(如果我错了,请纠正我)所以我的输入如下:

在此处输入图片描述

我正在使用 givenName 进行测试,因此我添加了以下内容: 在此处输入图片描述

在 Shibboleth SP 机器上,我attribute-map.xml通过添加以下内容进行了编辑,然后重新启动了 Shibboleth 服务:

<Attribute name="urn:mace:dir:attribute-def:GivenName" id="GivenName"/>

当我浏览该网站并使用 AD FS 重新进行身份验证时,我没有看到 givenName 显示。我有一个索引文件,其中输出所有标题及其值。


编辑:解决我的问题


我让 UPN 作为 epPN 发送。上述规则(文章中的规则)有效,但我必须编辑attribute-policy.xmlShibboleth SP 以禁用范围规则,因为我没有正确设置该部分。

我注释掉了以下几行attribute-policy.xml

afp:AttributeRule attributeID="eppn">
    <afp:PermitValueRuleReference ref="ScopingRules"/>
</afp:AttributeRule>

答案1

是的,声明规则(显示为两行)是一个“语句”。它以“;”结尾。也就是说,您将两行添加到同一个自定义规则中。

对于每个已发布(发送)的带有对象标识符 uri 的声明(属性),您需要添加自定义规则(在 AD 搜索规则下方)。也就是说,如果您想要“urn:oasis:names:tc:SAML:2.0:attrname-format:uri”。如果您只想要 oid uri,那么在“声明描述”中定义声明就足够了。

通常我会使用略微不同的程序。我使用 UI 编写搜索规则,然后复制规则(从“查看规则语言”)到自定义规则。在复制的自定义规则中,我将“issue”更改为“add”。然后删除原始搜索规则。这样可以避免将 URL 和 URN 声明都发送给 Shib。

相关内容