From: Christian Ebner <c.ebner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager v2 2/3] server: pbs-client: check and fallback to PBS v3 ticket compat mode
Date: Tue, 30 Sep 2025 10:02:06 +0200 [thread overview]
Message-ID: <20250930080207.111162-6-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250930080207.111162-1-c.ebner@proxmox.com>
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@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
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-09-30 8:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 8:02 [pdm-devel] [PATCH datacenter-manager/proxmox v2 0/6] pbs client: fix PBS version 3 login ticket parsing compatibility Christian Ebner
2025-09-30 8:02 ` [pdm-devel] [PATCH proxmox v2 1/3] proxmox-login: refactor PVE TFA compat mode Christian Ebner
2025-09-30 8:02 ` [pdm-devel] [PATCH proxmox v2 2/3] proxmox-client: adapt to new compat mode introduced for proxmox-login Christian Ebner
2025-09-30 8:02 ` [pdm-devel] [PATCH proxmox v2 3/3] proxmox-login: add compat mode to fallback to PBS3 ticket parsing Christian Ebner
2025-09-30 8:02 ` [pdm-devel] [PATCH datacenter-manager v2 1/3] server: adapt to proxmox-client compat mode changes Christian Ebner
2025-09-30 8:02 ` Christian Ebner [this message]
2025-09-30 8:02 ` [pdm-devel] [PATCH datacenter-manager v2 3/3] Revert "ui: add wizard: note that login currently only works for PBS 4" Christian Ebner
2025-09-30 11:49 ` [pdm-devel] [PATCH datacenter-manager/proxmox v2 0/6] pbs client: fix PBS version 3 login ticket parsing compatibility Wolfgang Bumiller
2025-09-30 12:19 ` Christian Ebner
2025-09-30 12:34 ` Thomas Lamprecht
2025-10-01 9:33 ` Shannon Sterz
2025-10-01 13:12 ` Shannon Sterz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250930080207.111162-6-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.