首页 文章

SAML 2.0声称不通过ADFS

提问于
浏览
2

我们有一个声明感知应用程序,并使用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);

寻找有关如何使这项工作的任何指针 .

1 回答

  • 5

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

    从IDP过帐SAML属性时,属性名称通常使用名称格式进行限定 . 此处缺少此名称格式 .

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

    如果您的依赖方希望使用名称格式 -

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

    然后,IDL应以下列格式发布SAML声明:

    <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

相关问题