Skip to content

Building Shibboleth with FastCGI support

Michal Sedlák edited this page Feb 26, 2015 · 7 revisions

Building Shibboleth SP

Compilation of Shibboleth is a tedious but well documented on Shibboleth wiki

Run ./configure script --with-fastcgi to implement FastCGI support required by Nginx.

For the compilation you will need boost header files and libfcgi. On Ubuntu/Debian installed with:

sudo apt-get install libfcgi-dev libboost-all-dev

These are roughly the commands that get you quickly from ShibbolethSP sources to ShibbolethSP running application:

  • The expected installation directory is /opt/shibboleth-sp-fastcgi
  • NOTE: Links may be broken (Fix them by editing the wiki)
  • DO NOT copy the commands blindly
# Download all dependencies
wget http://shibboleth.net/downloads/log4shib/latest/log4shib-1.0.8.tar.gz
wget http://mirror.hosting90.cz/apache/xerces/c/3/sources/xerces-c-3.1.1.tar.gz
wget http://mirror.hosting90.cz/apache/santuario/c-library/xml-security-c-1.7.2.tar.gz
wget http://shibboleth.net/downloads/c++-opensaml/latest/xmltooling-1.5.3.tar.gz
wget http://shibboleth.net/downloads/c++-opensaml/latest/opensaml-2.5.3.tar.gz

# Extract all archives
tar -xzvf log4shib-1.0.8.tar.gz
tar -xzvf opensaml-2.5.3.tar.gz
tar -xzvf xerces-c-3.1.1.tar.gz
tar -xzvf xml-security-c-1.7.2.tar.gz
tar -xzvf xmltooling-1.5.3.tar.gz

cd log4shib-1.0.8
./configure --disable-static --disable-doxygen --prefix=/opt/shibboleth-sp-fastcgi
make
sudo make install
cd ..

cd xerces-c-3.1.1
./configure --prefix=/opt/shibboleth-sp-fastcgi --disable-netaccessor-libcurl
make
sudo make install
cd ..

cd xmltooling-1.5.3
./configure --without-xalan --disable-static \
  --with-log4shib=/opt/shibboleth-sp-fastcgi/ \
  --prefix=/opt/shibboleth-sp-fastcgi
make
sudo make install
cd ..

cd xml-security-c-1.7.2
./configure --without-xalan --disable-static \
  --prefix=/opt/shibboleth-sp-fastcgi \
  --with-xerces=/opt/shibboleth-sp-fastcgi/
make
sudo make install
cd ..

cd xmltooling-1.5.3
./configure --with-log4shib=/opt/shibboleth-sp-fastcgi \
  --prefix=/opt/shibboleth-sp-fastcgi -C
make
sudo make install
cd ..

cd opensaml-2.5.3
./configure --with-log4shib=/opt/shibboleth-sp-fastcgi \
  --prefix=/opt/shibboleth-sp-fastcgi -C
make
sudo make install
cd ..

# Now download and compile Shibboleth
wget http://shibboleth.net/downloads/service-provider/latest/shibboleth-sp-2.5.3.tar.gz
tar -xzvf shibboleth-sp-2.5.3.tar.gz
cd shibboleth-sp-2.5.3
# Note the --with-fastcgi flag here
./configure --with-log4shib=/opt/shibboleth-sp-fastcgi \
  --prefix=/opt/shibboleth-sp-fastcgi --with-fastcgi
make
sudo make install

Congratulation you have compiled and installed your own Shibboleth SP.

Clone this wiki locally