<ns2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<ns2:SubjectConfirmationData
InResponseTo="_lq77pbf5huvzeifh9v6y15n5uyir3sflelyjchm"
NotOnOrAfter="2015-09-24T06:58:38Z"
Recipient="https://MyServer/login?client_name=MySaml2Client"/>
</ns2:SubjectConfirmation>
--
You received this message because you are subscribed to the Google Groups "pac4j-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<saml2p:AuthnRequest
AssertionConsumerServiceURL="https://MyServer:443/login?client_name=XxxxxxxxSaml2Client"
Destination="https://xxxxxxxxx"
ForceAuthn="false" ID="_jhp3xpb2zfzbbtduudcqagetbpd1bmsphpvxzg8"
IsPassive="false" IssueInstant="2015-10-01T18:01:42.665Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
ProviderName="pac4j-saml" Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<samlp:Response
Destination="https://MyServer/login?client_name=XxxxxxxxxSaml2Client"
ID="_560d7506ceaa32.99458778"
InResponseTo="_mx4guuug7klmjieinalbvmhjciqxfi62jpcxrri"
IssueInstant="2015-10-01T18:01:42Z" Version="2.0"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
.....
<saml:SubjectConfirmationData
NotOnOrAfter="2015-10-01T18:06:42Z"
Recipient="https://MyServer/login?client_name=XxxxxxxxxSaml2Client"/>
</saml:SubjectConfirmation>
......
if (data.getRecipient() == null) {
logger.debug("SubjectConfirmationData recipient cannot be null for Bearer confirmation");
return false;
} else {
if (!data.getRecipient().equals(context.getAssertionConsumerUrl())) { // Context is ExtendedSAMLMessageContext from PAC4J
logger.debug("SubjectConfirmationData recipient {} does not match SP assertion consumer URL, found",
data.getRecipient());
return false;
}
}
if (data.getRecipient() == null) {
logger.debug("SubjectConfirmationData recipient cannot be null for Bearer confirmation");
return false;
} else {
final Endpoint endpoint = context.getSAMLEndpointContext().getEndpoint(); // Context is SAML2MessageContext from PAC4J, SAMLEndpointContext is from OpenSaml
if (endpoint == null) {
logger.warn("No endpoint was found in the SAML endpoint context");
return false;
}
final String url = endpoint.getLocation();
if (!data.getRecipient().equals(url)) {
logger.debug("SubjectConfirmationData recipient {} does not match SP assertion consumer URL, found. SP ACS URL from context: {}", data.getRecipient(), url);
return false;
}
}
--
Hi,Just to be sure: it worked with pac4j 1.6 and the tricky IdP and it doesn't with pac4j 1.7.
Regardless of the source code, I'm not surprised that the check fails if the urls are different (one with a port, the other one without).Either we have something wrong in the code or we need to update the SAML support to address this edge case.Would you mind opening a Github issue for that? The source code is unfortunately the same in pac4j v1.8 and v1.7 so I assume there will be the same problem.
--
Hello Jérôme,
My vote would be -1.
If you want to make the change locally on your end, that’s fine. If you want pac4j to relax its API to allow you to make that change, that’s also fine and we can review your requirements. But we could never ignore the protocol as you suggest. That is a change/risk you have to take on locally. As framework developers, that would be a big violation of the spec.
--
You received this message because you are subscribed to the Google Groups "pac4j-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
|
This email has been sent from a virus-free computer protected by Avast. www.avast.com |