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 03D9D1FF0E1 for ; Thu, 27 Aug 2026 15:01:02 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C4DF821408; Thu, 27 Aug 2026 15:01:00 +0200 (CEST) From: Shan Shaji To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager] api: nodes: add explicit permission check for RRD data points endpoint Date: Thu, 27 Aug 2026 15:00:33 +0200 Message-ID: <20260827130033.131872-1-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787835648520 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.334 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) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes 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: OZUCAYCXQKLQJN63FGPLRAZJPSKDBRT7 X-Message-ID-Hash: OZUCAYCXQKLQJN63FGPLRAZJPSKDBRT7 X-MailFrom: s.shaji@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: The /rrddata endpoint did not have the access parameter defined inside the API macro. This resulted in a "403: permission check failed" error in the UI even though the user was assigned the Administrator role on the / ACL path. This issue was raised in the forum [0]. Fix this by adding the explicit permission check. - [0] https://forum.proxmox.com/threads/185992/ Signed-off-by: Shan Shaji --- server/src/api/nodes/rrddata.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/src/api/nodes/rrddata.rs b/server/src/api/nodes/rrddata.rs index b6e55b48..0bb8b374 100644 --- a/server/src/api/nodes/rrddata.rs +++ b/server/src/api/nodes/rrddata.rs @@ -1,11 +1,11 @@ use anyhow::Error; use proxmox_rrd_api_types::{RrdMode, RrdTimeframe}; -use proxmox_router::{Router, http_bail}; +use proxmox_router::{Permission, Router, http_bail}; use proxmox_schema::api; -use pdm_api_types::NODE_SCHEMA; use pdm_api_types::rrddata::PdmNodeDatapoint; +use pdm_api_types::{NODE_SCHEMA, PRIV_SYS_AUDIT}; use crate::api::rrd_common::{self, DataPoint}; @@ -97,7 +97,11 @@ impl DataPoint for PdmNodeDatapoint { items: { type: PdmNodeDatapoint, } - } + }, + access: { + permission: &Permission::Privilege(&["system", "status"], PRIV_SYS_AUDIT, false), + description: "Requires `Sys.Audit` privilege on `/system/status`." + }, )] /// Read RRD data for this PDM node. fn get_node_rrddata( -- 2.47.3