From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id E4C051FF0C0 for ; Wed, 18 Nov 2026 12:58:17 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 502DF216F8; Wed, 18 Nov 2026 12:58:16 +0100 (CET) From: David Riley To: pve-devel@lists.proxmox.com Subject: [PATCH pve-access-control v4 1/6] rpcenv: add SDN.Allocate to modify permission check Date: Wed, 18 Nov 2026 12:57:52 +0100 Message-ID: <20261118115757.94919-2-d.riley@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261118115757.94919-1-d.riley@proxmox.com> References: <20261118115757.94919-1-d.riley@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795003091734 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.600 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_MED -2.3 Sender listed at https://www.dnswl.org/, medium 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: SLRBKIWOYFJLRJQLINEG7ZOFWQWIKD6T X-Message-ID-Hash: SLRBKIWOYFJLRJQLINEG7ZOFWQWIKD6T X-MailFrom: d.riley@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 VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Map the entire SDN namespace ('/sdn/*') to the 'SDN.Allocate' privilege when verifying resource modification rights. Previously, the access control helper lacked a dedicated mapping for SDN resources. This caused checks to fall back to strictly requiring global admin rights ('Permissions.Modify'), which prevented downstream API endpoints from properly verifying allocation rights for standard users trying to manage SDN resources. Fixes: edc2154 ("fix #7294: acl: pool: add SDN VNets as pool members") Signed-off-by: David Riley --- 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