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 A31CC1FF13A for ; Wed, 29 Apr 2026 11:29:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CDB4E2526D; Wed, 29 Apr 2026 11:29:34 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 1/2] client: allow skipping signature check on previous manifest fetching Date: Wed, 29 Apr 2026 11:28:46 +0200 Message-ID: <20260429092847.381438-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260429092847.381438-1-c.ebner@proxmox.com> References: <20260429092847.381438-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: 1777454842313 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.071 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: GH7XU5XSODFGQQUGJKALECXYVRY7CSUI X-Message-ID-Hash: GH7XU5XSODFGQQUGJKALECXYVRY7CSUI 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 implementation by a method which allows to download the previous manifest from a PBS instance, but skipping the signature check even if the backup writer has a crypt_config set. This will be used to silence misleading logs during encrypting push sync jobs, by performing the signature check on the call site instead. Signed-off-by: Christian Ebner --- pbs-client/src/backup_writer.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs index 49aff3fdd..ea990dbde 100644 --- a/pbs-client/src/backup_writer.rs +++ b/pbs-client/src/backup_writer.rs @@ -735,8 +735,25 @@ impl BackupWriter { }) } - /// Download backup manifest (index.json) of last backup + /// Download backup manifest (index.json) of last backup, checking the signature + /// using the backup writer's crypt config. pub async fn download_previous_manifest(&self) -> Result { + let manifest = self + .download_previous_manifest_without_signature_check() + .await?; + + if let Some(crypt_config) = &self.crypt_config { + manifest.check_signature(crypt_config)?; + } + + Ok(manifest) + } + + /// Download backup manifest (index.json) of last backup, but skips the signature + /// check by not providing the crypt config when parsing the manifest from the data blob. + pub async fn download_previous_manifest_without_signature_check( + &self, + ) -> Result { let mut raw_data = Vec::with_capacity(64 * 1024); let param = json!({ "archive-name": MANIFEST_BLOB_NAME.to_string() }); @@ -748,8 +765,7 @@ impl BackupWriter { // no expected digest available let data = blob.decode(self.crypt_config.as_ref().map(Arc::as_ref), None)?; - let manifest = - BackupManifest::from_data(&data[..], self.crypt_config.as_ref().map(Arc::as_ref))?; + let manifest = BackupManifest::from_data(&data[..], None)?; Ok(manifest) } -- 2.47.3