From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 5EEF61FF0E5 for ; Wed, 29 Jul 2026 11:08:58 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2EABA21490; Wed, 29 Jul 2026 11:08:58 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v3 4/5] client: allow skipping signature check on previous manifest fetching Date: Wed, 29 Jul 2026 11:07:36 +0200 Message-ID: <20260729090737.135385-5-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260729090737.135385-1-c.ebner@proxmox.com> References: <20260729090737.135385-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: 1785316034731 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.145 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: LIM7SPLRZSHENFAY46VKOJUSSYNA6LOH X-Message-ID-Hash: LIM7SPLRZSHENFAY46VKOJUSSYNA6LOH 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: Extends the BackupWriter method to download the previous manifest from a PBS instance, by a flag which allows skipping the signature check even if the backup writer has a crypt_config set. Silences misleading logs during encrypting push sync jobs. Signed-off-by: Christian Ebner Reviewed-by: Robert Obkircher --- pbs-client/src/backup_writer.rs | 19 ++++++++++++++----- proxmox-backup-client/src/main.rs | 2 +- src/server/push.rs | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs index f1003f800..269d74c56 100644 --- a/pbs-client/src/backup_writer.rs +++ b/pbs-client/src/backup_writer.rs @@ -737,8 +737,14 @@ impl BackupWriter { }) } - /// Download backup manifest (index.json) of last backup - pub async fn download_previous_manifest(&self) -> Result { + /// Download backup manifest (index.json) of last backup. + /// + /// If `check_signature` is set and the writer stores a crypt config, + /// also checks the manifest's signature. + pub async fn download_previous_manifest( + &self, + check_signature: bool, + ) -> Result { let mut raw_data = Vec::with_capacity(64 * 1024); let param = json!({ "archive-name": MANIFEST_BLOB_NAME.to_string() }); @@ -750,10 +756,13 @@ impl BackupWriter { // manifest blobs are never encrypted and no expected digest available let data = blob.decode(None, None)?; - let manifest = - BackupManifest::from_data(&data[..], self.crypt_config.as_ref().map(Arc::as_ref))?; + let crypt_config = if check_signature { + self.crypt_config.as_ref().map(Arc::as_ref) + } else { + None + }; - Ok(manifest) + BackupManifest::from_data(&data[..], crypt_config) } // We have no `self` here for `h2` and `verbose`, the only other arg "common" with 1 other diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs index 5c52b7917..ecee8b4e3 100644 --- a/proxmox-backup-client/src/main.rs +++ b/proxmox-backup-client/src/main.rs @@ -1069,7 +1069,7 @@ async fn create_backup( }; let previous_manifest = if download_previous_manifest { - match client.download_previous_manifest().await { + match client.download_previous_manifest(true).await { Ok(previous_manifest) => { match previous_manifest.check_fingerprint(crypt_config.as_ref().map(Arc::as_ref)) { Ok(()) => Some(Arc::new(previous_manifest)), diff --git a/src/server/push.rs b/src/server/push.rs index 7b3cac4cd..17fa605a4 100644 --- a/src/server/push.rs +++ b/src/server/push.rs @@ -1131,7 +1131,7 @@ pub(crate) async fn push_snapshot( let mut previous_manifest = None; // Use manifest of previous snapshots in group on target for chunk upload deduplication if fetch_previous_manifest { - match backup_writer.download_previous_manifest().await { + match backup_writer.download_previous_manifest(false).await { Ok(manifest) => previous_manifest = Some(Arc::new(manifest)), Err(err) => { log_sender -- 2.47.3