all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager] api: nodes: add explicit permission check for RRD data points endpoint
@ 2026-08-27 13:00 Shan Shaji
  0 siblings, 0 replies; only message in thread
From: Shan Shaji @ 2026-08-27 13:00 UTC (permalink / raw)
  To: pdm-devel

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 <s.shaji@proxmox.com>
---
 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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-27 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 13:00 [PATCH datacenter-manager] api: nodes: add explicit permission check for RRD data points endpoint Shan Shaji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal