Source:
<code>protected void validateSamlProtocolResponse(final Response response, final SAML2MessageContext context, final SignatureTrustEngine engine) { validateSuccess(response.getStatus()); if (wantsResponseSigned && response.getSignature() == null) { <START> throw new SAMLSignatureValidationException("Signature not found"); <END> } validateSignatureIfItExists(response.getSignature(), context, engine); validateIssueInstant(response.getIssueInstant()); AuthnRequest request = null; final SAMLMessageStore messageStorage = context.getSAMLMessageStore(); if (messageStorage != null && response.getInResponseTo() != null) { final Optional<XMLObject> xmlObject = messageStorage.get(response.getInResponseTo()); if (!xmlObject.isPresent()) { throw new SAMLInResponseToMismatchException("InResponseToField of the Response doesn't correspond to sent message " + response.getInResponseTo()); } else if (xmlObject.get() instanceof AuthnRequest) { request = (AuthnRequest) xmlObject.get(); } else { throw new SAMLInResponseToMismatchException("Sent request was of different type than the expected AuthnRequest " + response.getInResponseTo()); } } verifyEndpoint(context.getSAMLEndpointContext().getEndpoint(), response.getDestination()); if (request != null) { verifyRequest(request, context); } validateIssuerIfItExists(response.getIssuer(), context); }</code><technical_language>explain root here; like: Unable find a signature SAML response returned. Pac4j is configured enforce signatures SAML2 responses identity providers returned response a signature log response (by encoding XML first) do this if debug-level is turned on</technical_language>

Target:
protected void validateSamlProtocolResponse(final Response response, final SAML2MessageContext context, final SignatureTrustEngine engine) { validateSuccess(response.getStatus()); if (wantsResponsesSigned && response.getSignature() == null) { logger.debug( "Unable to find a signature on the SAML response returned. Pac4j is configured to enforce " + "signatures on SAML2 responses from identity providers and the returned response\n{}\n" + "does not contain any signature", Configuration.serializeSamlObject(response)); throw new SAMLSignatureValidationException("Unable to find a signature on the SAML response returned"); } validateSignatureIfItExists(response.getSignature(), context, engine); validateIssueInstant(response.getIssueInstant()); AuthnRequest request = null; final SAMLMessageStore messageStorage = context.getSAMLMessageStore(); if (messageStorage != null && response.getInResponseTo() != null) { final Optional<XMLObject> xmlObject = messageStorage.get(response.getInResponseTo()); if (!xmlObject.isPresent()) { throw new SAMLInResponseToMismatchException( "InResponseToField of the Response doesn't correspond to sent message " + response.getInResponseTo()); } else if (xmlObject.get() instanceof AuthnRequest) { request = (AuthnRequest) xmlObject.get(); } else { throw new SAMLInResponseToMismatchException( "Sent request was of different type than the expected AuthnRequest " + response.getInResponseTo()); } } verifyEndpoint(context.getSAMLEndpointContext().getEndpoint(), response.getDestination()); if (request != null) { verifyRequest(request, context); } validateIssuerIfItExists(response.getIssuer(), context); }