From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id CB6CA1FF136 for ; Mon, 20 Apr 2026 18:16:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 86B268AEA; Mon, 20 Apr 2026 18:16:24 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v4 30/30] docs: add section describing server side encryption for sync jobs Date: Mon, 20 Apr 2026 18:15:33 +0200 Message-ID: <20260420161533.1055484-31-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260420161533.1055484-1-c.ebner@proxmox.com> References: <20260420161533.1055484-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1776701669975 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 Message-ID-Hash: F7VPH6VY7GDTAFL4ZRBWW6BNFFESMTUN X-Message-ID-Hash: F7VPH6VY7GDTAFL4ZRBWW6BNFFESMTUN X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Especially clarify the terminology of active encryption key, associated keys, key archiving and requirements for removal. Signed-off-by: Christian Ebner --- docs/managing-remotes.rst | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/docs/managing-remotes.rst b/docs/managing-remotes.rst index 95ac4823c..39df18744 100644 --- a/docs/managing-remotes.rst +++ b/docs/managing-remotes.rst @@ -302,3 +302,57 @@ The following permissions are required for a sync job in push direction: .. note:: Sync jobs in push direction require namespace support on the remote Proxmox Backup Server instance (minimum version 2.2). + +Server Side Encryption/Decryption During Sync +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Sync job in push direction allow to encrypt unencrypted snapshots when syncing +to a less trusted remote Proxmox Backup Server instance. For this, a server side +encryption key can be assigned to the sync job. This key will then be used to +encrypt the contents before pushing them to the remote, analogous to performing +a backup with an encryption key. Already encrypted snapshots are not re-encrypted +but rather pushed unmodified. Snapshots containing only partially encrypted +contents are skipped for security reasons. + +Therefore, sync jobs using the ``encrypted-only`` flag will never use the +``active-encryption-key`` when pushing snapshots, since only already encrypted +snapshots are being synced. + +On the other hand, sync jobs in pull direction allow to assign a number of +associated keys, which will be used to decrypt snapshot contents if the key +fingerprint of one of the listed keys matches the one used to encrypt the +backup snapshot. The active encryption key has no effect for sync jobs in pull +direction and should not be set. + +In order to configure the sync job, as well as for sync job owner/local user +to access the keys during sync, ``System.Modify`` permissions are required on +the ``/system/encryption-keys/{key}`` path. + +.. note:: Encryption key handling comes with a few risks, especially with key + rotation. Therefore, only active keys can be used to encrypt new snapshot + contents during push sync. If an active encryption key is changed, the key is + kept back as associated key on the sync job, in order to protect it from + accidental removal. Further, any encryption key can be archived, rendering it + no longer usable for encryption, only to decrypt pre-existing contents. Any + encryption key usable for sync jobs must therefore be marked as archived and + disassociated from any sync job still associated to it, before being able to + remove it. + +The following command can be used to assign the active encryption key for a sync +job. + +.. code-block:: console + + # proxmox-backup-manager sync-job update pbs2-push --active-encryption-key key0 + +Setting the associated keys will drop any key not present in the given key list, +with exception of the previously assigned active encryption key, if it is updated +as well. The previously assigned encryption key (in the example above ``key0``) +will always be pushed to the list of associated keys on rotation. For example, +since ``key0`` is currently the active encryption key, below command would assign +``key1`` as the new active encryption key and result in ``key0,key2,key3`` as +associated keys for the sync job. + +.. code-block:: console + + # proxmox-backup-manager sync-job update pbs2-push --active-encryption-key key1 --associated-key key2 --associated-key key3 -- 2.47.3