From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 2D67D1FF0DF for ; Fri, 28 Aug 2026 11:56:38 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 95393214AA; Fri, 28 Aug 2026 11:56:37 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Aug 2026 11:56:30 +0200 Message-Id: From: "Thomas Ellmenreich" To: "Shan Shaji" , Subject: Re: [PATCH datacenter-manager] api: nodes: add explicit permission check for RRD data points endpoint X-Mailer: aerc 0.20.0 References: <20260827130033.131872-1-s.shaji@proxmox.com> In-Reply-To: <20260827130033.131872-1-s.shaji@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787910981273 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.524 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: FE4V3UDEREIACXLQTAQNBGR6YMJKU4YH X-Message-ID-Hash: FE4V3UDEREIACXLQTAQNBGR6YMJKU4YH X-MailFrom: t.ellmenreich@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: I tested it before and after, and it works as expected. Since the commit message didn't make it clear which exact rrddata path it i= s, I tried a few others and noticed that this one also returns 'permission check failed': `/api2/json/remotes/remote/cluster1/rrddata` In any case: Reviewed-by: Thomas Ellmenreich Tested-by Thomas Ellmenreich On Thu Aug 27, 2026 at 3:00 PM CEST, Shan Shaji wrote: > 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/rrdda= ta.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}; > =20 > -use proxmox_router::{Router, http_bail}; > +use proxmox_router::{Permission, Router, http_bail}; > use proxmox_schema::api; > =20 > -use pdm_api_types::NODE_SCHEMA; > use pdm_api_types::rrddata::PdmNodeDatapoint; > +use pdm_api_types::{NODE_SCHEMA, PRIV_SYS_AUDIT}; > =20 > use crate::api::rrd_common::{self, DataPoint}; > =20 > @@ -97,7 +97,11 @@ impl DataPoint for PdmNodeDatapoint { > items: { > type: PdmNodeDatapoint, > } > - } > + }, > + access: { > + permission: &Permission::Privilege(&["system", "status"], PRIV_S= YS_AUDIT, false), > + description: "Requires `Sys.Audit` privilege on `/system/status`= ." > + }, > )] > /// Read RRD data for this PDM node. > fn get_node_rrddata(