One of our clients is requesting that we implement Single Logout (SLO) through SAML. Their side of the SAML service is the Identity Provider, while ours is the Service Provider. Single-Signon (SSO) works by validating the user's credentials with the client's IdP, then redirecting the user to a login page on yet another platform, with a token that lets them log straight in. That platform knows absolutely nothing about SAML, and in particular doesn't share the SimpleSAMLphp session state.
Logout needs to happen two ways, though:
If the user hits the logout button on our platform, need to log them out of our site, and hit the IdP's SLO service.
If the user hits the logout button on the client's side, or on another service provider's side, the client IdP will hit our SP's SLO service, which then needs to log them out of our real platform before redirecting the user back to the SP's logout response page.
I'm able to convince our platform to redirect the user to an arbitrary page on logout, so I think the first part can be achieved by a page that uses SimpleSAML_Auth_Simple::getLogoutURL()
.
Such a page might also work when hit from the IdP side, but the SAML specs are complicated enough that I can't be sure until we try it. However, the SP configuration in config/authsources.php
doesn't accept a SingleLogoutService
parameter; the metadata as produced by /www/module.php/saml/sp/metadata.php/entityid
still lists /www/module.php/saml/sp/saml2-logout.php/entityid
as the SingleLogoutService location. If that page is necessary for clearing the SimpleSAMLphp session, that's fine, but I need to know how to slip in the extra redirects required for logging the user out of our platform.
I've tried searching for examples, but all I get is API references. It would also be nice to know how I can test logout without attempting to set up my own IdP; is there a service like the openidp.feide.no
that handles SLO as well as SSO?