ADFS / SAML2.0 - 如何通过联合元数据设置声明规则?

时间:2015-01-13 15:52:56

标签: active-directory saml saml-2.0 adfs

我尝试针对Web应用程序针对Windows ADFS实施SAML 2.0身份验证。到目前为止,我通过手动配置依赖方信任和分配的声明规则,成功地通过ADFS验证和获取我需要的内容。

现在,我想为我的应用程序提供联合元数据,以便更轻松地在ADFS中设置所需的内容。但是,我无法弄清楚如何在该元数据中传递所需的声明规则。

这是我到目前为止所拥有的:

<?xml version="1.0"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="dokuwiki-entity" validUntil="2015-03-24T20:30:16Z">
  <SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" WantAssertionsSigned="true">
    <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
    <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat>
    <AssertionConsumerService index="1" isDefault="true" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://perd.cosmo/dw-2014-01-13/doku.php?id=start"/>

    <AttributeConsumingService index="1">
      <ServiceName xml:lang="en">DokuWiki</ServiceName>
      <RequestedAttribute isRequired="true" Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="E-Mail-Adresse" />
    </AttributeConsumingService>
  </SPSSODescriptor>
  <Organization>
    <OrganizationName xml:lang="en">DokuWiki</OrganizationName>
    <OrganizationDisplayName xml:lang="en">DokuWiki</OrganizationDisplayName>
    <OrganizationURL xml:lang="en">https://www.dokuwiki.org</OrganizationURL>
  </Organization>
</EntityDescriptor>

根据我的理解,RequestedAttribute应该告诉ADFS在验证时向我发送用户的电子邮件地址。不幸的是,在使用此元数据设置依赖方信任后,不会设置任何声明规则。

问题:是否可以通过元数据设置声明规则或是否始终手动完成?如果有可能,我在哪里可以找到相应的文档?

1 个答案:

答案 0 :(得分:3)

您必须手动(或通过powershell)设置声明规则。 ADFS不会查看元数据的那一部分。

相关问题