Implement authentication types in auth.rs: AuthContext (Clone, 4 fields), Identity (Clone, PartialEq), AuthToken, IdentityProvider trait (resolve_from_ fingerprint + resolve_from_token), ConfigIdentityProvider (reads from ArcSwap<DynamicConfig> on every call — hot-reloadable). Fingerprint resolution via authorized_fingerprints HashSet, token resolution via alk_ prefix + SHA-256 hash + expiry check. Also implemented minimal config.rs types (DynamicConfig, AuthPolicy, ApiKeyEntry, RateLimitConfig, ConfigReloadHandle) needed by auth — aligned with architecture docs for the parallel core/config task to extend. 27 unit tests pass; clippy clean. Refs: docs/architecture/crates/core/auth.md Implements: ADR-004, ADR-011
122 KiB
122 KiB