Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kosarko/6cc43935304f2d6a86b9 to your computer and use it in GitHub Desktop.
Save kosarko/6cc43935304f2d6a86b9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://github.com/ufal/lindat-dspace/wiki/Building-Shibboleth-with-FastCGI-support
# ensure the versions are still latest
sudo apt-get install libfcgi-dev libboost-all-dev openssl libssl-dev pkg-config libcurl4-openssl-dev
INSTALLDIR=/opt/shibboleth-sp
function get {
local dirname=$1
local version=$2
local url=$3
local archive="$dirname-$version.tar.gz"
if [ ! -d "$dirname" ]; then
wget -O "$archive" "$url$archive"
tar -xzvf "$archive"
mv `tar -ztf "$archive" | head -n 1` "$dirname.$version"
ln -s $dirname.$version $dirname
rm "$archive"
fi
}
get log4shib 2.0.1 http://shibboleth.net/downloads/log4shib/latest/
get xerces-c 3.2.4 http://mirror.hosting90.cz/apache/xerces/c/3/sources/
get xml-security-c 2.0.4 http://mirror.hosting90.cz/apache/santuario/c-library/
get xmltooling 3.2.4 http://shibboleth.net/downloads/c++-opensaml/latest/
get opensaml 3.2.1 http://shibboleth.net/downloads/c++-opensaml/latest/
get shibboleth-sp 3.4.1 http://shibboleth.net/downloads/service-provider/latest/
function compile {
local dirname=$1
local config="--enable-option-checking=fatal $2"
cd $dirname && \
./configure $config && \
make && \
sudo make install && \
cd ..
}
export PKG_CONFIG_PATH=${INSTALLDIR}/lib/pkgconfig
compile log4shib "--disable-static --disable-doxygen --prefix=$INSTALLDIR" && \
compile xerces-c "--disable-netaccessor-curl --prefix=$INSTALLDIR" && \
compile xml-security-c "--without-xalan --disable-static \
--prefix=$INSTALLDIR" && \
compile xmltooling "-prefix=$INSTALLDIR -C" && \
compile opensaml "--prefix=$INSTALLDIR -C" && \
compile shibboleth-sp "--prefix=$INSTALLDIR \
--with-fastcgi"
@kosarko
Copy link
Author

kosarko commented Mar 19, 2020

updating v2 to v3

diff --git a/security-policy.xml b/security-policy.xml
index 41b000b..dc3a04c 100644
--- a/security-policy.xml
+++ b/security-policy.xml
@@ -1,4 +1,4 @@
-<SecurityPolicies xmlns="urn:mace:shibboleth:2.0:native:sp:config">
+<SecurityPolicies xmlns="urn:mace:shibboleth:3.0:native:sp:config">

     <!-- Each policy defines a set of rules to use to secure messages. -->

diff --git a/shibboleth2.xml b/shibboleth2.xml
index e242c24..be7098a 100644
--- a/shibboleth2.xml
+++ b/shibboleth2.xml
@@ -1,8 +1,5 @@
-<SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"
-    xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config"
-    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
-    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
-    xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
+<SPConfig xmlns="urn:mace:shibboleth:3.0:native:sp:config"
+    xmlns:conf="urn:mace:shibboleth:3.0:native:sp:config"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment