all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: David Riley <d.riley@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-access-control v5 1/6] rpcenv: allow SDN.Allocate to modify permissions on SDN paths
Date: Thu, 19 Nov 2026 13:47:26 +0100	[thread overview]
Message-ID: <20261119124731.84602-2-d.riley@proxmox.com> (raw)
In-Reply-To: <20261119124731.84602-1-d.riley@proxmox.com>

Modifying permissions on a path requires 'Permissions.Modify' on that
path. Some paths accept another privilege on the same path instead:
'VM.Allocate' on /vms/<vmid>, 'Datastore.Allocate' on
/storage/<storage> and 'Pool.Allocate' on /pool/<pool>. SDN paths had
no such exception, so adding a VNet to a resource pool required
'Permissions.Modify', even for users who are allowed to allocate the
VNet itself.

Accept 'SDN.Allocate' on paths below /sdn in the same way. Besides the
pool API, this also affects the ACL API. Users with 'SDN.Allocate' on
an SDN path, for example via the PVESDNAdmin role, can now view and
change the ACLs on that path. As with the other exceptions, they can
only grant or revoke a subset of their own privileges, and only grant
with propagation where their own privileges propagate.

Fixes: edc2154 ("fix #7294: acl: pool: add SDN VNets as pool members")
Signed-off-by: David Riley <d.riley@proxmox.com>
---
 src/PVE/RPCEnvironment.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/RPCEnvironment.pm b/src/PVE/RPCEnvironment.pm
index 0104b1e..09854d5 100644
--- a/src/PVE/RPCEnvironment.pm
+++ b/src/PVE/RPCEnvironment.pm
@@ -524,6 +524,8 @@ sub check_perm_modify {
         push @$testperms, 'Datastore.Allocate';
     } elsif ($path =~ m|^/vms/.+$|) {
         push @$testperms, 'VM.Allocate';
+    } elsif ($path =~ m|^/sdn/.+$|) {
+        push @$testperms, 'SDN.Allocate';
     } elsif ($path =~ m|^/pool/.+$|) {
         push @$testperms, 'Pool.Allocate';
     }
-- 
2.47.3





  reply	other threads:[~2026-11-19 12:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 12:47 [PATCH access-control/manager/network v5 0/6] fix #7294: pool: add SDN VNets as pool members David Riley
2026-11-19 12:47 ` David Riley [this message]
2026-11-19 12:47 ` [PATCH pve-network v5 2/6] sdn: register api formats for zones and vnets David Riley
2026-11-19 12:47 ` [PATCH pve-network v5 3/6] fix #7294: sdn: vnet: update pool members on VNet zone change and deletion David Riley
2026-11-19 12:47 ` [PATCH pve-manager v5 4/6] ui: replace var with let to match style guide for variable declaration David Riley
2026-11-19 12:47 ` [PATCH pve-manager v5 5/6] fix #7294: api: pool: add SDN VNets as pool members David Riley
2026-11-19 12:47 ` [PATCH pve-manager v5 6/6] fix #7294: ui: " David Riley

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=20261119124731.84602-2-d.riley@proxmox.com \
    --to=d.riley@proxmox.com \
    --cc=pve-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal