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 C49711FF16F for ; Tue, 30 Sep 2025 10:02:48 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 04137E9E; Tue, 30 Sep 2025 10:02:54 +0200 (CEST) From: Christian Ebner To: pdm-devel@lists.proxmox.com Date: Tue, 30 Sep 2025 10:02:06 +0200 Message-ID: <20250930080207.111162-6-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20250930080207.111162-1-c.ebner@proxmox.com> References: <20250930080207.111162-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1759219318976 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.107 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 POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_2 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_4 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager v2 2/3] server: pbs-client: check and fallback to PBS v3 ticket compat mode X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Since the proxmox-login ticket parsing assumes the ticket to be http-only if it contains the ticket-info field, but the PBS v3 API does return that in any case, signal the client to fallback to the old authentication flow. This is currently only used during adding of a new remote, namely to scan the remote and login for PBS API token creation/setting of its ACLs. Signed-off-by: Christian Ebner --- changes since version 1: - set the compat mode on the client, not the login, as the client will propagate it to the login not vice versa. server/src/connection.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/connection.rs b/server/src/connection.rs index 5530812..980ef01 100644 --- a/server/src/connection.rs +++ b/server/src/connection.rs @@ -178,7 +178,14 @@ async fn connect_or_login( if remote.authid.is_token() { connect(remote, target_endpoint) } else { - let (client, _info) = prepare_connect_client(remote, target_endpoint)?; + let (mut client, _info) = prepare_connect_client(remote, target_endpoint)?; + + //FIXME: drop once PBS3 is EOL + if remote.ty == RemoteType::Pbs { + // Forces both, PBSv4 and PBSv3 to use the same PBS3 compat login ticket parsing + client.set_compatibility(CompatMode::Pbs3Ticket); + } + match client .login(proxmox_login::Login::new( client.api_url().to_string(), -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel