Installation Guide

INSTALLATION MANUAL DISCLAIMER:The information contained in this manual is subject to change by INFED Team without any prior notice.
INFED gives no warranty of any kind whatsoever, either explicitly or implicitly. It is created for the purpose of assisting the Institution
in more easily adopting the use of the INFED.  Make clear that the guidance are offered without warranty, and disclaiming liability for 
damages resulting from using the guide.
  1. System Requirement
  2. Software Requirement
  3. Shibboleth SP installation
  4. Shibboleth SP Configuration
  5. Quick Test
  6. SP Registration with INFED

Shibboleth Service Provider (SP) - Installation Guide

For the Shibboleth SP version 2.6, INFED recommends relying on an enterprise-grade Linux distribution with long term support: specifically, either Ubuntu Server LTS or Red Hat Enterprise Linux / CentOS.

As per above information, the sections below will configure the SP with the following parameters:

  • The Publisher URL
  • The SP URL
  • The SP entityID
  • Federation metadata available from http:// and

1. System requirements

For the Shibboleth SP 2.6, we recommend a system with at least 2 GB of memory (4 GB needed if you would like to avail the facility of interfederation services). The below basic tools also mandatory:

It will help us to download software and configuration files.
Package: openssl, the command-line tool will be used to deal with server certificates.
tar and unzip
Used to untar/unzip the archives (and also useful for listing contents of .war/.jar files).

2. Software Requirement

The Shibboleth SP is developed under Java environment and therefore requires a Servlet container. Our recommended setup consists of the following components:

  • Apache HTTP Server 2.4 or higher

3. Web Server (HTTP) installation

Before installing the Apache HTTP Server, get an SSL certificate for the service name of the SP( from a publicly trusted CA. Store the private key under /etc/pki/tls/private/ and the certificate under /etc/pki/tls/certs/, and make sure that the certificate file includes both the server certificate and any intermediate CA certificate(s). If SELinux is enabled on your system, verify that the two files have the correct context: use restorecon -nv /etc/pki/tls/private/ /etc/pki/tls/certs/ to check, and if there's output from this command, rerun without -n to fix the context(s).

Then, install the Apache HTTP Server 2.4 with the following command:

sudo yum install httpd mod_ssl

We recommend to enable the headers module to make the X-Frame-Options of the VirtualHost configuration work.

Next, add a VirtualHost configuration for the SP by creating a file named /etc/httpd/conf.d/ and populating it with the following contents:

<VirtualHost *:443>
CustomLog /var/log/httpd/ combined
ErrorLog /var/log/httpd/

SSLEngine On
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateKeyFile /etc/pki/tls/private/
SSLCertificateFile /etc/pki/tls/certs/
SSLCertificateChainFile /etc/pki/tls/certs/

<IfModule headers_module>
Header set X-Frame-Options DENY
Header set Strict-Transport-Security "max-age=31536000 ; includeSubDomains"

ProxyPass /sp ajp://localhost:8009/sp retry=5
<Proxy ajp://localhost:8009>
  Require all granted

In addition to adding the above VirtualHost definition, we suggest setting ServerTokens Prod and ServerSignature off in /etc/httpd/conf/httpd.conf to make the server not disclose/announce version number details etc. by default.

Finally, enable the Apache HTTP server and check its configuration with the following commands:

sudo systemctl enable httpd.service
sudo apachectl configtest

If the output of the last command states Syntax OK, then proceed with restarting the Apache HTTP server:

sudo systemctl restart httpd.service

4. Shibboleth SP installation

Shibboleth Repository :

The Shibboleth project operates its own repository that provides the official Shibboleth Service Provider binaries and its dependencies for RPM-based Linux distributions. This repository contains always up-to-date version of the Shibboleth Service Provider. Therefore, it is recommended to prefer this repository and its packages over packages that may be provided by the OS distribution.

For Centos 7.x:

sudo curl -o /etc/yum.repos.d/security:shibboleth.repo

4.1. SP installation

Install the Service Provider by:

For 32-bit OS:

sudo yum install shibboleth

For 64-bit OS:

sudo yum install shibboleth.x86_64

If asked to confirm whether you really want to install Shibboleth and all dependencies, answer with 'Y' for yes.

After installation of the package, you need to start the shibd daemon:

sudo service shibd restart

Shibboleth does not support the SP in conjunction with SELinux. To disable SELinux, configure SELINUX=disabled in /etc/selinux/config and reboot the system.

4.2.Quick Test

The Service Provider should now be installed on the system contauns following directories:

Configuration directory of Shibboleth. The main configuration file is shibboleth2.xml.
Log directory where logs are written to. The most important log file is the shibd.log file that should be consulted in case of problems.
Runtime directory where process ID and socket files are stored.
Cache directory where metadata backup and CRL files are stored.
Init script directory where the startup script for the shibd daemon is stored.

4.3.Shibboleth Configuration Check

In the command line, execute the following command to see whether the Shibboleth Service Provider can load the default configuration:

sudo shibd -t
Important is that the last line of the output is:
overall configuration is loadable, check console for non-fatal problems
If there are any ERROR log entries, it is strongly recommended to have a look at the problem.
Messages with log level WARN are generally not problematic but it is recommended to examine the causes of these warning messages.

4.3.1. Apache Configuration Check

Also test the Apache configuration with the command: or
sudo apachectl configtest
The output of this command should be:
Syntax OK

4.3.2.mod_shib Test

(Re-) Start the web server and then access the URL:

The web server (or Shibboleth module respectively) should return a page that says:
A valid session was not found.
This message shows that the Shibboleth module is loaded by the webserver and is communicating with the shibd process.

5.Configure SP :

5.1.Configure SP Metadata and entityID:

Edit /etc/shibboleth/shibboleth2.xml and make the following changes:

Change the entityID in the <ApplicationDefaults> section to the URI of your SP.
<ApplicationDefaults entityID="" REMOTE_USER="eppn persistent-id targeted-id">
Inside the <ApplicationDefaults> section, add a MetadataProvider of IdP:
<MetadataProvider type="XML" uri=""   
 backingFilePath="file:///etc/shibboleth/example.xml" reloadInterval="1800" />
In MetadataGenerator handler , add the information about your service and your organization.
<Handler type="MetadataGenerator" Location="/Metadata" signing="false">
<mdui:DisplayName xml:lang="en"> Shibboleth Provider </mdui:DisplayName>
<mdui:Description xml:lang="en">Description of Service Provider </mdui:Description>
<mdui:Logo height="300" width="500"> </mdui:Logo>
      <md:OrganizationName xml:lang="en">Example</md:OrganizationName>
      <md:OrganizationDisplayName xml:lang="en"> Example</md:OrganizationDisplayName>
      <md:OrganizationURL xml:lang="en"></md:OrganizationURL>
<md:ContactPerson contactType="support">
      <md:SurName>ABC </md:SurName>
Additionally, make sure the md and mdui xml namespaces are defined in the <SPConfig> tag on the top of shibboleth.xml:
<SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"

5.2.Configure Apache

Check your Apache version and verify shibboleth configuration of apache virtualhost defined at /etc/shibboleth/apache.config:
<Location /secure>
  AuthType shibboleth
  ShibRequestSetting requireSession 1
  require valid-user

5.3.Configure SP attributes:

Configure the required attribute in attribute-map.xml :

<Attribute name="urn:oid:" id="eppn">        
   <AttributeDecoder xsi:type="ScopedAttributeDecoder"/>
<Attribute name="urn:mace:dir:attribute-def:eduPersonPrincipalName" id="eppn">
    <AttributeDecoder xsi:type="ScopedAttributeDecoder"/>

<Attribute name="urn:oid:" id="affiliation">
    <AttributeDecoder xsi:type="ScopedAttributeDecoder" caseSensitive="false"/>
<Attribute name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation" id="affiliation">        
    <AttributeDecoder xsi:type="ScopedAttributeDecoder" caseSensitive="false"/>

<Attribute name="urn:oid:" id="unscoped-affiliation">
    <AttributeDecoder xsi:type="StringAttributeDecoder" caseSensitive="false"/>
<Attribute name="urn:mace:dir:attribute-def:eduPersonAffiliation" id="unscoped-affiliation">
    <AttributeDecoder xsi:type="StringAttributeDecoder" caseSensitive="false"/>

<Attribute name="urn:oid:" id="entitlement"/>
<Attribute name="urn:mace:dir:attribute-def:eduPersonEntitlement" id="entitlement"/>
<Attribute name="urn:mace:dir:attribute-def:eduPersonTargetedID" id="targeted-id">
    <AttributeDecoder xsi:type="ScopedAttributeDecoder"/>       
Restart shibd service:
service shibd restart

5.4.Configure Embeded-ds with Shibbboleth SP:

5.4.1.Install shibboleth Embeded-ds :

yum install shibboleth-embedded-ds
Edit the SSO tag in /etc/shibboleth/shibboleth2.xml(see NativeSPServiceSSO for details), removing the elementID attribute and adding a discoveryProtocol of "SAMLDS" and setting the discoveryURL attribute to the URL of the web page that will contain the EDS.
<SSO discoveryProtocol="SAMLDS" discoveryURL=""> 
Modify the this.returnWhiteList in /etc/shibboleth-ds/idpselect_config.js and comment this.defaultReturn = null;
  this.returnWhiteList = [ "*$" , "^*$","^*$" ];

Restart Shibd :

service shibd restart
Test shibboleth Embeded-ds configuration by accessing URL

6.Configure IDP attributes

Create shibacl.xml file in /var/www/html.
In AccessControl tag mention the eduPersonScopedAffiliation and eduPersonEntitlement. For example student, staff, faculty, member, researchscholar are eduPersonScopedAffiliation and is eduPersonEntitlement value of
            <Rule require="affiliation"></Rule>   
            <Rule require="affiliation"></Rule>   
            <Rule require="affiliation"></Rule>   
            <Rule require="affiliation"></Rule>   
            <Rule require="affiliation"></Rule>
            <Rule require="entitlement"></Rule> 
Create index.php file in /var/www/html/shibp.

  $array = array(
    'idp' => $idp,
    'uname' => $uname,
    'mail' => $mail,


  $enc =bin2hex($json_data);
  print $enc;


Modify shib.conf in /etc/httpd/conf.d/etc/apache2/sites-available.
<Location /secure>
  AuthType shibboleth
  ShibRequestSetting requireSession 1
  require shib-session

<Location /shibp>
  AuthType shibboleth
  ShibRequestSetting requireSession true
  Require shib-plugin /var/www/html/shibacl.xml

7.SP Registration with INFED

You are requested to upload your metadata file which is available at to along with below details.

1. About Publisher , 2. Administrative Contact and 3. Technical Contact.

After completion of this step, the INFED team will check the information you provided and approve your request (or contact you in case the data need to be modified).