我们的IdP是Salesforce.com组织。 SP是第三方.Net应用程序。在开发过程中,第三方报告说他们无法验证发送的SAML响应。SAML签名验证失败
我们决定尝试使用ComponentSpace验证我们的结果,以验证SAML响应。以下是我们尝试过的:
// Load the certificate from the file: certInFile
// Load the SAML in an XMLElement: samlXml
// Retrieve the certificate from the SAML: certInSaml
Console.WriteLine("SAML is valid ? " + SAMLResponse.IsValid(samlXml));
Console.WriteLine("Is SAML signed? " + SAMLMessageSignature.IsSigned(samlXml));
Console.WriteLine("Certificate found in SAML is same as certificate file? " + certInFile.Equals(certInSaml));
Console.WriteLine("Validated SAML with certificate found in SAML" + SAMLMessageSignature.Verify(samlXml, certInSaml));
Console.WriteLine("Validated SAML with certificate file" + SAMLMessageSignature.Verify(samlXml, certInFile));
我对上述所有内容都有效,除了最后两个。所以:
- 的SAML有效
- 的SAML有一个有效的签名
- 在SAML的公钥证书是一样的,我们
- 的SAML与私人签订的证书文件无论是证书文件,也没有在SAML
发送从3,4公钥密钥才能得出结论,Salesforce的是签署,但用不同的证书,但在发送响应错误的公钥?
编辑:样品SAML是这里http://pastebin.com/J8FTxnhJ
我缺少什么?
您可以将完整的SAML消息粘贴到某处吗? –
@Stefan http://pastebin.com/J8FTxnhJ –
这个问题解决了吗?我正面临类似的问题,即XML签名验证失败。 IDP是Salesforce.com – mithrandir