<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Websso on slash-root.fr</title><link>https://beta.slash-root.fr/tags/websso/</link><description>Recent content in Websso on slash-root.fr</description><generator>Hugo -- gohugo.io</generator><language>fr-fr</language><lastBuildDate>Tue, 16 Nov 2021 14:48:52 +0100</lastBuildDate><atom:link href="https://beta.slash-root.fr/tags/websso/index.xml" rel="self" type="application/rss+xml"/><item><title>LemonLDAP : Installation avec un LDAP et FusionDirectory</title><link>https://beta.slash-root.fr/lemonldap-installation-avec-un-ldap-et-fusiondirectory/</link><pubDate>Tue, 16 Nov 2021 14:48:52 +0100</pubDate><guid>https://beta.slash-root.fr/lemonldap-installation-avec-un-ldap-et-fusiondirectory/</guid><description>&lt;img src="https://beta.slash-root.fr/lemonldap-installation-avec-un-ldap-et-fusiondirectory/cover.png" alt="Featured image of post LemonLDAP : Installation avec un LDAP et FusionDirectory" /&gt;&lt;h2 id="introduction"&gt;&lt;a href="#introduction" class="header-anchor"&gt;&lt;/a&gt;Introduction
&lt;/h2&gt;&lt;p&gt;LemonLDAP::NG est un logiciel open source, créé en 2004 par la Gendarmerie nationale française. Il fournit une solution d' authentification unique distribuée avec gestion centralisée des droits sous licence GPL.&lt;/p&gt;
&lt;p&gt;Le logiciel LemonLDAP::NG est issu d'un logiciel créé par Eric German suivant le protocole de gestion d'annuaire LDAP sous TCP/IP pour le Ministère des finances français. La Gendarmerie nationale reprend ce logiciel pour l'élargir et le conformer à ses besoins.&lt;/p&gt;
&lt;p&gt;Le logiciel fonctionne avec les serveurs web Apache ou Nginx mais un mode reverse proxy permet de l'utiliser avec des applications exécutées sur un autre serveur (IIS, Tomcat, etc.)3,4.&lt;/p&gt;
&lt;p&gt;Il peut gérer plus de 200000 utilisateurs de différentes organisations, il implémente à la fois5 :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;les services de fournisseur d'identité et de service SAML, OpenID, CAS et OpenID Connect6 ;&lt;/li&gt;
&lt;li&gt;peut-être utilisé comme Proxy protocolaire en fédération des identités ;&lt;/li&gt;
&lt;li&gt;l'authentification basée sur LDAP, Kerberos, SQL, Twitter et d'autres protocoles ;&lt;/li&gt;
&lt;li&gt;l'authentification à double facteur (U2F, TOTP, Yubikey, REST ou externe tels SMS ou mails)7&lt;/li&gt;
&lt;li&gt;un système d'authentification unique basé sur des cookies sécurisés ;&lt;/li&gt;
&lt;li&gt;un menu dynamique des applications ;&lt;/li&gt;
&lt;li&gt;un module de réinitialisation de mots de passe ;&lt;/li&gt;
&lt;li&gt;un module d'auto-création de compte ;&lt;/li&gt;
&lt;li&gt;un dispositif de notification ;&lt;/li&gt;
&lt;li&gt;un explorateur de sessions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Depuis la version 1.9, il propose un connecteur FranceConnect, lui permettant d'être simplement soit fournisseur d'identités, soit fournisseur de services8.&lt;/p&gt;
&lt;p&gt;La version 2.0.6 apporte, entre autres évolutions, les nouvelles fonctionnalités suivantes :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;la sur-charge des seconds facteurs et la prise en charge du protocole RADIUS ;&lt;/li&gt;
&lt;li&gt;la possibilité de définir une politique locale des mots de passe ;&lt;/li&gt;
&lt;li&gt;un module de simulation d'identités pour des environnements de formation ;&lt;/li&gt;
&lt;li&gt;un module d'endossement d'identité pouvant être activé à des fins de diagnostic ;&lt;/li&gt;
&lt;li&gt;un module permettant de consulter le profil SSO d'un utilisateur et de vérifier ses droits d'accès ainsi que les en-têtes transmis ;&lt;/li&gt;
&lt;li&gt;un module pour éditer la configuration en lecture seule.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;La version 2.0.7 permet un meilleur support du protocole OpenId Connect et apporte de nombreuses améliorations ou correctifs.&lt;/p&gt;
&lt;p&gt;La version 2.0.8 offre de nombreuses API et améliorations.&lt;/p&gt;
&lt;p&gt;La version 2.0.9 apporte un outil de gestion des sessions, ameliore la gestion des mots de passe, une documentation intégrée au code source et des correctifs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Source : &lt;a href="https://fr.wikipedia.org/wiki/LemonLDAP::NG"&gt;LemonLDAP::NG — Wikipédia (wikipedia.org)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="pré-requis"&gt;&lt;a href="#pr%c3%a9-requis" class="header-anchor"&gt;&lt;/a&gt;Pré-requis
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Un serveur OpenLDAP installé et fonctionnel&lt;/li&gt;
&lt;li&gt;FusionDirectory déployé sur le serveur LDAP&lt;/li&gt;
&lt;li&gt;Un nom de domaine avec la gestion de sa zone DNS&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Suite directe de : &lt;a href="https://beta.slash-root.fr/2021/11/04/openldap-installation-avec-fusiondirectory/"&gt;OpenLDAP : Installation avec FusionDirectory - slash-root.fr&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Le nom de domaine utilisé dans cet article sera : &lt;em&gt;example.com&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;LemonLDAP sera déployé sur le même serveur qu'OpenLDAP / FusionDirectory&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h2 id="installation-lemonldap"&gt;&lt;a href="#installation-lemonldap" class="header-anchor"&gt;&lt;/a&gt;Installation LemonLDAP
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Utiliser le dépôt officiel :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo cat &amp;gt; /etc/apt/sources.list.d/lemonldap-ng.list &lt;span style="color:#e6db74"&gt;&amp;lt;&amp;lt; &amp;#39;EOL&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;# LemonLDAP::NG repository
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;deb https://lemonldap-ng.org/deb 2.0 main
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;deb-src https://lemonldap-ng.org/deb 2.0 main
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;EOL&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Récupérer la clef GPG :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wget -O - https://lemonldap-ng.org/_media/rpm-gpg-key-ow2 | sudo apt-key add -
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Mise à jour du cache apt :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Installer le package principal et le module Perl pour Apache2 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt install libapache2-mod-perl2 lemonldap-ng
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;LemonLDAP est également compatible avec Nginx mais cela ne sera pas abordé dans cet article.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Installer le module FCGID pour Apache :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt install libapache2-mod-fcgid
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Activer les modules et les configurations :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo a2ensite manager-apache2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo a2ensite portal-apache2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo a2ensite handler-apache2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo a2enmod fcgid perl alias rewrite headers
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tester la configuration d'Apache2 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apachectl configtest
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Redémarrer Apache2 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl restart apache2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Par défaut, le domaine est &lt;code&gt;example.com&lt;/code&gt;. Celui-ci peut être changé.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Pour changer le nom de domaine par défaut :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sed -i &lt;span style="color:#e6db74"&gt;&amp;#39;s/example\.com/mondomaine.local/g&amp;#39;&lt;/span&gt; /etc/lemonldap-ng/* /var/lib/lemonldap-ng/conf/lmConf-1.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;Adapter la suite des instructions avec le domaine utilisé en lieu et place d'&lt;code&gt;example.com&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="accès-web-ui"&gt;&lt;a href="#acc%c3%a8s-web-ui" class="header-anchor"&gt;&lt;/a&gt;Accès Web UI
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Pour accéder à la Web UI et effectuer les tests nécessaires, il y a 4 enregistrements A à réaliser dans la zone DNS du domaine :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;auth.example.com&lt;/li&gt;
&lt;li&gt;manager.example.com&lt;/li&gt;
&lt;li&gt;test1.example.com&lt;/li&gt;
&lt;li&gt;test2.example.com&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;C'est 4 URLs sont à rediriger vers le même serveur. test1 et test2 sont là pour simuler 2 applications différentes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Avec un navigateur web, accéder à &lt;a href="http://auth.example.com"&gt;http://auth.example.com&lt;/a&gt; :&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="1stacces.png" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dans un 1er temps, utiliser le login &lt;code&gt;dwho&lt;/code&gt; avec le mot de passe &lt;code&gt;dwho&lt;/code&gt;. Ce compte est local à LemonLDAP et à des droits administrateur sur la plateforme.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Se rendre sur &lt;code&gt;WebSSO Manager&lt;/code&gt; ou directement via l'URL : &lt;a href="http://manager.example.com"&gt;http://manager.example.com&lt;/a&gt; :&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="websso_manager.png" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;La configuration qui va être appliqué peut se faire intégralement par cette Web UI :&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="configuration_sso.png" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Afin de pouvoir automatiser tout ce processus plus tard, la configuration sera réalisée en ligne de commande à l'aide de l'outil :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/usr/share/lemonldap-ng/bin/lemonldap-ng-cli help
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="activer-les-applications-de-démonstration"&gt;&lt;a href="#activer-les-applications-de-d%c3%a9monstration" class="header-anchor"&gt;&lt;/a&gt;Activer les applications de démonstration
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;LemonLDAP est fournit avec 2 applications de démonstration qui permettent de lire les en-têtes HTTP. Pour les activer :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo a2ensite test-apache2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl reload apache2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;C'est un vhost standard d'Apache2 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo cat /etc/apache2/sites-enabled/test-apache2.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remarquer la ligne qui à été ajoutée concernant le SSO :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# SSO protection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; PerlHeaderParserHandler Lemonldap::NG::Handler::ApacheMP2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vérifier l'accès aux applications de démonstration en se rendant sur :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://test1.example.com"&gt;http://test1.example.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://test2.example.com"&gt;http://test2.example.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pas besoin de s'authentifier car cela a été fait l'autre de l'accès à la plateforme LemonLDAP :&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="test1.png" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Il est possible de se déconnecter de cette application test1, en bas de la page :&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="test1_logout.png" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lors de la prochaine tentative d'accès, une demande d'authentification de LemonLDAP sera demandée.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="configuration-avec-openldap--fusiondirectory"&gt;&lt;a href="#configuration-avec-openldap--fusiondirectory" class="header-anchor"&gt;&lt;/a&gt;Configuration avec OpenLDAP / FusionDirectory
&lt;/h2&gt;&lt;p&gt;Pour le moment LemonLDAP est en mode démo et utilise une base de compte interne. La configuration de LemonLDAP va consister à utiliser l'annuaire OpenLDAP préalablement déployé avec FusionDirectory. Une chose à savoir est que l'accès au manager est réservé exclusivement à l'utilisateur &lt;code&gt;dwho&lt;/code&gt; de la base de compte interne à LemonLDAP. Lors de la jonction de l'annuaire LDAP à LemonLDAP, la base de compte interne ne sera plus exploitable. Par conséquence, l'accès au WebSSO Manager ne se fera plus. Il y a plusieurs méthodes possibles pour retrouver cet accès. En voici une qui consiste à n'autoriser que l'utilisateur &lt;code&gt;fd-admin&lt;/code&gt; de l'annuaire LDAP :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Avec l'utilisateur &lt;code&gt;dwho&lt;/code&gt; se rendre dans le Manager. Puis &lt;code&gt;Hôtes virtuels&lt;/code&gt;, &lt;code&gt;manager.example.com&lt;/code&gt;, &lt;code&gt;Règles d&amp;#039;accès&lt;/code&gt; :&lt;/p&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="vhost_manager.png" alt="" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modifier la partie &lt;code&gt;Règles&lt;/code&gt; à droite comme ci-dessus. Puis &lt;code&gt;Sauver&lt;/code&gt; la configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Paramétrer la liaison à l'annuaire LDAP :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo /usr/share/lemonldap-ng/bin/lemonldap-ng-cli -yes &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; set &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; authentication LDAP &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; userDB LDAP &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; passwordDB LDAP &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; registerDB LDAP &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapServer &lt;span style="color:#e6db74"&gt;&amp;#39;ldap://localhost&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; managerDn &lt;span style="color:#e6db74"&gt;&amp;#39;cn=admin,dc=example,dc=com&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; managerPassword &lt;span style="color:#e6db74"&gt;&amp;#39;MonSuperPassword&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapBase &lt;span style="color:#e6db74"&gt;&amp;#39;ou=people,dc=example,dc=com&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Pour des raisons de praticité, le &lt;code&gt;managerDn&lt;/code&gt; utilisé est le compte admin de l'annuaire. Dans un contexte de production un autre compte sera utilisé.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Afin d'avoir une vue synthétique de l'annuaire et obtenir les chemins complets pour la précédente commande, utiliser :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo slapcat | grep &lt;span style="color:#e6db74"&gt;&amp;#34;dn:&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exporter les attributs souhaités :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo /usr/share/lemonldap-ng/bin/lemonldap-ng-cli -force &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; -yes &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; addKey &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapExportedVars uid uid &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapExportedVars cn cn &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapExportedVars sn sn &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapExportedVars mail mail &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ldapExportedVars givenName givenName
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Voici le retour attendu :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Status : &lt;span style="color:#f92672"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;localhost&amp;#39;&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;&amp;gt; &lt;span style="color:#e6db74"&gt;&amp;#39;OK&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;]&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Redémarrer Apache2 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl restart apache2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;L'utilisateur &lt;code&gt;fd-admin&lt;/code&gt; peut maintenant s'authentifier, avec accès au manager, sur la plateforme : &lt;a href="http://auth.example.com"&gt;http://auth.example.com&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img data-recalc-dims="1" decoding="async" src="auth_fdadmin.png" alt="" /&gt;&lt;/p&gt;</description></item></channel></rss>