Open byxor opened 4 years ago
There is no support for embedded signature at AuthnRequest class. The supported binding is the HTTP-Redirect binding and the Signature is generated at the buildRequestSignature of the Auth method.
With the AuthnRequest class you will only get the XML data related to the AuthNRequest, but with no Signature element.
You can sign the AuthNRequest in a similar way than the Metadata XML is signed at the signMetadata method with the Util.addSign method
Hi, I've generated a valid X509 certificate and its associated private key. I'd like to use them to sign an authentication request.
I've configured the
Saml2Settings
as follows:But when I generate an
AuthnRequest
with the following code, it doesn't have a signature:Here's the full decoded and inflated AuthnRequest:
I understand that with HTTP-Redirect bindings, the signature is expected to be provided as a URL parameter. I also understand (correct me if I'm wrong), that with HTTP-POST bindings, the signature should be embedded in the SAML payload.
It says HTTP-POST bindings are being used, yet there's no signature in the message.
Perhaps the signature is being removed by the DEFLATE encoding? As mentioned in the SAML 2.0 bindings specification:
How do I correctly use this library to add a signature to my AuthnRequest?