3.1 Configure Shibboleth SP - shibboleth2.xml

We have prepared two files with reasonable defaults for connecting an SP to SWAMID. One is for a shibboleth SP behind an Apache web server and the other is for a shibboleth SP behind an IIS web server. You need to change EntityID and any other values containing the string example.org in the file to the public FQDN (Fully Qualified Domain Name) of your host. Note that registering a fully functional SP with SWAMID usually requires you to have a FQDN for your service in DNS that is visible on the public Internet. It is possible to register internal development instances in the SWAMID testing metadata that points to localhost or other internal DNS names but this is discouraged for production services. 

If you have followed the installation guides in this wiki so far, you should rename the downloaded file, edit it and rename it to shibboleth2.xml and put it in the SHIB_HOME directory (/etc/shibboleth on linux c:\opt\shibboleth-sp\etc\shibboleth on Windows, if you haven't changed that during installation). 

The latest published SWAMID example main configuration file for Shibboleth Service Provider 3 is published at mds.swamid.se/entity-configurations/Shibboleth-SP/v3/. Below is the latest versions included from the publication repository.

swamid-apache-shibboleth2.xml without standard installation comments and examples

Error rendering macro 'html-bobswift'

The provided url is not included in the whitelist!

swamid-IIS-shibboleth2.xml without standard installation comments and examples

Error rendering macro 'html-bobswift'

The provided url is not included in the whitelist!


The "<Errors .... /> assumes that http://example.org/about.html leads to some form of help page and that webmaster@example.org is the right contact address for your service. Change according to taste.

Additional setup steps

After you save this file as /etc/shibboleth/shibboleth2.xml, download https://mds.swamid.se/md/md-signer2.crt and save as /etc/shibboleth/md-signer.crt (or your windows equivalent). Take care to verify the fingerprint of this certificate as published on https://mds.swamid.se/md/. Finally you must generate a keypair for your SP. This keypair is not the same as the certificate of your service and is used to secure SAML protocol messages between SWAMID IdPs and your service. Usually you do this by running the following command

shibboleth key generation
# shib-keygen -h example.com

At this point you should be able to restart the shibd process. If you get errors or if shibd refuses to start, make sure you don't have syntax error in any of your XML files. The system logs should provide clues about what may have gone wrong. If necessary increase the shibboleth log level to DEBUG. 

If shibd restarts ok, you should be able to point a browser at (or use curl to download) https://example.com/Shibboleth.sso/Metadata which should contain a PEM encoded version of your newly generated SP keypair. At this point you are read to register this metadata with SWAMID.