【问题标题】:SAML 2.0 claims not passing through ADFSSAML 2.0 声明未通过 ADFS
【发布时间】:2015-09-01 23:49:59
【问题描述】:

我们有一个声明感知应用,并使用 ADFS 服务器对来自我们合作伙伴网络的用户进行身份验证。拥有自己的 ADFS 服务器的客户没有问题。他们的 ADFS 服务器以 SAML 1.0 格式向我们发送令牌,一切都很好。我们有一个客户端向我们的 ADFS 服务器执行未经请求的 SAML 2.0 发布。信任关系有效,用户进入我们的系统,但没有任何索赔通过。我们得到的只是这个(来自我们的应用日志文件):

9/1/2015 7:35:44 PM: Claim type = http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod, value = urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
9/1/2015 7:35:44 PM: Claim type = http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant, value = 2015-09-01T23:35:40.194Z

比较 SAML 令牌,格式完全不同。例如,在 SAML 1 中有这样的自定义声明:

<saml:Attribute xmlns:a="http://schemas.xmlsoap.org/ws/2009/09/identity/claims" AttributeName="customerguid" AttributeNamespace="http://schemas.xmlsoap.org/ws/2005/05/identity/claims" a:OriginalIssuer="http://Absolut.vis-intel.net/adfs/services/trust">
<saml:AttributeValue>8835cf46-07a6-45f7-82d9-978905b5911f</saml:AttributeValue>
</saml:Attribute>

但是他们的进来是这样的:

<saml2:Attribute Name="CustomerGuid">
<saml2:AttributeValue>b4f3dd70-ef42-4596-be76-3e3fa077d06e</saml2:AttributeValue>
</saml2:Attribute>

我们正在考虑也许我们需要对声明规则做一些事情。它们看起来像这样:

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/customerguid"]
 => issue(claim = c);

我们添加了自定义声明类型并尝试更改声明规则以使用它们来尝试获取 CustomerGuid,但这没有任何区别:

c:[Type == "CustomerGuid"] => issue(claim = c);

寻找有关如何完成这项工作的任何指示。

【问题讨论】:

    标签: saml saml-2.0 adfs3.0


    【解决方案1】:

    这不是由于 SAML 版本的差异。

    从 IDP 发布 SAML 属性时,属性名称通常使用名称格式进行限定。此处缺少此名称格式。

    您需要请求客户 IDP 以所需格式发布声明,或使用中间 ADFS 转换为 SP / RP 预期的格式。

    如果您的依赖方需要名称格式 -

    http://schemas.xmlsoap.org/ws/2005/05/identity/claims/customerguid

    那么 SAML 声明应由 IDP 按以下格式发布:

    <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/customerguid">
                <AttributeValue>b4f3dd70-ef42-4596-be76-3e3fa077d06e</AttributeValue>
    </Attribute>
    

    如需进一步阅读,请参阅 SAML 规范的这一部分:

    http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html#4.4.3.Attribute%20Statement%20Structure|outline

    【讨论】:

    • 是的,我突然意识到我们发布了联合元数据 XML 以表明我们期望来自 IdP 的声明。显然,客户甚至没有检查这一点,而是根据我们的电话交谈组成了他们的令牌(“是的,我们期望名称和 CustomerGuid”)。所以你是绝对正确的,我很高兴现在一切正常。
    • 很高兴知道所有内容都已排序。干杯队友!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-16
    • 1970-01-01
    • 2013-05-26
    • 1970-01-01
    • 2011-10-15
    相关资源
    最近更新 更多