From: Dominik Csapak <d.csapak@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>, pdm-devel@lists.proxmox.com
Subject: Re: [PATCH datacenter-manager 2/2] server: api: pve firewall: remove 'remote' parameter from overall status
Date: Mon, 13 Jul 2026 13:20:45 +0200 [thread overview]
Message-ID: <3311a75e-3468-4211-b43b-8c04778755d6@proxmox.com> (raw)
In-Reply-To: <DJXEB2SD80TX.3526YNT61XJIV@proxmox.com>
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 <d.csapak@proxmox.com>
>> ---
>> 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.
>
prev parent reply other threads:[~2026-07-13 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 13:36 [RFC/PATCH datacenter-manager/proxmox 0/2] check privilege paths during compilation Dominik Csapak
2026-07-08 13:36 ` [RFC PATCH proxmox 1/2] router: compile time check privilege path parameters for existence Dominik Csapak
2026-07-08 13:36 ` [PATCH datacenter-manager 2/2] server: api: pve firewall: remove 'remote' parameter from overall status Dominik Csapak
2026-07-13 11:10 ` Lukas Wagner
2026-07-13 11:20 ` Dominik Csapak [this message]
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=3311a75e-3468-4211-b43b-8c04778755d6@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=l.wagner@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.