SAML无法验证签名



我正在使用PySaml2来实现SAML服务提供程序。

当我接收到有效负载(base64SAMLResponse(时,我的服务器无法接受它,并返回错误SignatureError('Failed to verify signature')

失败的部分是对XMLSec-lib:xmlsec1 --verify --enabled-reference-uris empty,same-doc --enabled-key-data raw-x509-cert --pubkey-cert-pem /path/to/cert.pem --id-attr:ID urn:oasis:names:tc:SAML:2.0:assertion:Assertion --node-id ... --output /path/to/out.xml /path/to/payload.xml的调用。

然而,我使用的是IdP发给我的证书,我可以在传递给上面调用的cert.pem中看到,它确实是传递给xmlsec1的正确证书(与有效载荷本身相同(。

<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_d9e74668-c20d-43ea-9952-fb129adec5c2" Version="2.0" IssueInstant="2021-11-02T15:10:46.745Z" Destination="..." InResponseTo="_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4">
<saml:Issuer>...</saml:Issuer>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status>
<saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_d3f5b2cb-b7d8-4844-9c0f-46e83ba6a7df" Version="2.0" IssueInstant="2021-11-02T15:10:46.745Z">
<saml:Issuer>...</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#_d3f5b2cb-b7d8-4844-9c0f-46e83ba6a7df">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>...</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>...</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>... Here the certificate base64 ...</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">lui@gmail.com</saml:NameID>
<saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml:SubjectConfirmationData NotOnOrAfter="2021-11-02T15:15:46.745Z" Recipient="..." InResponseTo="_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4"/>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Conditions NotBefore="2021-11-02T15:10:46.745Z" NotOnOrAfter="2021-11-02T15:15:46.745Z">
<saml:AudienceRestriction>
<saml:Audience>...</saml:Audience>
</saml:AudienceRestriction>
</saml:Conditions>
<saml:AttributeStatement>
<saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">lui@gmail.com</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Luis</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Lui</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Luis Lui</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">431b0975-c262-4a9c-ab6c-95297efadedb</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
</saml:Assertion>
</samlp:Response>

可能出了什么问题?

编辑:下面是收到的base64编码的XML有效载荷:

PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIElEPSJfYjdiMjA4NDktYjA4Yi00MmYyLTliYTYtZjdlZDNjN2ZkZGUxIiBWZXJzaW9uPSIyLjAiIElzc3VlSW5zdGFudD0iMjAyMS0xMS0xNVQxMjo0NTo1NS4yMjNaIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9hcGkuZGV2LmZvb2RsZXMuY28vYXBpL2F1dGgvc2FtbDIvYWNzL21vbmJ1aWxkaW5nLyIgSW5SZXNwb25zZVRvPSJfNDYwNmNjMWY0MjdmYTk4MWU2ZmZkNjUzZWU4ZDY5NzJmYzVjZTM5OGM0Ij48c2FtbDpJc3N1ZXI+V2l0Y288L3NhbWw6SXNz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很难进行检查。修改后是不可能的。请从测试系统生成另一个文件,然后再次发送。Base64在连接之前先对其进行编码也很好。

您也可以尝试--trusted-pem/path/to/cert.pem选项

更新:

使用新的base64

使用https://samltool.io/显示响应是签名的,而不是断言,因此以下操作将起作用:

xmlsec1--verify--受信任的pem证书.pem--启用的引用uri为空,相同的文档--启用的密钥数据raw-x509-cert--pubkey证书pem证书.em--id attr:id响应--输出.xml tmp.xml

这也适用于XML::Sig和https://tools.chilkat.io/xmlDsigVerify.cshtml

我没有使用PySaml2,所以它可能有一个错误,但如果没有,它现在应该使用正确的证书来验证

相关内容

  • 没有找到相关文章

最新更新