From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id BBDDB1FF13A for ; Wed, 08 Jul 2026 13:24:39 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E0B1121446; Wed, 08 Jul 2026 13:24:38 +0200 (CEST) Message-ID: Date: Wed, 8 Jul 2026 13:24:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH datacenter-manager] fix #7795: remote: guest shell: fix privilege path To: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= , pdm-devel@lists.proxmox.com References: <20260708104025.1161611-1-f.gruenbichler@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260708104025.1161611-1-f.gruenbichler@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783509835443 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.094 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) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 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 Message-ID-Hash: K7YZ43IXOLD2SUMY2YXUVCIPKJ3R2GUO X-Message-ID-Hash: K7YZ43IXOLD2SUMY2YXUVCIPKJ3R2GUO X-MailFrom: d.csapak@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 Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 7/8/26 12:40 PM, Fabian Grünbichler wrote: > the wrong path was copied over from the node shell, and since there is no > "node" parameter here, calls as non-root will fail with 403.. > > Fixes: 525c8c49 "server: add termproxy and vncwebsocket calls for qemu guests" > > Signed-off-by: Fabian Grünbichler > --- > 403 if the API schema is actually invalid might be something to catch > lower in the stack as well? i guess the substitution fails during privilege check in proxmox-router and that triggers a 403 higher up in the stack? since that must be const, maybe there can be a compile time check that the parameters must exist here? > > server/src/api/pve/lxc.rs | 4 ++-- > server/src/api/pve/qemu.rs | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/server/src/api/pve/lxc.rs b/server/src/api/pve/lxc.rs > index 6183f62d..ca32eb84 100644 > --- a/server/src/api/pve/lxc.rs > +++ b/server/src/api/pve/lxc.rs > @@ -807,9 +807,9 @@ pub const API_METHOD_LXC_WEBSOCKET: ApiMethod = ApiMethod::new( > ), > ) > .access( > - Some("The user needs Sys.Console on /resource/{remote}/node/{node}."), > + Some("The user needs Sys.Console on /resource/{remote}/guest/{vmid}."), > &Permission::Privilege( > - &["resource", "{remote}", "node", "{node}"], > + &["resource", "{remote}", "guest", "{vmid}"], > PRIV_SYS_CONSOLE, > false, > ), > diff --git a/server/src/api/pve/qemu.rs b/server/src/api/pve/qemu.rs > index 65de6389..5d01e69e 100644 > --- a/server/src/api/pve/qemu.rs > +++ b/server/src/api/pve/qemu.rs > @@ -895,9 +895,9 @@ pub const API_METHOD_QEMU_WEBSOCKET: ApiMethod = ApiMethod::new( > ), > ) > .access( > - Some("The user needs Sys.Console on /resource/{remote}/node/{node}."), > + Some("The user needs Sys.Console on /resource/{remote}/guest/{vmid}."), > &Permission::Privilege( > - &["resource", "{remote}", "node", "{node}"], > + &["resource", "{remote}", "guest", "{vmid}"], > PRIV_SYS_CONSOLE, > false, > ),