声明规则参考ADFS中的先前声明?

时间:2016-06-27 19:02:11

标签: saml adfs

我无法让ADFS向我的应用发送声明。身份验证现在已成功完成,但我们在规则中设置的所有声明均未随响应一起发送。我按此顺序有两条规则。

在第一条规则中,我的理解是类型部分是我的应用程序期望ADFS输出的任何内容,并且不需要与LDAP值对应。真正重要的是必须引用有效LDAP属性的query。我确信query值是有效的LDAP属性,因为另一个工作的依赖方配置使用这些相同的查询值(但它们在types中使用不同的值进行输出)。

在第二条规则中,我引用了Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"。这不是LDAP中的类型,而是对第一个规则中创建的声明的引用。我这样做了吗? 第二条规则可以引用第一条规则的输出类型吗?

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
 => issue(store = "Active Directory", types = 
("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", 
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", 
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", 
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"), 
query = ";givenName,sn,mail,employeeI;{0}", param = c.Value);

第二条规则

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"]
 => issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", 
Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, Value = c.Value, ValueType = c.ValueType, 
Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", 
Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/namequalifier"] = "http://somedomain.com/adfs/services/trust", 
Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/spnamequalifier"] = "https://someapp.somedomain.com/sp");

此外,如果依赖方未设置加密证书(使用IDP证书生成签名/验证),ADFS是否有理由不发送声明?

1 个答案:

答案 0 :(得分:2)

未发送声明的通常原因是这些AD属性为空。

您不能将相同的声明用作输入/输出。

将nameidentifier从第一个声明中删除,另外声明会输出类似http://company.com/temp的内容,而添加而不是问题

然后使用http://company.com/temp作为第二个声明的输入,输出为http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier

相关问题