[pdm-devel] [PATCH datacenter-manager v2 2/3] server: pbs-client: check and fallback to PBS v3 ticket compat mode

Christian Ebner c.ebner at proxmox.com
Tue Sep 30 10:02:06 CEST 2025


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 <c.ebner at proxmox.com>
---
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





More information about the pdm-devel mailing list