Expand description
Method-dispatched IdentityResolver — the real Did → IdentityKeys binding (#579).
This is the single, non-mirror implementation of the canonical
crate::identity::IdentityResolver contract. It replaces the fixture /
test-double resolvers that stood in for it while the #549 perimeter gateway
and #137 admission gate were built against the interface.
§Division of labor
The resolver owns verification + assurance derivation; it does not own
object labelling, the KeyedPqTrustStore.bind mesh anchor (#894), or any
perimeter policy — those consumers are generic over the trait and unchanged.
§Method dispatch
resolve_identity_keys branches on
the DID method:
did:web— resolve the DID document and extract its verification methods. An Ed25519 identity VM (for example#mesh) is the classical anchor; its explicitly named ML-DSA-65 companion (#mesh-pq, multicodec0x1211) makes that candidate [Assurance::PqHybrid]. Other candidates remain [Assurance::Classical]. No Ed25519 VM ⇒ nothing to bind ⇒Err(fail-closed).did:key— a single Ed25519 key decoded from the DID string itself; no fetch. A single classical key can never be hybrid, so the honest ceiling is [Assurance::Classical].did:at9p— the self-certifying hybrid-PQC capsule identity (#879/#880 D2, #894). The resolver delegates to an injectedAt9pCapsuleResolverthat runs the A4 GATE pipeline (canon→hash→sig, #884) over the capsule and returns its content-verified subject keys; a verified capsule yields [Assurance::PqHybrid]. With no capsule resolver configured the arm fails closed (production wiring of the mainline locator is Track C, #890).- any other method —
Err(fail-closed).
§Fail-closed
Per the IdentityResolver contract, every inability to establish key
material — an unknown method, a fetch failure, a malformed document, a
did:web with no Ed25519 VM — returns Err. A resolver never returns a
default-Unverified Ok.
§Sync trait over an async fetch
The contract is synchronous and enrollment happens off the auth path
(once, at session establishment), so did:web document retrieval is abstracted
behind a synchronous DidDocumentProvider. This keeps the decode +
assurance-derivation core pure and testable with an injected fixture (no live
network), mirroring the injected-fetcher pattern in crate::did_web. The
async→sync bridge to the live crate::did_web::HttpDidDocFetcher is a
wiring concern for the accept-path integration (there is no production
construction site of the perimeter gateway today).
Structs§
- Method
Dispatch Resolver - The real, method-dispatched
IdentityResolver(#579). - Verified
At9p Key - One content-verified atomic hybrid subject key: an Ed25519 identity key and the ML-DSA-65 key bound to it in the same capsule entry (#1188 / #1183).
- Verified
At9p Keys - The content-verified subject key set of a
did:at9pcapsule, re-expressed in the rpc-local key types so this crate need not depend onhyprstream-pds(pds depends on rpc; the dependency does not reverse).
Traits§
- At9p
Capsule Resolver - Verifies a
did:at9pcapsule and yields its content-verified subject keys. - DidDocument
Provider - A synchronous DID-document provider for the did:web arm.