public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager] api: remote: add permission check for metric collection RRD endpoint
@ 2026-08-28 15:25 Shan Shaji
  2026-08-28 15:30 ` Thomas Ellmenreich
  0 siblings, 1 reply; 2+ messages in thread
From: Shan Shaji @ 2026-08-28 15:25 UTC (permalink / raw)
  To: pdm-devel; +Cc: Thomas Ellmenreich

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 <t.ellmenreich@proxmox.com>
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-28 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28 15:25 [PATCH datacenter-manager] api: remote: add permission check for metric collection RRD endpoint Shan Shaji
2026-08-28 15:30 ` Thomas Ellmenreich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal