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 1AD161FF0DF for ; Fri, 28 Aug 2026 17:25:55 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8DD7721545; Fri, 28 Aug 2026 17:25:54 +0200 (CEST) From: Shan Shaji To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager] api: remote: add permission check for metric collection RRD endpoint Date: Fri, 28 Aug 2026 17:25:32 +0200 Message-ID: <20260828152532.214782-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: 1787930741059 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.671 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) KAM_MAILER 2 Automated Mailer Tag Left in Email 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: Y56HMTWQSJFWHCZXKO56I76BKOFNNFXJ X-Message-ID-Hash: Y56HMTWQSJFWHCZXKO56I76BKOFNNFXJ 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 CC: Thomas Ellmenreich 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 /remote/{id}/rrddata endpoint didn't had the access parameter defined inside the API macro. This resulted in a "403: permission check failed" error even though the user was assigned the Administrator role on the / ACL path. Reported-by: Thomas Ellmenreich Signed-off-by: Shan Shaji --- server/src/api/remotes/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/api/remotes/mod.rs b/server/src/api/remotes/mod.rs index 5c9fdccf..d6f512f6 100644 --- a/server/src/api/remotes/mod.rs +++ b/server/src/api/remotes/mod.rs @@ -625,7 +625,11 @@ impl DataPoint for RemoteDatapoint { items: { type: RemoteDatapoint, } - } + }, + access: { + permission: &Permission::Privilege(&["resource", "{id}"], PRIV_RESOURCE_AUDIT, false), + description: "Requires `Resource.Audit` privilege on `/resource/{id}`." + }, )] /// Read metric collection RRD data. fn get_per_remote_rrd_data( -- 2.47.3