Files
AutopilotMonitor/src
Oliver Kieselbach 8fed1da22f feat(backend): a confirmed Graph access loss is refused with 403 TenantGraphAccessLost before the validator chain (D-445)
When Microsoft Entra keeps refusing a tenant's app token (GraphAccessRejectionConfirmedAt
set and a validation switched on), every validator would only spend the chain budget on
token requests that cannot succeed. The agent gate now refuses right after the hardware
check with 403 and the envelope code TenantGraphAccessLost, marker
DeviceValidation=AccessLost, without asking Entra. RefusesByConfiguration mirrors the gate,
so a stale cached copy is checked against the stored row before it refuses. The
maintenance recheck and the portal token paths stay the only probes of Entra.

- TenantConfiguration.IsGraphAccessConfirmedLost: one predicate for the gate and the
  portal notice
- SecurityValidationResult.Code carries the envelope code
- the distress endpoint stores a 403 for allowed hardware from such a tenant as the new
  backend-only DistressErrorType.TenantGraphAccessLost, never as DeviceNotRegistered;
  agents may not report that value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:57:21 -08:00
..