Shibboleth Service Provider - Installation (Windows/IIS)
Description
Use this guide in addition to the official Shibboleth Service Provider documentation to perform the installation and configuration of a Shibboleth service provider on a Windows server (IIS). The OS used to develop this guide:
Shibboleth Service Provider - About
Applicable To:
- IT Admins and System Admins of CSU System Shibboleth Service Providers
System Prerequisites:
Please review the Shibboleth System Requirements for Shibboleth Service Providers in the CSU System
Contents:
-
Install or Add Management Capability
-
Configure SSL Certificate
-
Website Hosting Preparation
-
Shibboleth Service Provider Installation
- Shibboleth Service Provider Configuration
Instructions:
1.) Install or Add Management Compatibility
Install IIS
-
Open Server Manager > Manage menu > Add Roles and Features
-
Click Installation Type > Role-based or feature-based installation > Click Next
- In Server Selection, Select your server > Click Next
- In Server Roles, select Web Server (IIS)
- A new window will appear, select Add Features
-
Click Role Services that now appears in the left-hand menu
-
Select:
-
Application Development > ISAPI Extensions
-
Application Development > ISAPI Filters
-
Management Tools > IIS [#] Management Compatibility > IIS [#] Metabase Compatibility
- You can now, or later, add any other requirements of your IIS application
-
Click Next
-
Click Install
-
Click Close after installation complete
2.) Configure SSL Certificate
CSR (Certificate Signing Request) & Private Key
Create CSR
NOTE: Certificate requests processed through CSU's InCommon SSL Certificate request portal can take up to 24 hours over business days to complete and process
-
Open the Internet Information Services (IIS) Manager and select your server from the left-hand side menu
-
Double-click Server Certificates

- Under Actions, in right-hand pane, select Create Certificate Request...

- Be sure the Common name matches the name of the website (and not necessarily of the server-itself)
-
Click Next
- In the Cryptographic Service Provider Properties, select Bit length: 2048
-
Click Next
-
Select a location and filename for your CSR (Certificate Signing Request)
-
Click Finish
Submit CSR
- For requests with CSU's InCommon SSL Certificate request portal:
-
Log in to CSU's InCommon SSL Certificate request portal (VPN/campus access required)
- Recommended: include your full department's email in the Contact Email field
-
Allow up to 24 hours over business days to receive an email with your public certificate information and double-check your spam and other folders.
Configure Public Cert
-
Retrieve your server's public certificate
For InCommon SSL certificates, you'll receive an email titled Your SSL certificate for <website> is ready
From the email, select + download the link titled as Certificate only, PEM encoded (should be the first available certificate format)
Copy the certificate file onto your web server in an accessible location
-
Configure your certificate in IIS
Open the Internet Information Services (IIS) Manager and select your server from the left-hand side menu
-
Double-click Server Certificates
-
Under Actions, in right-hand pane, select Complete Certificate Request...
-
Navigate to and select your certificate file
- For Friendly name, enter a value for your service (does not need to be the full domain name)
- Under Select a certificate store for the new certificate, select Web Hosting
-
ClickOK
- Your certificate should now appear in the Server Certificates middle pane
3.) Website Hosting Preparation
Prepare IIS
Set up Files and Folders for Testing
- In File Explorer, navigate to the folder (or create the folder) where your website files will reside
-
Enable File name extensions (if not already enabled)
-
Configure Security Permissions for IIS
-
Right-click, Select Properties in the empty content area of your website directory
-
Click the Security tab
-
Click Edit below the list of Group or user names
-
Click Add to add the IUSR user (Internet Information Services [IIS] User), if not already added
- In Enter the object names to select, type IUSR
-
Click Check Names
-
IUSR should appear underlined (validated)
-
Click OK
-
Confirm the IUSR user has Allow permissions for:
- Read & execute
- List folder contents
-
Read
-
Click Apply to save changes
-
Review the Permissions for the SYSTEM user and Administrator-users, ensuring each has Full control
-
Create testing infrastructure
- In "home" folder of your website's folder-structure, create a test file default.htm with contents:
- In "home" folder of your website's folder-structure, create a folder called secure
- In secure, create another test file default.htm with contents:
Configure Test Pages in IIS
-
Open IIS Manager
- In left pane, click to expand your server
-
click to expand Sites
-
Right-click Default Web Site > Manage Website > Stop
- In left-hand pane, right-click on Sites > Add Website
-
Enter your Site name
-
Select the Physical path to the folder-location of your website
- Under Binding select https
-
Select an appropriate IP address if your site has multiple configured
- Under SSL certificate, select the public SSL certificate you created in the prior step
-
Click OK to save & start website
-
In left-hand pane, click on Sites
-
Identify the ID associated with the site you just added
-
Note this Site ID for later
Test
- In a browser outside of your server, navigate to your website, using https (https://yoursite.colostate.edu)
- Your default.htm page content displaying Public should load in the browser
- Your SSL Certificate should be valid
4.) Shibboleth Service Provider Installation
Download Shibboleth SP
- In a browser outside your server, Navigate to the Shibboleth Software Repository
-
Open the Win64/Win32 folder that matches your system
-
Download the shibboleth-sp-<version>.msii file
-
Copy/move the shibboleth-sp-<version>.msi file onto your server
Install Shibboleth SP
- In your server, double-click your shibboleth-sp-<version>.msi file to run the installer
-
Click Next at the Welcome to the Shibboleth... setup screen
-
Check I accept the terms in the License Agreement, click Next
- For install location, use C:\opt\shibboleth-sp\ and check the box for Configure IIS Support; click Next
-
Click Install
-
Click Finish after install has completed
-
Click Yes to restart your system when prompted
Verify ISAPI Settings
ISAPI (Internet Server Application Programming Interface) is a technology that allows developers to extend the functionality of IIS through custom DLLs.
-
Open Windows Administrative Tools > Services
-
Locate Shibboleth Daemon (Default), should display:
-
Status: Started or Running
-
Startup Type: Automatic
-
Log on As: Local System
-
Open Internet Information Services (IIS) Manager to verify ISAPI (Internet Server Application Programming Interface) settings
-
Click to expand your server
-
Double-click on ISAPI and CGI Restrictions
- If Shibboleth is not listed, click Add from right-hand pane
- For ISAP or CGI path, find + select C:\opt\shibboleth-sp\lib[64/32]\shibboleth\isapi_shib.dll
-
Type Shibboleth for Description
-
Check the box for Allow extension path to execute
-
Click OK to Save
-
Shibboleth should now be listed in the center pane
-
Double-click on your server name in the left-pane to return to the server home
-
Double-click on ISAPI Filters
-
If Shibboleth is not listed, click Add from right-hand pane
-
For Filter name type Shibboleth
-
For Executable, find + select C:\opt\shibboleth-sp\lib[64/32]\shibboleth\isapi_shib.dll once again
-
Click OK to Save
-
Shibboleth should now be listed in the center pane
-
Double-click on Handler Mappings
-
If Shibboleth is not listed, click Add Script Map... from right-hand pane
-
For Request path type *.sso
-
For Executable, find + select C:\opt\shibboleth-sp\lib[64/32]\shibboleth\isapi_shib.dll one more time
- For Name: Shibboleth
-
Click Request Restrictions...
- In Mapping, make sure Invoke handler... is unchecked
- In Verbs, make sure All Verbs is selected
- In Access, make sure Script is selected
- Click OK to Save Request Restrictions
-
Click OK to Save Edit Script Map
-
Shibboleth should now be listed in the center pane
5.) Shibboleth Service Provider Configuration
Configure Metadata
The shibboleth2.xml file configures and defines settings for the Shibboleth service provider, governing authentication, attribute mapping, and communication parameters with identity providers. Most, if not all, of the settings specific to your service provider will be configured here.
In order for Single Sign-On (SSO) to function in the CSU Federation, your Service Provider will be configured to use the CSU Federation metadata
- In File Explorer, make a backup copy of your original C:\opt\shibboleth-sp\etc\shibboleth\shibboleth2.xml file
-
In File Explorer, create file c:\opt\shibboleth-sp\etc\shibboleth\csufederation-metadata-cert.pem
- Direct browser (outside of server) to https://csufederation.acns.colostate.edu/publickey/csufederation-metadata-cert.pem and paste contents into file
-
Open C:\opt\shibboleth-sp\etc\shibboleth\shibboleth2.xml in a text editor
- In the same area as the example (commented-out) MetadataProvider elements (near bottom-half of file), add MetadataProvider element for the CSU Test Federation
<MetadataProvider type="XML" validate="true"
url="https://csufederation.acns.colostate.edu/csufederationtest-metadata.xml"
backingFilePath="c:\opt\shibboleth-sp\etc\shibboleth\csufederationtest-metadata.xml"
maxRefreshDelay="7200">
<MetadataFilter type="RequireValidUntil" maxValidityInterval="2419200" />
<MetadataFilter type="Signature"
certificate="c:\opt\shibboleth-sp\etc\shibboleth\csufederation-metadata-cert.pem"
verifyBackup="false" />
<MetadataFilter type="Include">
<Include>https://shibidptest.colostate.edu/idp/shibboleth</Include>
</MetadataFilter>
</MetadataProvider>
Configure Signing Certificate
For entry in the CSU Federation, you will use the same cert+key pair for both signing and encryption in your Shibboleth Service Provider
-
In shibboleth2.xml, locate the CredentialResolver (near bottom of file) element
- In the CredentialResolver element indicated for encryption, replace the cert and key to match the files used for the signing CredentialResolver
-
Save
-
<!-- Simple file-based resolvers for separate signing/encryption keys. -->
<!-- CSU Federation requires same cert+key pair for both signing & encryption -->
<CredentialResolver type="File" use="signing"
key="sp-signing-key.pem" certificate="sp-signing-cert.pem" />
<CredentialResolver type="File" use="encryption"
key="sp-signing-key.pem" certificate="sp-signing-cert.pem" />
Configure Web server settings
The <InProcess> section in the Shibboleth configuration file (shibboleth2.xml) is used for settings affecting web server modules, specifically for IIS and is not required for other/non-IIS web servers.
-
In shibboleth2.xml, locate InProcess (near top of file) element
- Add logger="native.logger to InProcess tag
-
In the Site element, change the name value to your site's domain
- Update the Site id to match the Site ID identified earlier when configuring your IIS test pages
-
Save
<InProcess>
<ISAPI normalizeRequest="true" safeHeaderNames="true">
<!--
Maps IIS Instance ID values to the host scheme/name/port. The name is
required so that the proper <Host> in the request map above is found without
having to cover every possible DNS/IP combination the user might enter.
-->
<Site id="2" name="yoursite.colostate.edu" />
<!--
When the port and scheme are omitted, the HTTP request's port and scheme are used.
If these are wrong because of virtualization, they can be explicitly set here to
ensure proper redirect generation.
-->
<!--
<Site id="42" name="virtual.example.org" scheme="https" port="443"/>
-->
</ISAPI>
</InProcess>
Configure Request Mapping, App Defaults and Sessions
The RequestMapper section in the Shibboleth configuration file defines how incoming requests are mapped to specific authentication and authorization settings based on the requested resource's path and the configured host settings.
- In shibboleth2.xml, locate RequestMapper (below InProcess) element
-
Add logger="native.logger to InProcess tag
-
Change value for Host name and Path name to match your domain and test file
<RequestMapper type="Native">
<RequestMap>
<!--
The example requires a session for documents in /secure on the containing host with http and
https on the default ports. Note that the name and port in the <Host> elements MUST match
Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element above.
-->
<Host name="yoursite.colostate.edu">
<Path name="default.htm" authType="shibboleth" requireSession="true" />
</Host>
<!-- Example of a second vhost mapped to a different applicationId. -->
<!--
<Host name="admin.example.org" applicationId="admin" authType="shibboleth" requireSession="true"/>
-->
</RequestMap>
</RequestMapper>
- Save
The ApplicationDefaults section in the Shibboleth configuration file defines the core SAML settings and behavior for the service provider, including session handling, SSO configurations, error handling, metadata providers, attribute extraction and filtering, as well as credential resolution.
-
In shibboleth2.xml, locate ApplicationDefaults (below RequestMapper) element
-
In the ApplicationDefaults tag, change the value for entityID to <https://<yourwebsite>/shibboleth>
<ApplicationDefaults entityID="https://yoursite.colostate.edu/shibboleth"
REMOTE_USER="eppn subject-id pairwise-id persistent-id"
cipherSuites="DEFAULT:!EXP:!LOW:!aNULL:!eNULL:!DES:!IDEA:!SEED:!RC4:!3DES:!kRSA:!SSLv2:!SSLv3:!TLSv1:!TLSv1.1">
The Sessions element defines session timeouts and default handler settings. It's recommended to enforce secure cookies by setting cookieProps="; path=/; secure; HttpOnly" to mitigate the risk of unauthorized cookie use, particularly in scenarios where HTTP is disabled on the server. The below configuration provides suggested practices with an explanation for each element should you need to make any changes.
- In shibboleth2.xml, locate Sessions (near beginning of ApplicationDefaults) element
-
In the ApplicationDefaults tag, change the value for entityID to <https://<yourwebsite>/shibboleth>
-
In Sessions tag, add/change:
- consistentAddress="true"
-
cookieProps="; path=/; secure; HttpOnly; domain=<subdomain>.colostate.edu"
- replace <subdomain> with the applicable subdomain for your service
-
Save
<Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
checkAddress="false" consistentAddress="true" handlerSSL="true"
cookieProps="; path=/; secure; HttpOnly; domain=<subdomain>.colostate.edu"
redirectLimit="exact">
Further Information on Sessions element:
Set up the IdP link and remove the Discovery Service feature from the SSO element. (You can enable the Discover Service at a later point if desired.)
-
In shibboleth2.xml, locate the SSO (beginning of Sessions) element
- Set the entityID for CSU's test Identity Provider https://shibidptest.colostate.edu/idp/shibboleth
- Remove the discovery elements
-
Save
<SSO entityID="https://shibidptest.colostate.edu/idp/shibboleth">
SAML2
</SSO>
Configure Errors
- In shibboleth2.xml, locate the Errors (below Sessions) element
-
Set a value for supportContact and set helpLocation="https://wsprod.colostate.edu/cwis262/shibidplogout/error.aspx" to use for testing
- You may edit the styleSheet now or later
-
Save
<Errors supportContact="<yourhelpemail>"
helpLocation="https://wsprod.colostate.edu/cwis262/shibidplogout/error.aspx"
styleSheet="/shibboleth-sp/main.css" />
-
In shibboleth2.xml, locate the Handler (in bottom of Sessions) elements
-
In each element (MetadataGenerator, Status, Session, DiscoverFeed), review and update the acl values if you've decided to add the IP address restriction
- IP addresses are space-separated
- Can list individual IP addresses or use CIDR notation as a subnet
- Save
-
Note: The MetadataGenerator handler, shipped with the Shibboleth Service Provider, is also deprecated (by Shibboleth), without a suggested replacement. DEPRECATED warnings in Shibboleth indicate that the feature is likely to be removed from the next future major version change. This feature is useful in initial testing and configuration, but not required once configuration is complete. To suppress DEPRECATED warnings, consider commenting-out this feature at a later point, once configuration is complete.
<!-- Extension service that generates "approximate" metadata based on SP configuration. -->
<Handler type="MetadataGenerator" Location="/Metadata" signing="false" acl="10.205.0.0/24 10.206.0.0/24" />
<!-- Status reporting service. -->
<Handler type="Status" Location="/Status" acl="10.205.0.0/24 10.206.0.0/24" />
<!-- Session diagnostic service. -->
<Handler type="Session" Location="/Session" showAttributeValues="false" acl="10.205.0.0/24 10.206.0.0/24" />
<!-- JSON feed of discovery information. -->
<Handler type="DiscoveryFeed" Location="/DiscoFeed" acl="10.205.0.0/24 10.206.0.0/24" />
</Sessions>
Test for Configuration Errors
This will test for a functional shibboleth2.xml configuration
-
Make sure your shibboleth2.xml file is saved
-
Open Windows Administrative Tools > Services > Shibboleth Daemon > Right-click Restart
- If the Daemon fails to restart, you'll generate a message. This typically indicates an error in the xml of your shibboleth2.xml file. Review and resolve before continuing to the next step
- In Command Prompt, execute C:\opt\shibboleth-sp\sbin64\shibd -check
- Your response should include a DEPRECATED warning about the metadataGenerator handler and a confirmation message that your configuration is loadable
C:\opt\shibboleth-sp\etc\shibboleth>C:\opt\shibboleth-sp\sbin64\shibd -check
2024-03-15 15:50:51 WARN Shibboleth.DEPRECATION : MetadataGenerator handler
overall configuration is loadable, check console or log for non-fatal problems
-
Test Shibboleth Handlers
- In a browser, test each handler:
- https://<yoursite>/Shibboleth.sso/Metadata
- Will display or download a default metadata file
- https://<yoursite>/Shibboleth.sso/Status
- Will display status and metadata .xml
- https://<yoursite>/Shibboleth.sso/DiscoFeed
- https://<yoursite>/Shibboleth.sso/Session
- Will display "A valid session was not found."
- If you generate any ERRORS, review and resolve before continuing
- To aid in resolution, review logs at: C:\opt\shibboleth-sp\var\log\shibboleth
- shibd.log
- shibd_warn.log
Outcome:
CONGRATULATIONS! You now have a Shibboleth Service Provider ready for customization and further configuration to start performing Single Sign-On Configurations.
Further reading
Shibboleth Service Provider - Shibboleth Resources