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 3321B1FF0DF for ; Fri, 28 Aug 2026 17:30:37 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BA12921563; Fri, 28 Aug 2026 17:30:36 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Aug 2026 17:30:33 +0200 Message-Id: Subject: Re: [PATCH datacenter-manager] api: remote: add permission check for metric collection RRD endpoint From: "Thomas Ellmenreich" To: "Shan Shaji" , X-Mailer: aerc 0.20.0 References: <20260828152532.214782-1-s.shaji@proxmox.com> In-Reply-To: <20260828152532.214782-1-s.shaji@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787931023952 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.490 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: 66NIHHL3IDRZZ7RGYRDKJOWQ3BFOP7IF X-Message-ID-Hash: 66NIHHL3IDRZZ7RGYRDKJOWQ3BFOP7IF 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: Thanks for sending in this patch as well! Reviewed-by: Thomas Ellmenreich Tested-by Thomas Ellmenreich On Fri Aug 28, 2026 at 5:25 PM CEST, Shan Shaji wrote: > 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.r= s > 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_R= ESOURCE_AUDIT, false), > + description: "Requires `Resource.Audit` privilege on `/resource/= {id}`." > + }, > )] > /// Read metric collection RRD data. > fn get_per_remote_rrd_data(