Cómo verificar una firma SAML para el enlace de redireccionamiento HTTP
Recibo una solicitud de SAML a través de redireccionamiento HTTP que vincula el contenido de la solicitud de SAML con este aspecto
{"SigAlg" => "http://www.w3.org/2000/09/xmldsig#rsa-sha1", "SAMLRequest"=> "lVLLaoQwFP0VyT5jEqPG4AiFoSDMtNApXXQzxDxaQRObRDqfX3XoolAKXd7DPQ / uuXUQ4zDxo3tzc3zSH7MOMWkPe3DpcixzVVVQl4RBqoiCncEYEmkoY7k00hCQvGgfemf3gOwQSNoQZt3aEIWNC4RwCRGGiD6jkmPMs2KHUPYKksPi0lsRN + Z7jFPgafqpvejtbtQpSK7jYAPfsu3B7C13IvSBWzHqwKPk57vTkS + WfPIuOukG0NSbub9R / yaJELRfzUGzrhmtFut15qdeeheciY926K2u05toUz8sIu0huXd + FPFv9RXpFTTbKp / WA4WobQT / jEYrykwhNaQ66yDNMwY7wijEtMCmysqqo6xOb8Ga + tbjWYe1jtYqfW0uCucoYwWCHS3F0kRGoajWTpAiiJRZJRmu01 + Y3 + CPt2i + AA =="}
También tiene un valor de firma
WkDaGzC6vPTlzh + EnFA5 / 8IMmV7LviyRh2DA5EHF0K0nl + xzBlKfNCYRnunpwoEvGhereGdI5xBpv + mc9IguiCaLZSZjDh6lIDdpvctCnmSNzORqzWQwQGeZ9vjgtCLjUn35VZLNs3WgEqbi2cL + ObrUDS2gV1XvBA3Q3RRhoDmi + XE89Ztnd1cNpR3XdA + EL2ENbMI2XAD9qSgMufUJY / 3GBBpT7Vg1ODtPxBudq + sXrgPh / + WtUUitLkkfC8tdRTCS1EZPv + h27I5g / VNza23Xl8w2HdAuYP0F2FjREo8VV2aUtaOUd / jAF9 + bfkGV93y1PzFttLxdBbFoxp6qBg ==
Pero no entiendo cómo verificar que esta firma sea correcta.
Sección 3.4.4.1 sobre enlace SAMLhttps://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf
To construct the signature, a string consisting of the concatenation of the RelayState (if present),
SigAlg, and SAMLRequest (or SAMLResponse) query string parameters (each one URLencoded)
is constructed in one of the following ways (ordered as below):
SAMLRequest=value&RelayState=value&SigAlg=value
SAMLResponse=value&RelayState=value&SigAlg=value
Intenté el enfoque pero
La firma que generé usando la clave privada no coincide con la que recibí de mi SP. (publicado arriba)
Además, no puedo descifrar el mensaje firmado con la clave privada (supongo que la firma se creó con el público con el que la federé).
<samlp:LogoutRequest ID="_36167d94-d868-4c04-aee3-8bbd4ed91317" Version="2.0" IssueInstant="2017-01-05T16:21:55.704Z" Destination="https://werain.me/" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"><Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">urn:federation:MicrosoftOnline</Issuer><NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">4948f6ce-4e3b-4538-b284-1461f9379b48</NameID><samlp:SessionIndex>_eafbb730-b590-0134-a918-00d202739c81</samlp:SessionIndex></samlp:LogoutRequest>
Cualquier ayuda aquí.