Expand description
Iroh streaming plane — moq-lite (moql ALPN) protocol handler.
Part of Epic #131 Phase 3 (#134). This module ships the wire layer for the streaming plane:
IrohMoqProtocolHandlerplugs intocrate::transport::iroh_substrateunder themoqlALPN, wrapping each accepted irohConnectionas aweb_transport_iroh::Sessionand handing it tomoq_net::Server, which spawns the moq-lite session machinery internally.- One shared
OriginShared(anOriginProducer+ matchingOriginConsumer) is held by the handler; the same origin is used for in-process publishing (callers obtain it viaIrohMoqProtocolHandler::origin_producerand create broadcasts directly) and for external subscribers — per spike #94’s finding,moq_net::Serverdoes exactly this.
Trust model: §7.5 unchanged. On the wire, subscribers learn the
DH-derived (unguessable) Track path out-of-band via authenticated RPC
(a signed StreamInfo), and the per-Frame payload carries the
chained-HMAC envelope. CDN-portability per §10.x of the Federated Agentic
Namespaces doc. Admission: without an authenticator the carrier is
unauthenticated and the accept path refuses anonymous peers; with a
crate::transport::moql_admission::MoqlAdmissionAuthenticator installed
(#1027), each connection must first prove an accepted current
Ed25519 + ML-DSA-65 identity inside the carrier, and is then served only
its own tenant’s scope.
What this module does NOT do: refactor StreamService or
EventService to use this. That lands in Phase 3 part 2+ along with
the §7.5 chained-HMAC tokenstream port.
Structs§
- Iroh
MoqProtocol Handler - iroh
ProtocolHandlerfor themoqlALPN. Each accepted connection is wrapped as aweb_transport_iroh::Sessionand handed tomoq_net::Server::accept, which performs the moq handshake and spawns the session machinery. - MoqAuthz
Config - #276 authorization config for a moq accept path: an optional subscribe authorizer and an optional peer→tenant resolver for per-tenant announce scoping. Absence of fresh application/session proof is always fail-closed; these hooks cannot turn an anonymous carrier into an authenticated peer.
- Origin
Shared - Shared
Originclone-pair held by the handler.
Traits§
- Ingress
Authorizer - Trusted decision for granting an admitted peer ingress into a tenant’s shared origin. Admission proves the peer identity and tenant only; it does not imply that the peer may publish. The default is therefore deny.
Type Aliases§
- Peer
Tenant Resolver - Resolves the tenant for an independently authenticated application peer.
Carrier NodeId is never passed here. Without a fresh-proof seam (#1027)
the iroh accept path refuses before invoking this resolver; with a
MoqlAdmissionAuthenticatorinstalled, the resolver runs inside the admission exchange over the verified subject. - Shared
Ingress Authorizer - Shareable ingress authorization hook supplied by the owning service policy.