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 6C6361FF0E1 for ; Mon, 13 Jul 2026 13:21:00 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3C0E721357; Mon, 13 Jul 2026 13:21:00 +0200 (CEST) Message-ID: <3311a75e-3468-4211-b43b-8c04778755d6@proxmox.com> Date: Mon, 13 Jul 2026 13:20:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH datacenter-manager 2/2] server: api: pve firewall: remove 'remote' parameter from overall status To: Lukas Wagner , pdm-devel@lists.proxmox.com References: <20260708133630.1807997-1-d.csapak@proxmox.com> <20260708133630.1807997-3-d.csapak@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783941630390 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.401 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: FDI4NMGRKEK5SHPKP4LBXTJETP7S4SNQ X-Message-ID-Hash: FDI4NMGRKEK5SHPKP4LBXTJETP7S4SNQ 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/13/26 1:09 PM, Lukas Wagner wrote: > 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.? probably yes, but this has to be done inside the api call the way it's currently configured it'll fail for any non root@pam user regardless of permission... > >> >> 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}"], PRIV_RESOURCE_AUDIT, false), >> + permission: &Permission::Privilege(&["resource"], PRIV_RESOURCE_AUDIT, false), >> }, >> )] >> /// Get firewall status of all PVE remotes. >