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 758081FF0E1 for ; Mon, 13 Jul 2026 13:10:41 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A0CF52133F; Mon, 13 Jul 2026 13:10:40 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 13 Jul 2026 13:10:02 +0200 Message-Id: From: "Lukas Wagner" To: "Dominik Csapak" , Subject: Re: [PATCH datacenter-manager 2/2] server: api: pve firewall: remove 'remote' parameter from overall status X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260708133630.1807997-1-d.csapak@proxmox.com> <20260708133630.1807997-3-d.csapak@proxmox.com> In-Reply-To: <20260708133630.1807997-3-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783940987621 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.260 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) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: IRRBRZQF3XCMECE5SATSSE3WNBJJ6ZUO X-Message-ID-Hash: IRRBRZQF3XCMECE5SATSSE3WNBJJ6ZUO X-MailFrom: l.wagner@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 Wed Jul 8, 2026 at 3:36 PM CEST, Dominik Csapak wrote: > this is the api call for the overall status, not a specific remote, so > there isn't a 'remote' parameter to limit us to. > > Simply require audit on '/resource' to indicate we need resource > permissions. Maybe I'm missing something, but wouldn't it make more sense to filter the results based on which resources the user has access to, instead of this all-or-nothing approach? So just the usual in-code checks we have in place for resources, tasks, etc.? > > This fixes a 403 error on the firewall panel for non root@pam users. > > Signed-off-by: Dominik Csapak > --- > server/src/api/pve/firewall.rs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/server/src/api/pve/firewall.rs b/server/src/api/pve/firewall= .rs > index 5a6a209e..6c18ba10 100644 > --- a/server/src/api/pve/firewall.rs > +++ b/server/src/api/pve/firewall.rs > @@ -242,7 +242,7 @@ async fn fetch_node_firewall_status( > items: { type: RemoteFirewallStatus }, > }, > access: { > - permission: &Permission::Privilege(&["resource", "{remote}"], PR= IV_RESOURCE_AUDIT, false), > + permission: &Permission::Privilege(&["resource"], PRIV_RESOURCE_= AUDIT, false), > }, > )] > /// Get firewall status of all PVE remotes.