docs(SEC-40): correct the hub-mapping comment now that AlarmsHub uses its own policy

This commit is contained in:
Joseph Doherty
2026-08-20 09:30:45 -04:00
parent 2ef7b93761
commit 8257a0333e
@@ -104,9 +104,11 @@ public static class DashboardEndpointRouteBuilderExtensions
.AllowAnonymous() .AllowAnonymous()
.WithName("DashboardAccessDenied"); .WithName("DashboardAccessDenied");
// SignalR hubs. Authorization is enforced on the hub class via // SignalR hubs. Authorization is enforced on the hub class via [Authorize], so both
// [Authorize(Policy = HubClientsPolicy)] so the policy accepts either // policies below accept either the dashboard cookie or a HubToken bearer. Snapshot and
// the dashboard cookie or a HubToken bearer. // events use HubClientsPolicy; AlarmsHub uses AlarmsPolicy, which additionally requires a
// real authenticated dashboard role (SEC-40) — see AlarmsHub for why the alarm feed is
// gated harder than the session-scoped ones.
endpoints.MapHub<DashboardSnapshotHub>("/hubs/snapshot"); endpoints.MapHub<DashboardSnapshotHub>("/hubs/snapshot");
endpoints.MapHub<AlarmsHub>("/hubs/alarms"); endpoints.MapHub<AlarmsHub>("/hubs/alarms");
endpoints.MapHub<EventsHub>("/hubs/events"); endpoints.MapHub<EventsHub>("/hubs/events");