为SAML 2.0 Federation - Identity中的一个SP生成自定义属性



我们有一个SAML 2.0联邦环境(IDP和SP)。我想为仅为一个SP创建的断言生成一个自定义属性。因此,我不会修改IDP配置。

我们需要创建的SAML断言代码片段:

& lt;saml:Attribute NameFormat="urn:oasis:names:tc: saml: 2.0:attrname-format:uri">
Name = " urn: oasis:名字:tc: SAML: 2.0:概要:属性:DCE:团体"
>

& lt;saml:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xsi: type = " xsd: string "> ABCD

根据SAML2规范,我们需要修改SP扩展元数据以提供此属性。常量字符串"ABCD"是我们想要发送的属性。我也这样修改过,但没有结果。有人能提供一些见解吗?

& lt;属性名称= " urn: oasis:名字:tc: SAML: 2.0:概要:属性:DCE:团体">

 < Value>urn:oasis:names:tc:SAML:2.0:attrname-format:uri|ABCD</Value>

& lt;/属性>

也尝试:

& lt;属性名称= " urn: oasis:名字:tc: SAML: 2.0:概要:属性:DCE:团体"nameformat = " urn: oasis:名字:tc: SAML: 2.0: attrname-format: uri ">

 < Value>"ABCD"</Value>

& lt;/属性>

查看元数据规范,您似乎使用以下语法来定义您希望从IDP获得的属性。当然,必须配置IDP以允许将此类属性导出到。

<AttributeConsumingService>
   <ServiceName xml:lang="en">youname</ServiceName>
   <RequestedAttribute 
      NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:theformat"
      Name="theAttributeName"
      FriendlyName="humanReadableName"/>
</AttributeConsumingService>

详细说明见第21页https://www.oasis open.org/committees/download.php/35391/sstc saml -元数据勘误表- 2.0 - wd - 04 - diff.pdf

最新更新