How to protect HTTPD web pages using Shibboleth SP

Home > Search > How-to

By default, after installing and setting up Shibboleth SP, the /etc/httpd/conf.d/shib.conf file will contain a control to handle requests to

<Location /secure>
  AuthType shibboleth
  ShibRequestSetting requireSession 1
  require shib-session


Navigating to will display shibsp::ConfigurationException.


In the SP shibboleth2.xml file, make the following adjustments.

In ApplicationDefaults, set entityID to the hostname of your SP.

<ApplicationDefaults entityID=""
                     REMOTE_USER="eppn persistent-id targeted-id">


In SSO, set entityID to the hostname of your IdP.

<SSO entityID=""
     discoveryProtocol="SAMLDS" discoveryURL="">


Remove the comment from MetadataProvider, and adjust the file to point to the location of your idp-metadata.xml. This assumes that the SP and IdP are on the same server.

<MetadataProvider type="XML" validate="true" file="/opt/shibboleth-idp/metadata/idp-metadata.xml"/>


Ensure the URL in $shibboleth_IdP_home/conf/relaying-party.xml points to your IdP.

<rp:AnonymousRelyingParty provider="" defaultSigningCredentialRef="IdpCrednetail"/>

<rp:DefaultRelyingParty provider="" defaultSigningCredentialRef="IdpCredential"
  <rp: ProfileConfiguration . . .


Ensure the URL in $shibboleth_SP_home/shibboleth2.xml points to IdP.

<ApplicationDefaults entityID=""


Ensure there are no syntax errors in the shibboleth2.xml file.

~]# shibd -tc /etc/shibboleth/shibboleth2.xml
. . .
overall configuration is loadable, check console for non-fatal problems


Restart the SP and web server.

~]# systemctl restart shibd
~]# systemctl restart httpd


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter in the box below so that we can be sure you are a human.