2015-09-01 65 views
2

我们拥有声明感知应用程序,并使用ADFS服务器对来自我们合作伙伴网络的用户进行身份验证。拥有自己的ADFS服务器的客户没有问题。他们的ADFS服务器以SAML 1.0格式向我们发送令牌,并且一切正常。我们有一个客户端向我们的ADFS服务器发送主动提供的SAML 2.0帖子。信任关系起作用,用户进入我们的系统,但没有任何索赔通过。所有我们得到的是这样的(从我们的应用程序日志文件):SAML 2.0声明未通过ADFS

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); 

寻找如何任何指针做这个工作。

回答

4

这不是由于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

+0

是的,我意识到我们发布了联合元数据XML来表明我们期望来自IdP的声明。显然,客户甚至没有检查过,并根据我们的电话谈话编写了他们的令牌(“是的,我们期望Name和CustomerGuid”)。所以你绝对正确,我很高兴现在一切正常。 –

+0

很高兴知道所有东西都已排序。队友的欢呼声!! – Karthik