1.0 KiB
Conclusion: B3 Identity architecture is correctly implemented in identity.py
Summary
The fail-closed identity module in aios_v2r1/identity.py has been written with full B3 support:
-
Dual credential model: Both
IdentityClaims(standard ingress) andBridgeIngressClaims(with receipt-read credential) are implemented as frozen dataclasses. -
Enforced/Disabled mode:
IngressAuthenticator.authenticate()andauthenticate_bridge()both respectIngressMode.ENFORCEDvsIngressMode.DISABLED— signatures are either verified or parsed-only. -
RuntimeIdentity for internal trust: Separate dataclass with no receipt field, for downstream tenant-context signing after resolver verification.
-
Type safety: All claim fields validated via
require_ident(). Principal creation gated by_PROVENANCEsentinel — onlyAuthenticatedPrincipal._verified()can produce instances. -
No persistence or session coupling: The module is pure identity binding, separate from tenant routing and session management.