Documentation for LemonLDAP::NG 2.0 =================================== .. image:: logos/logo_llng_600px.png :alt: LL::NG logo :align: center :target: https://www.lemonldap-ng.org .. toctree:: Documentation index .. toctree:: :caption: Getting started :hidden: presentation index_upgrade index_installation .. toctree:: :caption: Configuration :hidden: index_webserver index_firststeps index_portal index_handler index_databases .. toctree:: :caption: Application protection :hidden: writingrulesand_headers variables selfmadeapplication formreplay customhandlers webserviceprotection websocketapplications applications/authbasic applications .. toctree:: :caption: Advanced topics :hidden: index_advanced index_minihowtos index_exploitation index_dev Presentation ------------ - :doc:`Presentation` - :doc:`Quick start tutorial` Upgrading --------- - :doc:`Upgrade notes` Installation ------------ - :doc:`prereq` - :doc:`Installation on Debian/Ubuntu with packages` - :doc:`Installation on RHEL/CentOS with packages` - :doc:`Run in LemonLDAP::NG in Docker` .. _start-configuration: Configuration ------------- Configuring your Web server ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :doc:`Deploy Nginx configuration` *(recommended configuration)* - :doc:`Deploy Apache configuration` Basics ~~~~~~ |image5| - :doc:`Configuration overview` - :doc:`Configure Single Sign On cookie and portal URL` - :doc:`Parameter redirections` - :doc:`Set exported variables` - :doc:`Manage virtual hosts` - :doc:`Configure sessions specificities` Portal ~~~~~~ |image6| - :doc:`Presentation` - :doc:`Portal customization` - :doc:`Portal menu` - :doc:`REST/SOAP servers` - :doc:`Captcha` - :doc:`Public pages` .. _start-authentication-users-and-password-databases: Authentication, users and password databases ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |image7| ==================================================================== =============================================== ======== ======== Official Backends Authentication Users Password ==================================================================== =============================================== ======== ======== :doc:`Active Directory` ✔ ✔ ✔ :doc:`Apache (Basic, NTLM, OTP, ...)` ✔ :doc:`CAS` ✔ |new| :doc:`SQL Databases` ✔ ✔ ✔ :doc:`Demonstration` ✔ ✔ ✔ :doc:`Facebook` ✔ ✔ :doc:`GitHub` |new| [1]_ ✔ :doc:`GPG` |new| [2]_ ✔ :doc:`Kerberos` |new| ✔ :doc:`LDAP` ✔ ✔ ✔ :doc:`LinkedIn` ✔ :doc:`Null` ✔ ✔ ✔ :doc:`OpenID Connect` ✔ ✔ :doc:`PAM` |new| ✔ :doc:`Proxy LL::NG` ✔ ✔ :doc:`Radius` ✔ :doc:`REST` |new| ✔ ✔ ✔ :doc:`SAML 2.0 / Shibboleth` ✔ ✔ :doc:`Slave` ✔ ✔ :doc:`SSL` ✔ :doc:`Twitter` ✔ :doc:`WebID` ✔ ✔ :doc:`Yubico OTP` |deprecated| *Replaced by* :doc:`yubikey2f` :doc:`Custom modules` |new| ✔ ✔ ✔ ==================================================================== =============================================== ======== ======== ==================================================================== ================================================= ======== ========================= Combo Backends Authentication Users Password ==================================================================== ================================================= ======== ========================= :doc:`Choice by users` ✔ ✔ ✔ :doc:`Combination of auth schemes` |new| ✔ ✔ ✔ (since *2.0.10*) :doc:`Multiple backends stack` |deprecated| *Replaced by* :doc:`Combination` ==================================================================== ================================================= ======== ========================= ==================================================================== =============================================== ======== ======== Obsolete Backends Authentication Users Password ==================================================================== =============================================== ======== ======== :doc:`OpenID` ✔ ✔ :doc:`Remote LL::NG` ✔ ✔ ==================================================================== =============================================== ======== ======== ==================================================================== ============== ================= Second factor (:doc:`documentation`) Authentication Self-registration ==================================================================== ============== ================= :doc:`TOTP` *(Google Authenticator,...)* |new| ✔ ✔ :doc:`WebAuthn` |new| ✔ ✔ :doc:`E-mail Second Factor` |new| ✔ [18]_ :doc:`Yubico OTP` |new| ✔ ✔ :doc:`External Second Factor` *(OTP, SMS,...)* |new| ✔ [18]_ :doc:`REST Second Factor` |new| ✔ [18]_ :doc:`Radius Second Factor` |new| [3]_ ✔ :doc:`Password as second factor` |new| [4]_ ✔ ✔ :doc:`TOTP-or-U2F` |deprecated| ✔ ✔ :doc:`U2F` |deprecated| ✔ ✔ ==================================================================== ============== ================= .. versionadded:: 2.0.6 See :doc:`Additional second factors` for configuring several multiple REST, external or e-mail based second factors with different parameters ==================================================================== ============== Auth addons Authentication ==================================================================== ============== :doc:`Auto Signin` |new| ✔ ==================================================================== ============== .. _start-identity-provider: Identity provider ^^^^^^^^^^^^^^^^^ .. tip:: - All identity provider protocols can be used simultaneously - LemonLDAP::NG can be used as a :doc:`proxy between those protocols` |image26| ===================================================================== ================ ================= Protocol Service Provider Identity Provider ===================================================================== ================ ================= :doc:`CAS 1.0 / 2.0 / 3.0` ✔ ✔ :doc:`SAML 2.0 / Shibboleth` ✔ ✔ :doc:`OpenID Connect` ✔ ✔ :doc:`OpenID 2.0` *(deprecated)* ✔ ✔ :doc:`Get parameters provider` *(for poor applications)* ✔ :doc:`Jitsi Meet Tokens` ✔ ===================================================================== ================ ================= *Options* Issuers timeout: Delay for issuers for submitting their authentication requests .. tip:: * To avoid a bad/expired token and lose redirection to the SP protected application after authentication if IdP URLs are served by different load balancers, you can force Issuer tokens to be stored into Global Storage by editing ``lemonldap-ng.ini`` in section [portal]: .. code:: ini [portal] forceGlobalStorageIssuerOTT = 1 Attacks and Protection ^^^^^^^^^^^^^^^^^^^^^^ .. tip:: To learn or find out more about security, go to :doc:`Security` documentation |image27| ====================================================== =============== ============================ Attack LLNG protection System Integrator protection ====================================================== =============== ============================ :doc:`Brute Force` ✔ ✔ :ref:`Page Content` ✔ :ref:`CSRF` ✔ Deny of Service ✔ :ref:`Invisible iFrame` ✔ ✔ Man-in-the-Middle ✔ Software Exploit ✔ :ref:`SSO by-passing` ✔ :doc:`XSS` ✔ :doc:`IP reputation` ✔ ✔ ====================================================== =============== ============================ Plugins ^^^^^^^ |image28| ==================================================================== ============================================================================================================================================ Name Description ==================================================================== ============================================================================================================================================ :doc:`Adaptative authentication` Rules to modulate authentication level :doc:`Auto Signin` Sign-in automatically :doc:`Brute Force protection` User must wait to log in after some failed login attempts :doc:`CDA` Cross Domain Authentication :doc:`Check DevOps` [5]_ |new| Check DevOps handler file :doc:`Check HIBP` [19]_ |new| Check Have I Been Pwned :doc:`Check entropy` [21]_ |new| Check entropy of password :doc:`InitializePasswordReset` [22]_ |new| Initialize Password Reset by mail :doc:`Check state` |new| Check state plugin (test page) :doc:`Check user` [6]_ Check access rights, transmitted headers and session attibutes for a specific user and URL :doc:`Configuration viewer` Edit WebSSO configuration in Read Only mode :doc:`Context switching` [7]_\ Switch context other users :doc:`CrowdSec` [8]_\ |new| CrowdSec bouncer :doc:`Custom` Write a custom plugin :doc:`Decrypt value` [9]_\ Decrypt ciphered values :doc:`Display login history` Display Success/Fails logins :doc:`Find user` [12]_\ |new| Search for user account :doc:`Force authentication` Force authentication to access to Portal :doc:`Global logout` [10]_ Suggest to close all opened sessions at logout :doc:`Grant sessions` Rules to apply before allowing a user to open a session :doc:`Impersonation` [11]_\ Allow users to use another identity :doc:`NewLocationWarning` [13]_\ |new| Send an email when user sign in from a new location :doc:`Notifications system` Display a message during log in process :doc:`Portal status` Experimental portal status page :doc:`Public pages` Enable public pages system :doc:`Refresh session API` [14]_ Plugin that provides an API to refresh a user session :doc:`Reset certificate by mail` [15]_\ |new| Allow users to reset their certificate :doc:`Reset password by mail` Send a mail to reset its password :doc:`Remember auth choice` [20]_\ |new| Remember user last authentication choice :doc:`REST services` REST server for :doc:`Proxy` :doc:`SOAP services` |deprecated| SOAP server for :doc:`Proxy` :doc:`Trusted browser` Remember previous authentications Upgrade session This plugin explains to an already authenticated user that a higher authentication level is required to access the URL instead of reject him ==================================================================== ============================================================================================================================================ Handlers ~~~~~~~~ |image41| Handlers are software control agents to be installed on your web servers *(Nginx, Traefik, Apache, PSGI like Plack based servers or Node.js)*. ==================================================================== ========== ===================================================================== =========================================== ================================================================================== =============================================== ====================================================================================================================== Handler type Apache LLNG FastCGI/uWSGI server (Nginx, Traefik or :doc:`SSOaaS`) `Plack servers `__ Node.js ( `express apps `__\ or :doc:`SSOaaS`) :doc:`Self protected apps` Comment ==================================================================== ========== ===================================================================== =========================================== ================================================================================== =============================================== ====================================================================================================================== Main *(default handler)* ✔ ✔ ✔ :doc:`Partial` ** [16]_ ** ✔ :doc:`AuthBasic` ✔ ✔ ✔ ✔ Designed for some server-to-server applications :doc:`CDA` ✔ ✔ ✔ ✔ For Cross Domain Authentication :doc:`DevOps` (:doc:`SSOaaS`) |new| ✔ ✔ ✔ ✔ Allows application developers to define their own rules and headers inside their applications :doc:`DevOpsST` (:doc:`SSOaaS`) |new| ✔ ✔ ✔ ✔ Enables both :doc:`DevOps` and :doc:`Service Token` :doc:`DevOpsCDA` (:doc:`SSOaaS`) |new| ✔ ✔ ✔ ✔ Enables both :doc:`DevOps` and :doc:`CDA` :doc:`OAuth2` [17]_\ |new| ✔ ✔ ✔ ✔ Uses OpenID Connect/OAuth2 access token to check authentication and authorization, can be used to protect Web Services :doc:`Secure Token` ✔ ✔ ✔ Designed to secure exchanges between a LLNG reverse-proxy and a remote app :doc:`Service Token` |new| *(Server-to-Server)* ✔ ✔ ✔ ✔ ✔ Designed to permit underlying requests *(API-Based Infrastructure)* :doc:`Zimbra PreAuth` ✔ ✔ ✔ ==================================================================== ========== ===================================================================== =========================================== ================================================================================== =============================================== ====================================================================================================================== LLNG databases ~~~~~~~~~~~~~~ .. _start-configuration-database: Configuration database ^^^^^^^^^^^^^^^^^^^^^^ |image46| LL::NG needs a storage system to store its own configuration (managed by the manager). Choose one in the following list: ===================================================== ========= ==================================================================== Backend Shareable Comment ===================================================== ========= ==================================================================== :doc:`File (JSON)` Not shareable between servers except if used in conjunction with :doc:`REST` or with a shared file system (NFS,...). Selected by default during installation. :doc:`YAML` |new| Same as :doc:`File` but in YAML format instead of JSON :doc:`SQL (CDBI/RDBI)` ✔ **Recommended for large-scale systems**. Prefer CDBI. :doc:`Cassandra` ✔ Via SQL pseudo-driver :doc:`LDAP` ✔ :doc:`MongoDB` |deprecated| ✔ :doc:`SOAP` |deprecated| ✔ Proxy backend to be used in conjunction with another configuration backend. \ **Can be used to secure another backend** for remote servers. :doc:`REST` |new| ✔ Proxy backend to be used in conjunction with another configuration backend. \ **Can be used to secure another backend** for remote servers. :doc:`Local` |new| Use only lemonldap-ng.ini parameters. :doc:`Overlay` |new| ✔ Pseudo configuration backend that permits one to store part of the configuration into local files. \ *(for example to not store secrets into central configuration)* ===================================================== ========= ==================================================================== .. tip:: You can not start with an empty configuration, so read :doc:`how to change configuration backend` to convert your existing configuration into another one. .. _start-sessions-database: Sessions database ^^^^^^^^^^^^^^^^^ |image50| Sessions are stored using `Apache::Session `__ modules family. All `Apache::Session `__ style modules are usable except for some features. .. attention:: If you plan to use LLNG in a large-scale system, take a look at :ref:`Performance Test` to choose the right backend. A :doc:`Browseable SQL backend` is generally a good choice. ================================================================ ========= ================================================ ==================================================== ================== ================================================================================================================================================================================================= Backend Shareable Session explorer Session restrictions Session expiration Comment ================================================================ ========= ================================================ ==================================================== ================== ================================================================================================================================================================================================= :doc:`File` ✔ ✔ ✔ Not shareable between servers except if used in conjunction with :doc:`REST session backend` or with a shared file system (NFS,...). Selected by default during installation. :doc:`PgJSON` ✔ ✔ ✔ ✔ **Recommended backend for production installations** :doc:`Browseable MySQL` ✔ ✔ ✔ ✔ Recommended for those who prefer MySQL :doc:`Browseable LDAP` ✔ ✔ ✔ ✔ :doc:`Redis` ✔ ✔ ✔ ✔ The fastest. Must be secured by network access control. :doc:`MongoDB` |deprecated| ✔ ✔ ✔ ✔ Must be secured by network access control. :doc:`Cassandra` ✔ ✔ ✔ ✔ Another supported NoSQL DB :doc:`SQL` ✔ ✔ ✔ ✔ Unoptimized for session explorer and single session features. :doc:`REST` |new| ✔ ✔ ✔ ✔ Proxy backend to be used in conjunction with another session backend. :doc:`SOAP` |deprecated| ✔ ✔ ✔ ✔ Proxy backend to be used in conjunction with another session backend. ================================================================ ========= ================================================ ==================================================== ================== ================================================================================================================================================================================================= .. tip:: You can migrate from one session backend to another using the :doc:`session conversion script`. (|new| *since 2.0.7*) Applications protection ----------------------- |image53| - :doc:`Writing rules and headers` - :doc:`Variables that can be used in rules and headers` - :doc:`Integrate vendor applications` - :doc:`Integrate self-made applications` - :doc:`Form replay` - :doc:`Custom Handlers` - :doc:`WebServices / API` - :doc:`WebSocket Applications` Well known compatible applications ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. note:: Here is a list of well known applications that are compatible with LL::NG. A full list is available on :doc:`vendor applications page`. |adfs| |alfresco| |awx| |bugzilla| |dokuwiki| |drupal| |fusiondirectory| |gitlab| |glpi| |liferay| |mediawiki| |nextcloud| |simplesamlphp| |wordpress| |xwiki| |zimbra| Advanced features ----------------- |image54| - :doc:`SMTP server setup` - :doc:`Notifications system` - :doc:`Store password in session` - :doc:`Cross Domain Authentication (CDA)` - :doc:`Role Based Access Control (RBAC)` - :doc:`Use custom functions` - :doc:`Use extended functions` - :doc:`Reset password by mail (self service)` - :doc:`Create an account (self service)` - :doc:`Forward logout to applications` - :doc:`Secure Token Handler` - :doc:`AuthBasic Handler` - :doc:`SSO as a Service` *(SSOaaS)* |new| - :doc:`Handling server webservice calls` |new| - `LemonLDAP::NG kubernetes controller `__ - :doc:`Safe jail` - :doc:`Login history` - :doc:`Fast CGI support` - :doc:`Advanced PSGI usage` - :doc:`Ignore some manager tests` - :doc:`See full parameters list` - :doc:`Installation from the tarball` - :doc:`Installation on Suse Linux Enterprise Server with packages` - :doc:`Deploy Traefik configuration` - :doc:`Deploy LemonLDAP::NG on Plack servers family` *(Twiggy, Starman, Corona,...)* |new| - :doc:`Node.js handler` |new| Mini howtos ----------- |image57| - :doc:`Command Line Interface (lemonldap-ng-cli) examples` - :doc:`Modify Manager protection` - :doc:`Configuration and sessions in MySQL` - :doc:`Configuration and sessions in LDAP` - :doc:`Configuration and sessions access by REST` - :doc:`Integration in Active Directory (LDAP and Kerberos)` - :doc:`Create a protocol proxy` *(SAML to OpenID, CAS to SAML ,...)* - :doc:`Convert HTTP header into environment variable` - :doc:`Connect to Renater Federation` |new| - :doc:`Run LemonLDAP::NG components behind a reverse proxy` - :doc:`Configure LL::NG to use an outgoing proxy` Exploitation ------------ |image59| - :doc:`Performances` - :doc:`Security` - :doc:`SELinux` - :doc:`Handler status page` - :doc:`Portal state check` *(health check for fail-over)* |new| - :doc:`Monitoring` - :doc:`Logs settings` - :doc:`Error messages` - :doc:`High Availability` Bug report ---------- See :doc:`How to report a bug`. Developer corner ---------------- To contribute, see : - :doc:`Contribute to project` To develop an handler, see: - :doc:`Handler architecture` - :doc:`Custom handlers` To develop a portal plugin, see manpages: - Lemonldap::NG::Portal - Lemonldap::NG::Portal::Auth - Lemonldap::NG::Portal::UserDB - Lemonldap::NG::Portal::Main::SecondFactor - Lemonldap::NG::Portal::Main::Issuer - Lemonldap::NG::Portal::Main::Plugin - Lemonldap::NG::Portal::Main::Request *(the request object)* To add a new language: - Join us on https://app.transifex.com/lemonldapng/lemonldapng/dashboard/ - translate the 3 files - then we will append them in sources. If you don't want to publish your translation (``XX`` must be replaced by your language code): - Manager: translate ``lemonldap-ng-manager/site/htdocs/static/languages/en.json`` in ``lemonldap-ng-manager/site/htdocs/static/languages/XX.json`` and enable it in "lemonldap-ng.ini" file - Portal: translate ``lemonldap-ng-portal/site/htdocs/static/languages/en.json`` in ``lemonldap-ng-portal/site/htdocs/static/languages/XX.json`` and enable it in "lemonldap-ng.ini" file - Portal Mails: translate ``lemonldap-ng-portal/site/templates/common/mail/en.json`` in ``lemonldap-ng-portal/site/templates/common/mail/XX.json`` .. [1] :doc:`GitHub authentication` is available with LLNG ≥ 2.0.8 .. [2] :doc:`GPG authentication` is available with LLNG ≥ 2.0.2 .. [3] :doc:`Radius second factor` is available with LLNG ≥ 2.0.6 .. [4] :doc:`Password second factor` is available with LLNG ≥ 2.0.16 .. [5] :doc:`Check DevOps file plugin` is available with LLNG ≥ 2.0.12 .. [6] :doc:`Check user plugin` is available with LLNG ≥ 2.0.3 .. [7] :doc:`Context switching plugin` is available with LLNG ≥ 2.0.6 .. [8] :doc:`CrowdSec bouncer ` is available with LLNG ≥ 2.0.12 .. [9] :doc:`Decrypt value plugin` is available with LLNG ≥ 2.0.7 .. [10] :doc:`Global Logout plugin` is available with LLNG ≥ 2.0.7 .. [11] :doc:`Impersonation plugin` is available with LLNG ≥ 2.0.3 .. [12] :doc:`Find user plugin` is available with LLNG ≥ 2.0.11 .. [13] :doc:`NewLocationWarning` is available with LLNG ≥ 2.0.14 .. [14] :doc:`Refresh session API plugin` is available with LLNG ≥ 2.0.7 .. [15] :doc:`Reset certificate by mail plugin` is available with LLNG ≥ 2.0.7 .. [16] :doc:`Node.js handler` has not yet reached the same level of functionalities .. [17] :doc:`OAuth2 Handler` is available with LLNG ≥ 2.0.4 .. [18] When configured as an additional second factor, see :ref:`sfextraregister` .. [19] :doc:`Check HIBP plugin` is available with LLNG ≥ 2.0.16 .. [20] :doc:`Remember AuthChoice plugin` is available with LLNG ≥ 2.0.15 .. [21] :doc:`Check entropy plugin` is available with LLNG ≥ 2.18.0 .. [22] :doc:`initializePasswordReset` is available with LLNG ≥ 2.18.0 .. |image0| image:: /icons/kthememgr.png .. |image1| image:: /icons/warehause.png .. |image3| image:: /icons/clean.png .. |image5| image:: /icons/lists.png .. |image6| image:: /icons/colors.png .. |image7| image:: /icons/gpg.png .. |image26| image:: /icons/personal.png .. |image27| image:: /icons/neotux.png .. |image28| image:: /icons/personal.png .. |image41| image:: /icons/gpg.png .. |image46| image:: /icons/utilities.png .. |image50| image:: /icons/kmultiple.png .. |image53| image:: /icons/access.png .. |image54| image:: /icons/neotux.png .. |image57| image:: /icons/jabber_protocol.png .. |image59| image:: /icons/xeyes.png .. |beta| image:: /documentation/beta.png :width: 35px :alt: beta .. |new| image:: /documentation/new.png :alt: new .. |deprecated| image:: /documentation/deprecated.png :alt: deprecated .. |adfs| image:: applications/microsoft-adfs.png :target: applications/adfs.html .. |alfresco| image:: applications/alfresco_logo.png :target: applications/alfresco.html .. |awx| image:: applications/logo-awx.png :target: applications/awx.html .. |bugzilla| image:: applications/bugzilla_logo.png :target: applications/bugzilla.html .. |dokuwiki| image:: applications/dokuwiki_logo.png :target: applications/dokuwiki.html .. |drupal| image:: applications/drupal_logo.png :target: applications/drupal.html .. |fusiondirectory| image:: applications/fusiondirectory-logo.jpg :target: applications/fusiondirectory.html .. |gitlab| image:: applications/gitlab_logo.png :target: applications/gitlab.html .. |glpi| image:: applications/glpi_logo.png :target: applications/glpi.html .. |liferay| image:: applications/liferay_logo.png :target: applications/liferay.html .. |mediawiki| image:: applications/mediawiki_logo.png :target: applications/mediawiki.html .. |nextcloud| image:: applications/nextcloud-logo.png :target: applications/nextcloud.html .. |simplesamlphp| image:: applications/simplesamlphp_logo.png :target: applications/simplesamlphp.html .. |wordpress| image:: applications/wordpress_logo.png :target: applications/wordpress.html .. |xwiki| image:: applications/xwiki.png :target: applications/xwiki.html .. |zimbra| image:: applications/zimbra_logo.png :target: applications/zimbra.html