display precise error while sending direct SOAP SAML message
Concerned version
Version: %2.0.13
Platform: any
Summary
diplay precise error while sending direct SOAP SAML message:
in SAML.pm, in method resolveArtifact:
# SOAP call
my $soap_answer = $self->ua->request($request);
if ( $soap_answer->code() == "200" ) {
$message = $soap_answer->content();
$self->logger->debug("Get message $message");
}
Logs
Sep 2 14:30:22 hostname LLNG[53061]: [debug] HTTP-REDIRECT: SAML Artifact SAMLart=abcdef%3D&RelayState=123456789
Sep 2 14:30:22 hostname LLNG[53061]: [debug] Send message <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"><s:Body><samlp:ArtifactResolve ID="_DB22FC2D414AC8FC3F89FB8BEAA1ADEE" Version="2.0" IssueInstant="2021-09-02T12:30:22Z" Destination="https://idp.mydomain.com/saml/artifact"><saml:Issuer>https://sp.mydomain.com/saml/metadata</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">#012<SignedInfo>[...]</s:Body></s:Envelope> to https://idp.mydomain.com/saml/artifact
Sep 2 14:30:22 hostname LLNG[53061]: [debug] [error] SSO request or response was not found
Sep 2 14:30:22 hostname LLNG[53061]: [debug] Returned error: 48 (PE_SAML_ERROR)
Sep 2 14:30:22 hostname LLNG[53061]: [debug] Returned userId: anonymous
Possible fixes
Add an precise message in case of error.