SAML 2.0 声明未通过 ADFS

标签 saml saml-2.0 adfs3.0

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

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 token 相比,格式有很大不同。例如,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 版本的差异造成的。

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

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

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

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

那么 IDP 应按以下格式发布 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

关于SAML 2.0 声明未通过 ADFS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32342584/

相关文章:

c# - ID3242 : The security token could not be authenticated or authorized

wso2 - 将 OpenID Connect 与 WSO2 API Manager 和 ADFS 结合使用

c# - 从另一方收到不安全或不正确的安全故障。(使用 SAML 时)

amazon-iam - 在 IAM 角色策略中定位联合 SAML 用户

java - Spring Security SAML 扩展,具有跨多个 tomcat web 应用程序的“记住我”功能

c# - 如何为 Kentor idprovider 添加自定义元数据?

java - Liferay/Java 通过 ADFS 自定义登录

php - 为 php 应用程序实现 SSO 的步骤

Node.js Passport-saml 重定向到 localhost :3000/login/callback all the time

javascript - Nodejs - 一次登录的 Passport-saml 实现