shibboleth SAML发布的属性不在HTTP头中

时间:2013-09-12 14:48:40

标签: saml shibboleth

我在Shibboleth SSO互动中充当服务提供商。我成功地取回了内部预期属性的SAML响应。但是,这些属性未显示在/Shibboleth.sso/Session属性列表中。

我在shibboleth.xml文件中有<MetadataProvider>标记。我想知道我还能做错什么?

在shibd.log中,我看到以下内容:

skipping unmapped SAML 2.0 Attribute with Name: xxxx, Format:urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
skipping unmapped SAML 2.0 Attribute with Name: yyyy

编辑 - 我还添加到 attribute-map.xml

<Attribute Name="xxxx" id="xxxx" />
<Attribute Name="yyyy" id="yyyy" />

属性在IdP的metadata.xml中没有完全限定名称。这些名字只是“xxxx”和“yyyy”。这有关系吗?

最后,在IdP的 metadata.xml 中,他们有:

<saml:Attribute Name="xxxx" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"/>
<saml:Attribute Name="yyyy" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"/>

2 个答案:

答案 0 :(得分:1)

来自Shibboleth documentation

  

SAML V2.0 LDAP / X.500属性配置文件指定X.500 / LDAP   使用urn:oid命名空间命名属性。这些名字   简单地使用字符串urn构建:oid后跟OID   为属性定义。

所以你肯定需要使用OID作为属性名称,attribute-map.xml有很多例子。

对于特定于某些IdP的自定义属性,他们必须为您提供要使用的OID。

答案 1 :(得分:0)

我相信我已经解决了。在attribute-map.xml中,我必须添加:

<Attribute name="xxxx" id="xxxx">
  <AttributeDecoder xsi:type="NameIDAttributeDecoder" formatter="$Name" defaultQualifiers="true"/>
</Attribute>
<Attribute name="yyyy" id="yyyy">
  <AttributeDecoder xsi:type="NameIDAttributeDecoder" formatter="$Name" defaultQualifiers="true"/>
</Attribute>

见这里:NativeSPAttributeDecoder