Does anybody know the correct steps order of creating Signed SAML Authnentication Request?
I've tried with the below steps, but unfortunately the WSO2IS throws an exception
- Generate the SAMLRequest value
- Encode the SAMLRequest value in Base64
- URL-encode the SAMLRequest value
- URL-encode the SigAlg value: http://www.w3.org/2000/09/xmldsig#rsa-sha1
- Feed the algorithm signature (
SHA1withRSA
) with the
SAMLRequest=value&SigAlg=value
- URL-encode the generated signature
Thanks in advance
EXCEPTION MESSAGE:
ERROR {org.opensaml.xml.security.SigningUtil} - Error during signature verification java.security.SignatureException: Signature length not correct: got 252 but was expecting 256 at sun.security.rsa.RSASignature.engineVerify(Unknown Source) at java.security.Signature$Delegate.engineVerify(Unknown Source) at java.security.Signature.verify(Unknown Source) at org.opensaml.xml.security.SigningUtil.verify(SigningUtil.java:247) at org.opensaml.xml.security.SigningUtil.verify(SigningUtil.java:215) at org.opensaml.xml.security.SigningUtil.verifyWithURI(SigningUtil.java:184) at org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine.validate(ExplicitKeySignatureTrustEngine.java:156) at org.wso2.carbon.identity.sso.saml.validators.SAML2HTTPRedirectDeflateSignatureValidator.validateSignature(SAML2HTTPRedirectDeflateSignatureValidator.java:78) at org.wso2.carbon.identity.sso.saml.util.SAMLSSOUtil.validateDeflateSignature(SAMLSSOUtil.java:625) at org.wso2.carbon.identity.sso.saml.util.SAMLSSOUtil.validateAuthnRequestSignature(SAMLSSOUtil.java:578) at org.wso2.carbon.identity.sso.saml.processors.SPInitSSOAuthnRequestProcessor.process(SPInitSSOAuthnRequestProcessor.java:108) at org.wso2.carbon.identity.sso.saml.SAMLSSOService.authenticate(SAMLSSOService.java:192) at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleRequestFromLoginPage(SAMLSSOProviderServlet.java:415) at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleRequest(SAMLSSOProviderServlet.java:127) at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.doPost(SAMLSSOProviderServlet.java:81) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)