From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 3B0EA1FF165 for ; Thu, 17 Jul 2025 15:36:42 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5EF0F3AF93; Thu, 17 Jul 2025 15:37:20 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Thu, 17 Jul 2025 15:36:53 +0200 Message-ID: <20250717133711.84715-6-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250717133711.84715-1-f.ebner@proxmox.com> References: <20250717133711.84715-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server 5/9] api: monitor: require Sys.Audit or Sys.Modify privilege X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" The name VM.Monitor is ambiguous and made it hard to guess what the privilege is for. The privilege was only used here and for guest agent operations, where dedicated privileges were introduced. Since only the 'info' and 'help' commands were usable without an additional Sys.Modify privilege, the VM.Monitor privilege seems superfluous and was dropped in pve-access-control. As the information accessible via 'info' is very low-level and often related to the QEMU process on the system, requiring Sys.Audit seems natural. Signed-off-by: Fiona Ebner --- src/PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm index 82cdc742..09d4411b 100644 --- a/src/PVE/API2/Qemu.pm +++ b/src/PVE/API2/Qemu.pm @@ -5584,7 +5584,7 @@ __PACKAGE__->register_method({ description => "Execute QEMU monitor commands.", permissions => { description => PVE::API2::Qemu::HMPPerms::generate_description(), - check => ['perm', '/vms/{vmid}', ['VM.Monitor']], + check => ['perm', '/vms/{vmid}', ['Sys.Audit', 'Sys.Modify'], any => 1], }, parameters => { additionalProperties => 0, -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel