【发布时间】:2021-05-16 09:22:03
【问题描述】:
我对 SAML 响应 XML 中的 SignatureValue 有疑问。 在一些 SAML 教程中,我阅读了有关签名值的信息,其中我们需要在发送到 SP 时使用私钥加密 SignatureValue。
我们真的需要在 IDP 端对 SignatureValue 进行加密,然后再发送到 SP 吗?
因为我认为 IDP 会将 PublicKey 发送给 SP,SP 将拥有私钥,通过该私钥可以在 SP 端验证有效负载是否存在完整性问题。
请需要您的宝贵建议。提前谢谢你。
<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="#_SAML-11">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<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>asdfsf2342sdfsaf1123132123sdfsafsafsdf</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>TkjljjlkljllTlkjlsjdljslakfjlsnfl2352nlkn2k3l5lknln2l35nlnlnl2k3nk5lknlkn23l5</ds:SignatureValue>
</ds:Signature>
【问题讨论】:
标签: saml saml-2.0 spring-saml opensaml