The following installtion is based on : https://www.cybera.ca/news-and-events/tech-radar/getting-started-on-shibboleth/ Definitions : - SP : Service Provider - IDP : Identity Provider - LDAP : Lightweight Directory Access Protocol Requirements : - Ubuntu 16.04 - Apache 2.4 - Java Openjdk 1.8 (set JAVA_HOME env variable accordingly) - Tomcat 8 - Nuxeo 8.4 SNAPSHOT Preparation : - Modify /etc/hosts by adding the following line : 127.0.0.1 localhost sp.shibboleth.com ldap.shibboleth.com idp.shibboleth.com LDAP Setup : sudo apt-get install slapd sudo apt-get install ldap-utils sudo dpkg-reconfigure slapd - Question while configuration : 1. Omit OpenLDAP server configuration?: No 2. DNS domain name: ldap.shibboleth.com 3. Organization name: Nuxeo 4. Administrator password: Nuxeo 5. Confirm password: Nuxeo 6. Database backend to use: HDB 7. Do you want the database to be removed when slapd is purged?: No 8. Move old database?: Yes 9. Allow LDAPv2 protocol? No - Add a new user : ldapadd -x -D "cn=admin,dc=ldap,dc=shibboleth,dc=com" -w Nuxeo < * Change shutdown port for tomcat 8 : * Create /etc/tomcat8/Catalina/localhost/idp.xml with the following content : * Modify /opt/shibboleth-idp/conf/handler.xml to disable the RemoteUser handler and enable the UsernamePassword one : ... urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport ... * Configure Shibboleth's LDAP connection for login in /opt/shibboleth-idp/conf/login.config : ... ShibUserPassAuth { edu.vt.middleware.ldap.jaas.LdapLoginModule required ldapUrl="ldap://ldap.shibboleth.com" baseDn="dc=ldap,dc=shibboleth,dc=com" bindDN="cn=admin,dc=ldap,dc=shibboleth,dc=com" bindCredential="Nuxeo" ssl="false" userFilter="uid={0}"; }; ... * Configure the attribute resolver in /opt/shibboleth-idp/conf/attribute-resolver.xml, so the ldap attributes are correctly transmitted as request headers : ... ... ... ... * Set correct permissions on the following directories : sudo chown tomcat8: /opt/shibboleth-idp/ -R sudo chown tomcat8: /usr/share/tomcat8/ -R sudo chown tomcat8: /etc/tomcat8/ -R SP Setup : - Download Shibboleth SP (Unofficial distribution for Ubuntu 16.04, but the only one working, probably need to build from sources) : sudo curl -k -O http://pkg.switch.ch/switchaai/SWITCHaai-swdistrib.asc sudo apt-key add SWITCHaai-swdistrib.asc echo 'deb http://pkg.switch.ch/switchaai/ubuntu xenial main' | sudo tee /etc/apt/sources.list.d/SWITCHaai-swdistrib.list > /dev/null sudo apt-get update sudo apt-get install shibboleth - SP configuration : * Generate the application-specific Shibboleth key : shib-keygen * Modify /etc/shibboleth/shibboleth2.xml so the following are correct and/or present : ... ... SAML2 SAML1 ... ... ... * Retrieve the IDP metadata (WARNING : the metadata may have been generated with urls with HTTPS, replace all with HTTP): cd /etc/shibboleth sudo wget --no-check-certificate http://idp.shibboleth.com/idp/shibboleth -O idp-metadata.xml * Add the SP metadata to the IdP by modifying /opt/shibboleth-idp/conf/relying-party.xml : ... ... * Download the actual SP metadata (WARNING : the metadata may have been generated with urls with HTTPS, replace all with HTTP): cd /opt/shibboleth-idp/metadata/ sudo wget --no-check-certificate http://sp.shibboleth.com/Shibboleth.sso/Metadata -O sp.shibboleth.com.xml Apache Setup : - Create the file /etc/apache2/sites-enabled/idp.shibboleth.com.conf with the following content : ServerName idp.shibboleth.com Allow from all ProxyPass /idp/ ajp://localhost:8009/idp/ - Create the file /etc/apache2/sites-enabled/sp.shibboleth.com.conf with the following content : ServerName sp.shibboleth.com ProxyPass /nuxeo/ http://sp.shibboleth.com:8180/nuxeo/ ProxyPassReverse /nuxeo/ http://sp.shibboleth.com:8180/nuxeo/ ProxyPreserveHost On SetHandler shib AuthType shibboleth ShibRequireSession On require valid-user ShibUseHeaders On - Enable newly created sites : sudo a2enmod proxy_ajp sudo a2ensite idp.shibboleth.com sudo a2ensite sp.shibboleth.com Nuxeo configuration : - Change ports : nuxeo.server.http.port=8180 nuxeo.server.ajp.port=8109 nuxeo.server.tomcat_admin.port=8105 - Follow the shibboleth configuration with https://doc.nuxeo.com/display/NXDOC710/Shibboleth+Authentication and set the file shibboleth-login-config.xml with the following content : org.nuxeo.ecm.platform.usermanager.UserManagerImpl org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig BASIC_AUTH SHIB_AUTH FORM_AUTH WEBENGINE_FORM_AUTH ANONYMOUS_AUTH WEBSERVICES_AUTH uid http://sp.shibboleth.com/Shibboleth.sso/Login http://sp.shibboleth.com/Shibboleth.sso/Logout username email