From a6f37b8e9dede594364eb3593dec4415c5b071e7 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Sun, 19 Jul 2026 16:46:32 +0000 Subject: [PATCH] fix(auth): add permission claims to ApiKeyAuthenticationHandler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API keys used by camera agents were missing 'permission' claims, causing all endpoints with ApiKey + Policy to return 403 Forbidden (e.g. POST /api/events, POST /api/events/{id}/snapshot). Add CameraWrite, CameraRead, CameraLive, SiteRead, EventRead permissions — matching agent operational needs (Supervisor minus Person permissions). --- .../Security/ApiKeyAuthenticationHandler.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Heimdall.Infrastructure/Security/ApiKeyAuthenticationHandler.cs b/src/Heimdall.Infrastructure/Security/ApiKeyAuthenticationHandler.cs index 0ddd204..9ba5ea7 100644 --- a/src/Heimdall.Infrastructure/Security/ApiKeyAuthenticationHandler.cs +++ b/src/Heimdall.Infrastructure/Security/ApiKeyAuthenticationHandler.cs @@ -71,6 +71,15 @@ public class ApiKeyAuthenticationHandler : AuthenticationHandler