Módosítások

Single Logout in Shibboleth IdP

10 311 bájt hozzáadva, 2010. november 24., 17:34
2.2.0-slo10
== Important notes on third party cookies ==
In some browsers, the IFrame-driven front-channel logout doesn't work due to the browser blocking [http://en.wikipedia.org/wiki/HTTP_cookie#Third-party_cookies third party cookies].
 
Every cookie which is sent to a foreign domain via img, iframe, script, etc. tags is considered to be third party, so the session cookie of the SP software in a foreign domain is third party cookie when it is sent in an IFrame. By blocking these cookies, the SP doesn't receive the session cookie and thus it could stop processing the logout request at this point.
 
Additional links:
* [http://n2.nabble.com/Frames-cookies-question-td4127538.html#a4127538 Shibboleth-dev thread on the issue]
* [http://support.mozilla.com/en-US/kb/Disabling+third+party+cookies How to disable third party cookies in firefox]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=417800#c11 Additional explanation in Mozilla Bugzilla]
* [http://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_cookies Same origin policy for cookies]
* [http://code.google.com/p/browsersec/wiki/Part2#Third-party_cookie_rules Further information on third party cookie handling]
 
"Although any third-party cookie restrictions are not a sufficient method to prevent cross-domain user tracking, they prove to be rather efficient in disrupting or impacting the security of some legitimate web site features, most notably certain web gadgets and authentication mechanisms."
 
=== Why service providers might need the session cookie ===
Most of the services do not need the session cookie itself, they only need the NameIdentifier, which is carried by the logout request, so back-channel logout requests are enough for them. But there might be service providers which do not implement back-channel bindings (eg. SimpleSAMLphp), or need front-channel application notification.
 
=== Why not fully back-channel? ===
SAML profiles specification (section 4.4.3.1) clearly states that front-channel should be preferred when sending the logoutrequest to the session authority (IdP). If the user interface is generated by the IdP, it could inform the user about the whole logout process, and each SP response. If the SP would use back-channel logoutrequest, the IdP's response would only contain minimal information (ie. success or failure), and this is not desirable. Also, the IdP would need to execute back-channel requests in parallel and synchronize them with the originating request, so this would make the processing code much more complex.
 
=== Technical solution ===
Our proposal is to prefer back-channel endpoints at the service provider side, unless your application needs to be notified via front-channel. For example,
* if your application behind your SP needs the session cookie with the notification, use only front-channel bindings in the SP metadata,
* otherwise use only back-channel binding in the SP metadata.
 
By these mutually exclusive endpoint sets, the SP can clearly advise the IdP which binding it should use when contanting this SP. Thus on the IdP side, both implementations need to be available.
 
=== Non-technical solution ===
Another option would be to add a new requirement for your end users. You can claim that banning third-party cookies is unsupported (because it breaks SLO), just like disabling all cookies (which breaks SSO). Convincing your users (and the Shibboleth developers to accept this solution) might be dubious, though.
 
== Features ==
* Implements SAML2 Single Logout profile (not the full specification, see the Missing features section below for details).* User If initiated by an SP, user must confirm the single logout process, : one can choose to logout only from the initiating SP and the IdP.
* Highly customizable front-channel logout interface which leverages javascript and asynchronous operations in order to provide a clean, simple UI.
* UI is usable with javascript disabled.
* Supports Shibboleth SSO sessions (if the SP initiates sessions using Shibboleth1.3 protocol, but supports SAML2 logout).
* Supports full back-channel operation.
* Supports IdP-initiated Single Logout.
== UI customization ==
* rendering the logout question and controller page
* initiating front-channel or back-channel logout to one SP (<code>SLOServlet?logoutaction&entityID=...</code>)
* returning the logout status as a JSON string (<code>SLOServlet?status</code>)
==== With javascript ====
The controller renders a page where an iframe is placed for every active session participant. This iframe calls the <code>SLOServlet?logoutaction&entityID=...</code> URL where the logout request is issued for the given session participant. If the request is front-channel, the iframe will make a front-channel SAML message exchange with the peer (using HTTP-Redirect or POST bindings).
The status of the single logout process is queried via asynchronous requests. The status response from <code>SLOServlet</code> is a JSON array. This JSON array contains one object with the <code>entityID</code> and <code>logoutStatus</code> properties for each session participant.
* <code>LOGOUT_FAILED</code>: logout failed.
* <code>LOGOUT_UNSUPPORTED</code>: SAML2 logout is not supported by the participant (the metadata does not contain the necessary endpoints).
* <code>LOGOUT_TIMED_OUT</code>: timed out waiting for a response.
* <code>LOGOUT_SUCCEEDED</code>: logout was successful.
Status queries are issued using exponential backoff timing, until the timeout is reached. Please see the <code>sloController.jsp</code> for the exact timing used.
* <code>Logout succeeded</code> message when logout process was finished, and all session participants completed the logout.
With javascript disabled==== IdP-initiated Logout (available since v2.1.3-slo2) ====The user can initiate their logout process from the IdP (the URL is <code>/idp/Logout</code>). IdP-initiated logout has a clear advantage over SP-initiated logout, because the timeout URL and the UI is not possible, so if one session participant fails to respondfully independent from the current SP software used, thereby providing a unique logout URL for all users of the user gets stuck on the status pagegiven IdP.
== Non-trivial settings ==
SAML Single Logout Profile requires the logout requests and responses to be signed or otherwise authenticated. Without this, a user session could be DOS-ed knowing the NameID.
;You have two choices* instruct the SP to sign messages * configure the IdP not to require authentication of logout messages (and bear with possible DOS-attacks)==== Signing messages is quite common ===={|{{prettytable}}|Signing can be turned on by setting the '''<code>signing</code>''' property to '''<code>front</code>''' (for front-channel only) or '''<code>true</code>''' in the <code>ApplicationDefaults</code> or <code>ApplicationOverride</code> element in shibboleth2.xml.|}{{NOTE_EN|Signing messages but is normally unnecessary for back-channel, as the transport is usually authenticated with the certificates in the metadata. However, for back-channel logout it is the IdP who initiates the HTTP connection to the SP, and it is the '''webserver''', who answers the request. Because of the different needs, the webserver almost always uses a different certificate (a server certificate signed by a well-known server certificateCA) than the SP (possibly self-signed, client certificate). '''Therefore the SP must sign back-channel messages as well to authenticate itself to the IdP.'''{{INFO_EN|Signing Unfortunately, you can be turned on by setting the '''<code>only enable signing</code>''' property to '''<code>true</code>''' in the <code>ApplicationDefaults</code> or <code>ApplicationOverride</code> element in shibboleth2.xmlall (otherwise transport protected) messages, and this may affect performance.}}
This is required for back-channel logout to work==== Not requiring peer authentication ===={|{{prettytable}}|Message issuer authentication can be turned off by changing the security policy of processing Single Logout messages. Unfortunately, You can do this enables signing all (transport protected) messages as well, which might affect performanceby commenting out the following line from the block '''<code>SAML2SLOSecurityPolicy</code>''' at '''<code>relying-party. xml</code>''':::<source lang="xml"><security:Rule xsi:type="security:MandatoryMessageAuthentication" />}</source>|}
=== Session lifetime ===
The IdP can limit the maximum lifetime of the SP session by using the (optional) <code>SessionNotOnOrAfter</code> property in the SAML2 authentication statement. SAML1.1 does not have this feature, so '''you cannot limit the session lifetime for SPs using Shibboleth SSO protocol.'''
{| {{INFO_ENprettytable}}|This can be set in the <code>relying-party.xml</code> by specifying the number of milliseconds in the '''<code>maximumSPSessionLifetime</code>''' attribute of the '''<code>SAML2SSOProfile</code>''' configuration.}|}
== Required changes in the IdP API ==
=== Name identifier caching in IdP session ===
In the LogoutRequest the IdP must reference the current user's name identifier. This name identifier is issued as part of the SSO process. In order to efficiently retrieve this information, the IdP should cache the name identifier in the IdP session information object.
Associated ticket: [https://bugs.internet2.edu/jira/browse/SIDP-338 SIDP-338]
 
=== IdP Session invalidation ===
Currently there is a bug in the IdP implementation which causes the IdP sessions to outlive the session removal.
 
Associated ticket: [https://bugs.internet2.edu/jira/browse/SIDP-333 SIDP-333]
 
== How to use ==
=== How to build ===
* install the maven2 build tool
* source code is available from our [https://repo.niif.hu/gitweb/gitweb.cgi git repository]
** you can use the convenient snapshot links below to start playing
** if you are brave enough, feel free to clone the whole repository and track our development branches (frontchannel-slo for the idp project and slo-configuration branch for the shibboleth-common project)
* compile the shib-java-common project first with the <code>mvn -DskipTests install</code> command (the first build might take quite a long time if you haven't used maven before)
* compile the java-idp project with the same maven command
* install the <code>java-idp/target/shibboleth-identityprovider-{version}-bin.zip</code> binary package the same way as you'd install a vanilla Shibboleth IdP bundle
 
=== Released versions ===
* download the latest binary snapshot version from our [http://software.niif.hu software distribution site]
 
==== v2.2.0-slo10 ====
* fix configuration templates
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=23593c89903cff2fb53bdb939bd463754496a439;sf=tgz shibboleth-common-1.2.0-slo2]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=275bda0758df9f5f26f35eb69a690b63b697e520;sf=tgz shibboleth-identityprovider-2.2.0-slo10]
 
==== v2.2.0-slo9 ====
* allow EncryptedID to be used in the initiating request (patch contributed by Michael Simon from Karlsruher Institut für Technologie)
* expose method for programatical back-channel logout
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=23593c89903cff2fb53bdb939bd463754496a439;sf=tgz shibboleth-common-1.2.0-slo2]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=46ae3f6475ed578440c72bec3c9a63b387854a70;sf=tgz shibboleth-identityprovider-2.2.0-slo9]
 
==== v2.1.5-slo7 ====
* use AttributeConsumingService/ServiceName to feed the logout interface
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=3f7fa9509d8751787943a32817dab55b69736488;sf=tgz java-shib-common-1.1.4-slo2]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=88e7334e7fdc36454ef5c3bf1342bb402c08bdd4;sf=tgz java-idp-2.1.5-slo7]
 
==== v2.1.5-slo6 ====
* skip session-indexing under error conditions
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=3f7fa9509d8751787943a32817dab55b69736488;sf=tgz java-shib-common-1.1.4-slo2]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=df79269261fc1fdd3ac99cf4aca2fa7fffd38e33;sf=tgz java-idp-2.1.5-slo6]
 
==== v2.1.5-slo5 ====
* fixed NullPointerException with non-existent or filtered NameIdentifiers
* fixed a flaw in session-indexing logic, use the whole NameIdentifier as the index, not just the value
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=3f7fa9509d8751787943a32817dab55b69736488;sf=tgz java-shib-common-1.1.4-slo2]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=bb5b5d27831d06915cba52e474dc3aae62343238;sf=tgz java-idp-2.1.5-slo5]
 
==== v2.1.5-slo4 ====
* upstream version bump
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=97590490012a10586efe8c49c873c36460ef0a2e;sf=tgz java-shib-common]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=8e863b05d849e0ce6ffc224d7b9ca49d4f59742f;sf=tgz; java-idp]
 
==== v2.1.4-slo4 ====
* updated Shibboleth-core
* fixed NullPointerException introduced by an erroneous merge in v2.1.4-slo3
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=9ca9935759326d14fb7044da13bf1a886861bf0a;sf=tgz java-shib-common]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=eb7b7e3ddbadb21fcb819f0b2458593657046df9;sf=tgz java-idp]
 
==== v2.1.3-slo3 ====
* support Terracotta clustering
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=9ca9935759326d14fb7044da13bf1a886861bf0a;sf=tgz java-shib-common]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=2b222548cfbac07520ae3a068097a9a5db0b0ba8;sf=tgz java-idp]
 
==== v2.1.3-slo2 ====
* support IdP initiated logout
* source code snapshots
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-shib-common.git;a=snapshot;h=9ca9935759326d14fb7044da13bf1a886861bf0a;sf=tgz java-shib-common]
** [https://repo.niif.hu/gitweb/gitweb.cgi?p=java-idp.git;a=snapshot;h=b181480e7d9b50de41aa0c2b26c24d673a640dac;sf=tgz java-idp]
 
==== v2.1.3-slo1 ====
* support SP initiated front- and back-channel logout
 
=== Hints ===
{| {{prettytable}}
|
* Don't forget to include Single Logout endpoints in the IdP metadata
* Shibboleth SP prior to 2.1 [https://bugs.internet2.edu/jira/browse/SSPCPP-110 did not include NameID properly] in the LogoutRequest, therefore you cannot initiate SLO with Shibboleth SPs older than 2.1
* Shibboleth SP prior to 2.2.1 answered with Partial logout for back-channel requests due to a [https://bugs.internet2.edu/jira/browse/SSPCPP-223 bug]
* Shibboleth SP (currently released versions) do not distinguish between Success and Partial logout when showing the UI (see [https://bugs.internet2.edu/jira/browse/SSPCPP-236 this report] for details). This is not needed unless you are using back-channel logout.
* If you plan to upgrade a clustered IdP to this version, don't forget to check the new tc-config.xml and rebuild the terracotta boot jar
|}
== Missing features ==
* Administrative logout
* IdP-initiated logoutLogout the user in the underlying JAAS provider
[[Category: Shibboleth IdP]]
565
szerkesztés

Navigációs menü