docs(audit-2026-06-11/tier3): fix stale principal_cache field comment

Review nit — the field is a non-optional Arc; the old '`None` for tests'
note was stale. Clarify that it's one shared Arc so revocation-side
evictions are visible to the middleware's resolve-side lookup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-06-12 19:08:31 +02:00
parent ec4a2aa24a
commit dd9d828018

View File

@@ -138,8 +138,9 @@ pub struct AuthState {
pub keys: Arc<dyn ApiKeyRepository>,
pub ttl: Duration,
/// F-P-009 — shared cache of resolved Principals. Constructed once
/// at startup; cloned cheaply into every router state. `None` for
/// tests / harnesses that don't wire it.
/// at startup and cloned (same `Arc`) into every router state that
/// resolves or revokes credentials, so a revocation-side eviction is
/// visible to this resolve-side lookup.
pub principal_cache: Arc<PrincipalCache>,
/// Audit 2026-06-11 H-B1 — per-`(remote_ip, username)` + per-`username`
/// burst limiter for `/auth/login`. Cheap to clone (Arc).