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

我有一个AD FS索赔提供商和一个Shibboleth SP成功进行身份validation。

我正在尝试将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中,它声明我应该粘贴或input以下内容(并在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"); 

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

在这里输入图像说明

我正在testinggivenName,所以我添加了以下内容: 在这里输入图像说明

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

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

当我浏览网站并用AD FS重新进行身份validation时,我没有看到givenName显示。 我有一个索引文件,输出所有的标题和它们的值。


编辑:解决我的问题


我得到了UPN作为epPN发送。 上面的规则(文章中的规则)起作用了,但是我不得不编辑Shibboleth SP上的attribute-policy.xml来禁用作用域规则,因为我没有正确设置那个部分。

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

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

是的,声明规则(显示在两行)是一个“声明”。 它以';'结尾。 即您将两行添加到相同的自定义规则。

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

通常我在程序上使用一些细微的变化。 我用UI编写search规则,但是我将规则(从“查看规则语言”)复制到自定义规则。 在复制的自定义规则中,我将“问题”更改为“添加”。 然后我删除原来的search规则。 这避免了向Shib发送URL和URN声明。