Allow SP initiated Artifact binding#2412
Allow SP initiated Artifact binding#2412monkeyiq wants to merge 1 commit intosimplesamlphp:simplesamlphp-2.4from
Conversation
If this block is in use then the SP will send an `art` request using the binding to the IdP which will fail. It seems the request from the SP to the IdP must be a normal redirect but with the special artifact attribute to indicate to the IdP that the login should be processed using an artifact. Without this explicit elseif block an AuthnRequest will be delivered normally to the IdP and will still have the artifact attribute. The successful SAML login will see a GET with an `art` and in the samltracer you don't get to see the response because it is happening in the background between the SP and IdP. For example: GET https://FQDN/sspsmall/module.php/saml/sp/saml2-acs.php/default-sp?SAMLart=AAQ
|
I am testing this on sspsmall which I have upgraded to SSP 2.3.7. Testing in the admin interface and the I have set default-sp to be an SP which wants to communicate with the same install of SSP as an IdP. As per the documentation (https://simplesamlphp.org/docs/stable/simplesamlphp-artifact-sp.html) I have set the SP to have the ProtocolBinding of The expected behaviour here is to be able to login using the admin/test page. I can login with the setup if I am not using Artifact binding so the user name / password and configuration is known to work. If the ProtocolBinding is set as above to The SSP logs show: The SAML Tracer shows a single SAML entry for a GET at The SAML tab of Tracer shows |
|
With this PR applied the login flow for admin/test becomes The SAML page (the SAMLRequest) is as follows. Note that the ProtocolBinding is set to Artifact in the message. The next SAML Trace message is a GET sending the SAMLart back to the SP. I think it will be interesting to dig into the background |
|
The change in this PR does allow a login to happen. Looking at saml-bindings-2.0-os.pdf page 33 line number 1216 onwards it seems the Artifact flow here should be sending the SAMLart as in the current code and the IdP would then perform a SOAP call to the SP to ask for the actual SAML message ( I will dig into the code a bit more to see if there is a way I can get that flow to happen. |
|
On the other hand if one is attempting to send the initial The code path works OK if the IdP has sent back an |
e79437c to
93ca2d0
Compare
84e2e2f to
93ca2d0
Compare
|
I will add some test suite action for these as a next stage as time permits. It seems you can use the artifact binding in more places than this PR is targeting. On the other hand the SSP code doesn't seem to have direct support for that wider range of use cases at the moment. |
0f023ea to
f3f5ea3
Compare
If this block is in use then the SP will send an
artrequest using the binding to the IdP which will fail. It seems the request from the SP to the IdP must be a normal redirect but with the special artifact attribute to indicate to the IdP that the login should be processed using an artifact.Without this explicit elseif block an AuthnRequest will be delivered normally to the IdP and will still have the artifact attribute. The successful SAML login will see a GET with an
artand in the samltracer you don't get to see the response because it is happening in the background between the SP and IdP.For example:
GET https://FQDN/sspsmall/module.php/saml/sp/saml2-acs.php/default-sp?SAMLart=AAQ
This relates to a recent discussion on the mailing list with topic "Using artifact binding with simplesamlphp SP and IdP".