-
-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Destination in LogoutResponse when using responseUrl #443
Comments
Hi @mvangeest, We are also experiencing this issue, in connection with us integrating with uu.nl |
Our temporary fix is to add the to $destination = isset($idpData['singleLogoutService']['responseUrl']) ? $idpData['singleLogoutService']['responseUrl'] : $idpData['singleLogoutService']['url'];
$logoutResponse = <<<LOGOUTRESPONSE
<samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="{$this->id}"
Version="2.0"
IssueInstant="{$issueInstant}"
Destination="{$destination}"
The changes I had in mind wouldn't be very complicated and I'll see if I can put together a PR. It's just that I'd like to hear from the maintainers if they think it's a good idea, because there are several PRs that have been open for a while. |
Exactly what I ended up doing in our fork. |
Sorry for the long delay, I will take care of this fix. @mvangeest thanks for your suggestions |
…Url. Add IdP value getters to the Settings class
Thanks for fixing this! That solution is exactly what I meant. |
I'm trying to work with an IdP that has an SLO endpoint with different URLs for LogoutRequests and LogoutResponses. That almost works by setting the
responseUrl
in thesingleLogoutService
section of the IdP settings:Auth::processSLO
correctly usesAuth::getSLOResponseUrl
and sends the LogoutResponse to the right URL. However,LogoutResponse::build
uses the following code to set the value ofDestination
attribute:As a consequence, the
Destination
value does not match the destination URL, which causes the IdP to reject the message.The SAML2 standard says (saml-core-2.0-os, section 3.2.2):
I, along with the IdP, interpret this to mean
Destination
should be set to theresponseUrl
when the LogoutResponse is sent to that URL.I could've submitted a simple PR to fix this, but I don't think it's a good idea to duplicate the
Auth::getSLOResponseURL
code inside theLogoutResponse
class. I think the most elegant fix would be to move all URL getters (getSLOResponseURL
,getSLOURL
,getSSOURL
) toSettings
so that all consuming classes (Auth
,AuthnRequest
,LogoutRequest
,LogoutResponse
) can use them. I can probably submit a PR for that if you'd like.The text was updated successfully, but these errors were encountered: