Problem
agent_mesh_bus::Inbound carries a signed envelope and an opaque reply route, but no evidence identifying the peer authenticated by the transport session. The iroh implementation currently performs signer/session matching inside accept_conn, while the shared Transport seam does not require that check and the in-memory transport can bypass envelope verification entirely.
That makes transport authentication an implementation convention instead of a bus invariant: a new transport can hand an unbound envelope to the inbox, which then reconstructs RequestContext from the envelope alone.
Found while reviewing #77; this is the transport-neutral residual from #75.
Scope
- Add a typed authenticated-peer/delivery-provenance value to
Inbound.
- Verify every envelope at the common bus admission boundary before replay state or dispatch is mutated.
- For direct delivery, require the envelope signer and user root to match the transport-authenticated peer and the local same-user policy.
- Represent missing binding explicitly and reject it by default.
- Keep carrier identity distinct from original signer identity so a future authorized-relay design cannot accidentally conflate them.
- Move the iroh session check into this shared contract; make the in-memory transport produce honest peer evidence rather than bypassing verification.
Acceptance
Related
Out of scope
Problem
agent_mesh_bus::Inboundcarries a signed envelope and an opaque reply route, but no evidence identifying the peer authenticated by the transport session. The iroh implementation currently performs signer/session matching insideaccept_conn, while the sharedTransportseam does not require that check and the in-memory transport can bypass envelope verification entirely.That makes transport authentication an implementation convention instead of a bus invariant: a new transport can hand an unbound envelope to the inbox, which then reconstructs
RequestContextfrom the envelope alone.Found while reviewing #77; this is the transport-neutral residual from #75.
Scope
Inbound.Acceptance
Transport::recvcannot deliver a direct envelope without typed authenticated-peer evidence.conn.remote_id()to the handshake certificate and supplies the resulting peer evidence to the bus.SignedEnvelope::verify().just checkandjust cov-cipass.Related
Out of scope