===== SP v3 os 8 ===== Déploiement d'un Service Provider v3 sous OS type RHEL8/Centos8 ici vzLinux8 ===== Réference ===== * https://wiki.shibboleth.net/confluence/display/SP3/Home ===== Repo shibboleth ===== * https://wiki.shibboleth.net/confluence/display/SP3/RPMInstall * https://shibboleth.atlassian.net/wiki/spaces/SP3/pages/2065335566/RPMInstall le site de shibboleth fournit maintenant des packahe RPM (opensuse avant) depuis le site https://shibboleth.net/downloads/service-provider/RPMS/ on genere un fichier de repository pur notre distribution (ici centos 8) [root@mutsp3 yum.repos.d]# cat shibboleth.repo [shibboleth] name=Shibboleth (CentOS_8) # Please report any problems to https://shibboleth.atlassian.net/jira type=rpm-md mirrorlist=https://shibboleth.net/cgi-bin/mirrorlist.cgi/CentOS_8 gpgcheck=1 gpgkey=https://shibboleth.net/downloads/service-provider/RPMS/repomd.xml.key https://shibboleth.net/downloads/service-provider/RPMS/cantor.repomd.xml.key enabled=1 ===== yum install ===== [root@mutsp3 yum.repos.d]# yum install shibboleth.x86_64 Installé: liblog4shib2-2.0.1-1.x86_64 libsaml12-3.2.1-1.x86_64 libtool-ltdl-2.4.6-25.vl8.x86_64 libxml-security-c20-2.0.4-1.x86_64 libxmltooling10-3.2.1-1.x86_64 opensaml-schemas-3.2.1-1.x86_64 shibboleth-3.3.0-1.x86_64 unixODBC-2.3.7-1.vl8.x86_64 xerces-c-3.2.2-3.vl8.x86_64 xmltooling-schemas-3.2.1-1.x86_64 Terminé ! ===== Post install ===== ==== demarrage automatique ==== je conseil d'installer le package bash-completion.noarch pour profiter de la completion des commandes systemctl [root@musp3 ~]# systemctl start shibd.service [root@musp3 ~]# systemctl status shibd.service ● shibd.service - Shibboleth Service Provider Daemon Loaded: loaded (/usr/lib/systemd/system/shibd.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2022-05-05 22:49:50 CEST; 7s ago Docs: https://wiki.shibboleth.net/confluence/display/SP3/Home Main PID: 63040 (shibd) Tasks: 5 (limit: 104857) Memory: 25.8M CGroup: /system.slice/shibd.service └─63040 /usr/sbin/shibd -f -F Ainsi que httpd restart / reload pour charger le mod_shib contenu dans /etc/httpd/conf.d/shib.conf [root@musp3 ~]# systemctl restart httpd.service ==== emplacement des fichiers de log ==== definis dans les fichier .logger : [root@musp3 ~]# cd /etc/shibboleth/ [root@musp3 shibboleth]# grep fileName *.logger shibd.logger:log4j.appender.shibd_log.fileName=/var/log/shibboleth/shibd.log shibd.logger:log4j.appender.warn_log.fileName=/var/log/shibboleth/shibd_warn.log shibd.logger:log4j.appender.tran_log.fileName=/var/log/shibboleth/transaction.log shibd.logger:log4j.appender.sig_log.fileName=/var/log/shibboleth/signature.log ==== httpd.conf ==== $ diff httpd.conf httpd.conf.orig 275c275 < UseCanonicalName On --- > UseCanonicalName Off ==== test Status ==== Parametrer l'ACL dans /etc/shibboleth/shibboleth2.xml qui permet d'acceder a cet URL Acces: * http://musp3.tem-tsp.eu/Shibboleth.sso/Status les metadata directement: * http://musp3.tem-tsp.eu/Shibboleth.sso/Metadata ==== test config ==== attention à la libCurl et openssl : from https://wiki.infn.it/progetti/cloud-areapd/aai_integration_with_keystone/aai_integrations_with_openstack_keystone_icehouse#aai_integrations_in_openstack_keystone_icehouse even if the message is marked as critical, those errors can be ignored. On many RedHat/Fedora installation a different version of libcurl is required, the library is located in /opt/shibboleth/lib64. The shibboleth daemon calls the configuration script /etc/sysconfig/shibd in order to overwrite the system library. In case it is possible to remove the error running the command LD_LIBRARY_PATH=/opt/shibboleth/lib64 shibd -t ===== Parametrage shibboleth2.xml ===== * https://shibboleth.atlassian.net/wiki/spaces/SP3/pages/2063695920/Configuration le fichier /etc/shibboleth/shibboleth2.xml contient l'essentiel du paramétrage du service Prodider shibboleth. Sont représentés ici uniquement les parties modifiées par rapport au fichier original, à savoir le service SSO, les messages d'erreur, et les Metadata. ==== SSO ==== * https://shibboleth.atlassian.net/wiki/spaces/SP3/pages/2065334685/SessionInitiator https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPServiceSSO .. SAML2 SAML1 ==== error messages ==== ... ==== Metadata ==== autoriser l'ecriture au user shibd (user sous lequel tourne le daemon shibd) au repertoire de config / telecharement des metadata par defaut /etc/shibboeth [root@wood shibboleth]# chgrp shibd . [root@wood shibboleth]# chmod 775 . ==== Certificats de signature des metadata ==== cf https://services.renater.fr/federation/technique/metadata certificat Renater [root@wood shibboleth]# wget https://federation.renater.fr/renater/metadata-federation-renater.crt ===== Multiples vhost sur un meme SP ===== ==== references ==== * https://wiki.cam.ac.uk/raven/Virtual_hosting_issues_with_Shibboleth * https://wiki.cam.ac.uk/raven/SP_Metadata * https://services.renater.fr/federation/documentation/fiches-techniques/sp/config-sp-virtualhosting avant de generer une nouvelle paire de clée, il est preferable de sauvegarder la paire initiale (car le -f / force les ecrasera ) [root@wood shibboleth]# cp sp-key.pem sp-key-wood.pem [root@wood shibboleth]# cp sp-cert.pem sp-cert-wood.pem générer la paire de clé pour l'application/vhost, on don eun nom de fichier permettant d'identifier le certificat à l'application (utile si hebergement de plusieurs ApllicationOverride/vhost) , et on donne acces à l'utilisateur shibd a ces fichiers : [root@wood shibboleth]# ./keygen.sh -h mood.paris-saclay.fr -f Generating a 2048 bit RSA private key ............................................................................................+++ ....................+++ writing new private key to './sp-key.pem' ----- [root@wood shibboleth]# mv sp-key.pem sp-key-mood.paris-saclay.fr.pem [root@wood shibboleth]# mv sp-cert.pem sp-cert-mood.paris-saclay.fr.pem [root@wood shibboleth]# chown shibd sp-cert-mood.paris-saclay.fr.pem sp-key-mood.paris-saclay.fr.pem déclaration de l'Application Override (dans la section ApplicationDdefaults de shibboleth2.xml) avec chargement des certificats auto-signés ci-dessus ... ==== metadata Application Override / vhost ==== pour que ce SP hebergé sur cette instance mutualisée de shibd soit identifiable de maniere independante dans la fédération d'identité, il faut y declaré ses metadata disponible sur le service shibd : Shibboleth.sso/Metadata , exemple ici https://mood.paris-saclay.fr/Shibboleth.sso/Metadata [root@shib-ds-wayf ~]# wget https://mood.paris-saclay.fr/Shibboleth.sso/Metadata