From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 5F5DA91EA2 for ; Thu, 9 Feb 2023 14:32:10 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4173224A2D for ; Thu, 9 Feb 2023 14:31:40 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 9 Feb 2023 14:31:37 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id F15A946554 for ; Thu, 9 Feb 2023 14:31:36 +0100 (CET) From: Lukas Wagner To: pbs-devel@lists.proxmox.com Date: Thu, 9 Feb 2023 14:31:22 +0100 Message-Id: <20230209133128.695211-13-l.wagner@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230209133128.695211-1-l.wagner@proxmox.com> References: <20230209133128.695211-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.204 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [ldap-test.com] Subject: [pbs-devel] [PATCH v3 proxmox-backup 12/18] docs: add documentation for LDAP realms X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2023 13:32:10 -0000 Signed-off-by: Lukas Wagner --- docs/configuration-files.rst | 4 ++- docs/user-management.rst | 58 ++++++++++++++++++++++++++++++++++++ www/OnlineHelpInfo.js | 8 +++++ 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/docs/configuration-files.rst b/docs/configuration-files.rst index 12a4a54e..0540d0b1 100644 --- a/docs/configuration-files.rst +++ b/docs/configuration-files.rst @@ -36,8 +36,10 @@ Options .. include:: config/datastore/config.rst +.. _domains.cfg: + ``domains.cfg`` -~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~ File Format ^^^^^^^^^^^ diff --git a/docs/user-management.rst b/docs/user-management.rst index b739121d..faaf183d 100644 --- a/docs/user-management.rst +++ b/docs/user-management.rst @@ -25,6 +25,8 @@ choose the realm when you add a new user. Possible realms are: :openid: OpenID Connect server. Users can authenticate against an external OpenID Connect server. +:ldap: LDAP server. Users can authenticate against external LDAP servers. + After installation, there is a single user, ``root@pam``, which corresponds to the Unix superuser. User configuration information is stored in the file ``/etc/proxmox-backup/user.cfg``. You can use the ``proxmox-backup-manager`` @@ -560,3 +562,59 @@ Two-factor authentication is only implemented for the web-interface. You should use :ref:`API Tokens ` for all other use cases, especially non-interactive ones (for example, adding a Proxmox Backup Server to Proxmox VE as a storage). + + +Authentication Realms +--------------------- + +.. _user_realms_ldap: + +LDAP +~~~~ + +Proxmox Backup Server can utilize external LDAP servers for user authentication. To achieve this, +a realm of the type ``ldap`` has to be configured. + +In LDAP, users are uniquely identified +by their domain (``dn``). For instance, in the following LDIF dataset, the user ``user1`` has the +unique domain ``uid=user1,ou=People,dc=ldap-test,dc=com``: + + +.. code-block:: console + + # user1 of People at ldap-test.com + dn: uid=user1,ou=People,dc=ldap-test,dc=com + objectClass: top + objectClass: person + objectClass: organizationalPerson + objectClass: inetOrgPerson + uid: user1 + cn: Test User 1 + sn: Testers + description: This is the first test user. + +In in similar manner, Proxmox Backup Server uses user identifiers (``userid``) to uniquely identify users. +Thus, it is necessary to establish a mapping between PBS's ``userid`` and LDAP's ``dn``. +This mapping is established by the ``user-attr`` configuration parameter - it contains the name of the +LDAP attribute containing a valid PBS user identifier. + +For the example above, setting ``user-attr`` to ``uid`` will have the effect that the user ``user1@`` will be mapped to the LDAP entity +``uid=user1,ou=People,dc=ldap-test,dc=com``. On user login, PBS will perform a `subtree search` under the configured Base Domain (``base-dn``) to query +the user's ``dn``. Once the ``dn`` is known, an LDAP bind operation is performed to authenticate the user against the LDAP server. + +As not all LDAP servers allow `anonymous` search operations, it is possible to configure a bind domain (``bind-dn``) and a bind password (``password``). +If set, PBS will bind to the LDAP server using these credentials before performing any search operations. + +A full list of all configuration parameters can be found at :ref:`domains.cfg`. + +.. note:: In order to allow a particular user to authenticate using the LDAP server, you must also add them as a user of that realm in Proxmox Backup Server. + This can be carried out automatically with syncing. + +User Synchronization in LDAP realms +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is possible to automatically sync users for LDAP-based realms, rather than having to add them to Proxmox VE manually. +Synchronization options can be set in the LDAP realm configuration dialog window in the GUI and via the ``proxmox-backup-manager ldap create/update`` command. +User synchronization can started in the GUI at Configuration > Access Control > Realms by selecting a realm and pressing the `Sync` button. In the sync dialog, +some of the default options set in the realm configuration can be overridden. Alternatively, +user synchronization can also be started via the ``proxmox-backup-manager ldap sync`` command. \ No newline at end of file diff --git a/www/OnlineHelpInfo.js b/www/OnlineHelpInfo.js index ac455450..704038b4 100644 --- a/www/OnlineHelpInfo.js +++ b/www/OnlineHelpInfo.js @@ -31,6 +31,10 @@ const proxmoxOnlineHelpInfo = { "link": "/docs/calendarevents.html#calendar-event-scheduling", "title": "Calendar Events" }, + "domains-cfg": { + "link": "/docs/configuration-files.html#domains-cfg", + "title": "``domains.cfg``" + }, "pxar-format": { "link": "/docs/file-formats.html#pxar-format", "title": "Proxmox File Archive Format (``.pxar``)" @@ -334,5 +338,9 @@ const proxmoxOnlineHelpInfo = { "user-tfa-setup-recovery-keys": { "link": "/docs/user-management.html#user-tfa-setup-recovery-keys", "title": "Recovery Keys" + }, + "user-realms-ldap": { + "link": "/docs/user-management.html#user-realms-ldap", + "title": "LDAP" } }; -- 2.30.2