feat(sessions): record OwnerKeyId on session creation

Add a nullable string? OwnerKeyId property to GatewaySession that captures
the API key identifier (KeyId) of the authenticated caller that opened the
session. Wire it through ISessionManager.OpenSessionAsync → SessionManager
→ GatewaySession constructor. The gRPC service passes identityAccessor
.Current?.KeyId; internal callers (GatewayAlarmMonitor, DashboardLiveDataService)
pass null. Covers the positive and null cases with two new TDD-first tests.
This commit is contained in:
Joseph Doherty
2026-06-15 12:24:29 -04:00
parent 00c849e63b
commit f5479f3ca3
16 changed files with 88 additions and 24 deletions
@@ -164,6 +164,7 @@ public sealed class GatewaySessionTests
pipeName: "mxaccess-gateway-1-session-test",
nonce: "nonce",
clientIdentity: "client-1",
ownerKeyId: null,
clientSessionName: "test-session",
clientCorrelationId: "client-correlation-1",
commandTimeout: TimeSpan.FromSeconds(5),