← Back to reference

Agent Privilege Model

Capabilities Required

CapabilityWhyHow acquired
CAP_PERFMONperf_event_opensystemd
CAP_SYS_ADMINPin BPF maps to /sys/fs/bpfsystemd (often implicit)
CAP_SYS_PTRACE/proc/<pid>/iosystemd
CAP_NET_ADMINNIC sysfs, qdiscsystemd
CAP_DAC_READ_SEARCHRead /proc/kmsg restrictedsystemd

Capabilities NOT Required

  • CAP_DAC_OVERRIDE — we shouldn't bypass file ACLs.
  • CAP_CHOWN — never need to chown.
  • CAP_FOWNER — no business writing to foreign users.
  • CAP_KILL — we never send SIGKILL to other users' processes.
  • CAP_NET_RAW — no raw sockets; we use reqwest + rpc.

Filesystem Privileges

PathModeReason
/var/lib/denpex/agent/0750 denpex:denpexState
/var/log/denpex/0755 root:denpexLogs (write)
/sys/fs/bpf/denpex/0755 root:denpexBPF pinned objects
/run/denpex/0755 root:denpexRuntime sockets

Network Privileges

  • Outbound HTTPS (denpex-collector): only to the CP via TLS 1.3.
  • Outbound DCGM: only via UDS or localhost TCP.
  • Inbound listening: 127.0.0.1:9091/metrics (Prometheus scrape) and 127.0.0.1:9092/healthz.

Process Privileges

  • The agent runs as user denpex-agent.
  • The agent has a separate group for talking to NVML/DCGM groups.
  • All subprocesses inherit no_new_privs.
  • No setuid binaries are shipped.

Failure Modes

FailureDetectionRecovery
NVML DSO missingnvml_unavailable eventDisable GPU polling
DCGM DSO missingdcgm_unavailable eventFall back to NVML
BPF program load failsebpf_load_failed eventFall back to /proc
KMS unreachablekms_unreachable eventCache-only mode