Hi Ruud,
After reviewing both the bindings document and the core one, together with the approved errata, I don’t think the Destination attribute is really mandatory. I agree that the wording in the bindings document might be a bit ambiguous, but I can’t find any place in the specifications that explicitly says that the Destination attribute is mandatory in such case. If they meant it to be, it should be said explicitly in the document, apart from the statement that tells what it must contain.
> Note that SSP is using HTTP-REDIRECT&POST as protocol bindings.
>
> As it turns out SimpleSAMLPHP does not send the Destination attribute and OpenAM does verify the attribute (and fails with a InvalidException) which is entirely within the protocol specifications.
> After I fixed this in SSP OpenAM does not fail anymore and the SLO works as it should.
I would say it’s the other way around actually. OpenAM should only verify the value of the attribute if the attribute is present, which it doesn’t need to be, IMO.
> Some more SAML2 assertion checking later I found, to my own surprise, that OpenAM does not send the Destination attribute as well as you can see below:
Which is exactly what I would expect. To me it looks like the incoherence in OpenAM’s behaviour is due to a bug in the message validation code.
> <samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
> ID="s864ea489ee3dd41f984737cd4a7568d73e14f00b"
> Version="2.0"
> IssueInstant="2014-06-27T14:27:48Z"
> InResponseTo="_0be5e5703926c13a8dd8e7280fc9f84760091fcdc6"
> >
> <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
https://proxyidp.test.local:8443/openam</saml:Issuer>
> <samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
> <samlp:StatusCode xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
> Value="urn:oasis:names:tc:SAML:2.0:status:Success"
> />
> <samlp:StatusMessage xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
> Request is done successfully
> </samlp:StatusMessage>
> </samlp:Status>
> </samlp:LogoutResponse>
>
> Because SimpleSAMLPHP does not even check the Destination attribute the SLO finishes without error. Now, you could argue that it's not a big deal because its just a final logoutresponse signalling that the SLO is done.
SimpleSAMLphp should definitely check the attribute if it’s present, and verify that its contents match the current URL, which it does from version 1.7, at least for logout requests. Can’t tell right now if it behaves in the same way with other messages.
> But if SSP does check on it users would get a nice HTTP error page
>
> IMHO this is a bug in both the OpenAM and SSP code and for the SSP part it would be wise to fix this. I attached my own source code fix on modules/saml/sp/saml2-logout.php to address the missing Destination attribute in the LogoutResponse.
> I also added some code to validate the Destination when receiving a LogoutResponse but since I can not check if that works (since OpenAM does not send it) it is commented out. Your mileage may vary....
>
> Email has also be sent to the OpenAM userlist, see
https://lists.forgerock.org/pipermail/openam/2014-June/017647.html
Any feedback on why OpenAM seems to require the attribute to be present?
--
Jaime Pérez
UNINETT / Feide
mail:
jaime...@uninett.no
xmpp:
ja...@jabber.uninett.no
"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost