feat: add secure agent enrollment

This commit is contained in:
lussierj committed 2026-08-26 21:31:09 +00:00
1 parent 82309db79a
commit d9f0da694b
26 files changed
+2942 -76

No files matched your search

+4
View File
@@ -699,8 +699,10 @@ def required_page_permission(path: str) -> str:
def machine_agent_request(path: str) -> bool:
exact = {
"/api/agent/enroll",
"/api/agent/checkin",
"/api/agent/config",
"/api/agent/known-miners",
"/api/agent/miner-snapshots",
"/api/agent/pool-snapshots",
"/api/agent/commands/pending",
@@ -779,6 +781,8 @@ def required_api_permission(method: str, path: str) -> str | None:
return "components.create" if method == "POST" else "components.read"
if path == "/api/agent-zones":
return "agents.view" if method == "GET" else "agents.manage"
if path == "/api/agent-enrollments":
return "agents.view" if method == "GET" else "agents.manage"
if repair_parts_request(path):
return "repairs.read" if method == "GET" else "repairs.parts.manage"
if path.startswith("/api/admin/"):