Installing the Shibboleth SP for IIS 7.x

Known Conflicts

The following software is known to cause incompatibilities that affect the installation or use of the Shibboleth SP module:

Preparation

IIS7 is a rather radical rewrite and has some major differences from earlier versions. Superficially, the administration GUI is very different. Furthermore, the scripting interfaces used by the SP installer are not supported by default.

If you want the installer to configure IIS for you, you'll need to make sure the IIS6 management compatibility role services are installed first. In the server roles administration tool, IIS includes a set of role services labeled "IIS 6 Management Compatibility". Install these before performing the SP installation.

You also need to ensure that support for ISAPI filters and extensions is installed. This appears to be a separate installable feature in some cases.

Finally, you need to determine whether your IIS applications are expected to be 32-bit or 64-bit. Typically, a newer 64-bit OS will run 64-bit IIS by default, but some applications require 32-bit. For older SP versions, only one copy of the SP can be easily installed, so you'll have to pick one or the other, and install the appropriate version to match the applications you want to run. As of V2.5+, the installation package is limited by your system type, and the 64-bit installer will include both sets of files so you can adjust which type you use on the fly.

Installation

  1. Download the appropriate 32- or 64-bit .msi Shibboleth SP installer from the Shibboleth download site.
  2. Run the installer. The installer will prompt for an install path, change default configuration files as appropriate for Windows, and set various environment variables for you. The shibd service will also be installed for you.

After rebooting, IIS should be configured for basic support (if you asked it to do so and you installed the IIS 6 compatibility services mentioned above). If you have problems, need to manually configure it, or want to verify what happened, the IIS steps are as follows:

  1. Add the filter using the IIS Manager console. At either the top-level or individual Site level, select the "ISAPI Filters" feature; then, add a new filter called Shibboleth and specify the lib\shibboleth\isapi_shib.dll library. For V2.5+ on a 64-bit IIS, the relative path isĀ lib64\shibboleth\isapi_shib.dll
  2. Map the *.sso file extension to the ISAPI library so that virtual URLs can be specified to invoke the extension handler for each web site. This is done under "Handler Mappings" using the "Add Script Map..." action. The Executable box should point to isapi_shib.dll, and the "Extension" can be set to anything unlikely to conflict, but *.sso is assumed (and the asterisk and dot must be included).
    1. Configure Request Restrictions for the handler mapping to permit the handler to execute for all requests that match the extension. While still in the "Add Script Map" dialog, click on "Request Restrictions." In the "Mapping" Tab, un-check the option labeled, "Invoke handler only if request is mapped to..." If checked, the handler will activate only for real files or folders matching the extension, instead of activating on all requests, regardless of whether the file exists. (After saving the script map, the "Path Type" column for the new handler in the Handler Mappings list should be "Unspecified.")
  3. Add the Shibboleth ISAPI Extension to the list of permitted extensions in the list of allowed extensions. This is under "ISAPI and CGI Restrictions" at the top level.
  4. Restart IIS. At this point, I don't know enough of IIS7 to know how to diagnose filter load problems, but the filter does log startup and shutdown events in the Windows event log.

A set of commands that may work for some people to perform the above steps:

cd C:\Windows\System32\inetsrv
appcmd set config /section:isapiFilters /+[name='shibboleth',path='C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll',enabled='true']
appcmd set config /section:handlers /+[name='Shibboleth',path='*.sso',verb='*',scriptProcessor='C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll']
appcmd set config /section:isapiCgiRestriction 
/+[path='C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll',description='Shibboleth',allowed='True']
iisreset

For Windows Server 2012 / IIS 8, you may need to add the modules attribute to the Handler Mapping command:

appcmd set config /section:handlers /+[name='Shibboleth',path='*.sso',verb='*',scriptProcessor='C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll',modules='IsapiModule']


Basic Configuration