Expand description
hyprstream-side wiring for the federation admission gate (#137, M3).
The transport-agnostic two-stage gate lives in
hyprstream_rpc::admission (lower crate, no PolicyService client). This
module supplies the stage-1 origin-admission decision over the real
PolicyService, reusing the existing unified federation trust gate
(federation:register:<origin>) — the same origin-scoped Casbin resource
checked by CIMD client registration and
crate::auth::federation::FederationKeyResolver.
It also exposes a constructor that assembles a ready-to-use
hyprstream_rpc::admission::FederationAdmissionGate from a PolicyClient
plus a did:web resolver, so the live accept/identity path can construct the
gate once and call admit(...) per inbound federated peer.
§Integration seam (honest status)
Stage 1 here is wired against the real PolicyService. Stage 2’s live peer
key is the documented seam: in this architecture the peer’s authenticated
identity is the verified Ed25519 envelope signer key (cnf), surfaced at
the application/service layer (hyprstream_rpc::service’s
verify_claims/resolve_key_subject), not at the transport accept loop
(the QUIC/WebTransport server has only carrier metadata, which is never an
application signer proof). The accept
loop also does not know the peer’s origin (it arrives in the app-layer
JWT/envelope), so even stage 1 cannot run at the raw accept loop. The gate is
therefore designed to be invoked from the service layer once that path passes
the verified signer key + issuer origin in; see the integration TODO below.
Structs§
- Policy
Origin Admission - Stage-1 origin admission over
PolicyServicefederation:register.
Functions§
- build_
federation_ admission_ gate - Assemble a ready-to-use
FederationAdmissionGateover the realPolicyService(stage 1) and a nativedid:webresolver (stage 2).