A knowledge base article about How do I use Shibboleth/ SAML for SSO? provided by the UC Berkeley IT Service Hub - Knowledge Portal
Shibboleth is a web-based Single Sign-On infrastructure. It is based on SAML, a standard for the exchange of authentication data. Shibboleth has been adopted by the University of California as the basis for federated Single Sign-On between the UC campuses. Shibboleth allows one to authenticate using a local institutional service (IdP) to gain access to remote resources and services.
Understanding Shibboleth and SAML is much easier if you know some terminology. A successful deployment of Shibboleth involves two critical software components:
Identity Provider (IdP)
This is the server that handles authentication of users. UC Berkeley has deployed an IdP at shib.berkeley.edu. Only one IdP is needed per campus.
Service Provider (SP)
An IdP is useless without Service Providers. Service Providers are web applications, resources, or other services which require authentication. The Shibboleth SP software allows most web servers (namely Apache and IIS) to integrate with an IdP or a number of IdPs. Examples of SPs are: UCReady, the UCB Learning Center (a SumTotalSystems application hosted at UCOP by SumTotalSystems), and At Your Service (AYSO, hosted at UCOP).
The SP software consists of several components:
Be sure to have all of the following information before submitting your request:
You'll need some information about our IDP to complete setup.
Some services can use the metadata directly, but many will need several elements separated.
These instructions have been simplified and are UC Berkeley specific. If you need more complete instructions visit the Shibboleth Wiki - Installation page(link is external).
Configuration can be a difficult process; this is because it is both a new subject and one that is modifying XML. The main file that you will be editing is the shibboleth2.xml file. You will find this file in the configuration directory of your install and there are several sections that you will need to edit.
Under the section RequestMapper in the RequestMap tag you'll need to edit the host name. The path name "secure" is the directory that shibboleth will protect on your web server. We will use
<Host name="yourserver.berkeley.edu"><Path name="secure"authType="shibboleth"requireSession="true"/></Host> |
You'll need to change the EntityID for your host. The convention is listed below. While the example listed is a URL, the entityID is used as an identifier in the metadata for your SP. The URLs used to contact your SP will be part of the metadata.
<ApplicationDefaults id="default" policyId="default"REMOTE_USER="eppn persistent-id targeted-id"signing="false" encryption="false"> |
The SSO section replaces much of the manual setup. If you need to add a discovery service, you add that later.
Using a SAML Discovery Service:
<SSO discoveryProtocol="SAMLDS" discoveryURL="https://shib-test.berkeley.edu/ds/ucready.wayf"(link is external)>SAML2</SSO> |
The session initiator is used to determine which IdP to send your SP for authentication and authorization information. It can either be a specific server or discovery service which allows the user to pick from a list of IdPs. Here are two examples:
specific server (The entityId is for our production IdP. The entityId for a test IdP is entityID="https://shib-test.berkeley.edu/idp/shibboleth(link is external)")
<SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="Intranet"relayState="cookie" entityID="urn:mace:incommon:berkeley.edu"><SessionInitiator type="SAML2"acsIndex="1" template="bindingTemplate.html"/><SessionInitiator type="Shib1" acsIndex="5"/></SessionInitiator> |
discovery service (the URL for the test IdP is URL="https://shib-test.berkeley.edu/ds/ucready.wayf(link is external)")
<SessionInitiator type="Chaining"Location="/DS"id="DS"relayState="cookie"isDefault="true"><SessionInitiator type="SAML2"defaultACSIndex="1"template="bindingTemplate.html" /><SessionInitiator type="Shib1"defaultACSIndex="5" /><SessionInitiator type="SAMLDS"defaultACSIndex="1"</SessionInitiator> |
Here you need to specify where you are getting the metadata that will identify either the specific IdP or the list of IdPs. The metadata for shib-test.berkeley.edu is attached to this page, see below.
<MetadataProvider type="Chaining"><!-- Example of remotely supplied batch of signed metadata from InCommon. --><MetadataProvider type="XML"uri="https://md.incommon.org/InCommon/InCommon-metadata-idp-only.xml(link is external)"(link is external)backingFilePath="incommon-metadata.xml" reloadInterval="7200"> or [calnet:shib-test-metadata.xml]</MetadataProvider><!-- Example of locally maintained metadata. --><MetadataProvider type="XML" file="idp.xml"/></MetadataProvider> |
<?xml version="1.0" encoding="UTF-8"?> |
If an SP kills its own browser sessions, then call https://shib.berkeley.edu/idp/logout(link is external), the Shibboleth and CAS sessions in the browser are both closed as well. The Shibboleth logout URL removes Shibboleth cookies in the browser then redirects to the CAS logout URL which does the same for any CAS cookies. Other browser sessions with other SPs are potentially unaffected by this action which therefore does not guarantee a global SSO logout but rather effects (1) Shibboleth and CAS SSO session terminations for the browser and (2) termination of the one application's browser session for the SP invoking the call.