ADFS 2.0消耗SAML2断言的索赔规则



我正在使用ADFS 2.0作为服务提供商,而Shibboleth作为IDP,以:

的形式发布SAML2属性
<saml2:AttributeStatement>
        <saml2:Attribute FriendlyName="nameidentifier" Name="nameidentifier" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">testuser</saml2:AttributeValue>
        </saml2:Attribute>
</saml2:AttributeStatement>

有人知道如何设置索赔规则以消耗此属性吗?

我已经尝试了以下内容,但没有用:

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] == "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"] => issue(claim = c);

我在做什么错?

谢谢

应该只是

c:[Type == "nameidentifier"]
=> issue(claims = c)

像您规则一样,可以从属性访问友好名称和名称形式。不过,除非您想缩小规则范围(在这种情况下,请使用该要求更新您的问题)。

hth!

最新更新