Skip to content

row 132 (piece 2): connector datagram driver presents the keying-material item (accepting side) - #819

Merged
4 commits merged into
predevfrom
lane-webrtc-terminate
Oct 14, 2026
Merged

4 commits merged into
predevfrom
lane-webrtc-terminate

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

Status row 132, piece 2 of 6: the connector's datagram driver. It presents the keying-material item to the webrtc framer (#795). This PR covers the accepting side; the dialling side and its candidate admission come next, in their own PR, under the ARCHITECT's row-132 ruling.

What

busbar-core-connector::datagram::DatagramFraming drives one association's datagram framer over the host's dtls engine (dtls::Association). Every call carries the datagram lane (abi::transport::datagram).

  • Paths. Paths are host numbers. Each one is told to the framer once, and only for an address the secure layer knows: a verified check came from it, or core's own probe proved it. A spoofed source stops at the host.
  • Terms. The rendezvous terms (role, both ends' check credentials, the far end's fingerprint) build the association.
  • Keying material. The exported material crosses exactly once, on a call whose lane says verified = 1. It is then dropped, which zeroes it.
  • Routes. A clear route is sent only where may_send_clear allows. A secured route is sealed to the bound path. Anything else is dropped and counted.
  • Path requests. A path request binds only a proven path.
  • Judging. Every answer is judged by check_datagram before any byte of it is used.
  • No I/O. The driver is sans-IO: the port stays the caller's, so no_io_outside_hostio is unaffected.

Small additions:

  • dtls: SrtpProfile::code (RFC 7714 registry code), Association::peer_verified, Association::knows.
  • framer: Buffers sink/take and ready are now pub(crate).

Why

  • BUSBAR-1.6.0.md l.758-766: the framer "gets the exported SRTP keys through the keying-material item", "application data waits for peer verification", and ICE migration "rebinds only on a verified round-trip check (a spoof is a RED)".
  • Decision 1.5.5 MCP: plane boundary and the core route-auth table #45: busbar terminates WebRTC.

RED-able tests

In crates/busbar-core-connector/src/tests/datagram_tests.rs, a scripted framer runs over a real ring DTLS handshake against a second dtls engine.

  1. The item crosses once, verified, and equals the far end's own exporter output. Plaintext flows both ways over the bound path. RED: presenting the item on every call, or never, fails the exact-once count.
  2. A source that sent no verified check never reaches the framer, and no path is told for it. RED arm: the honest check crosses, with its path told.
  3. A rebind to a path that never answered core's probe is not applied, and a clear non-answer route to it is dropped and counted. RED arm: once the path answers the probe, the move applies.
  4. An answer that breaks the lane (a zero-length route) is a FAULT, and nothing is sent.
  5. Nothing on the port is the association's before the rendezvous.

Ledgers

None touched. There is no new crate edge and no new third-party dependency (Cargo.lock is unchanged).

…, verified, and sends only where the secure layer allows (row 132, piece 2)

One association's datagram framer, driven over the host's dtls engine with the datagram lane on
every call (THE DESIGN l.758-766): paths are host numbers, told once, and only for addresses
the secure layer knows; the rendezvous terms build the association; the exported keying
material crosses once, on a call whose lane says the far end is verified, and is dropped
(zeroed) after it; clear routes leave only where may_send_clear allows, secured routes are
sealed to the bound path; path requests bind only a proven path. Every answer is judged by
check_datagram before a byte of it is used. Sans-IO; accepting side.

Tests (src/tests/datagram_tests.rs), a scripted framer over a real ring handshake against a
second dtls engine: the item crosses exactly once, verified, equal to the far end's export
(RED: never or every call); a spoofed source never reaches the framer (RED: the honest check
does); a rebind to an unanswered path is not applied and a non-answer clear route is dropped
(RED: answered, it binds); a lane-breaking answer is a FAULT.
…send_answered, not a fn named route (kind-isolation:control-path)

The connector is a control surface and runs no data-path step; the driver's helper only sends a
datagram the framer answered where the secure layer allows it, so it no longer borrows the
kernel's route-step name.
…read; the scripted framer's seen path is asserted (row 132, #827 compile red)

E0502 at datagram.rs:872 on #827, the first compile of this code: fingerprint.copy_from_slice(
span(..)?.get(..fingerprint.len())) borrowed the array mutably for the call while its length was
read in the argument. The stated span is read and bounded first, then copied.

The datagram tests' Seen.path was recorded and never read (dead_code under clippy -D warnings).
The honest-check arm of a_source_that_sent_no_verified_check_never_reaches_the_framer now asserts
the check crossed on the clear lane under path 1, the number it was told under.
MattJackson added a commit that referenced this pull request Oct 14, 2026
MattJackson added a commit that referenced this pull request Oct 14, 2026
…g_self_convention, row 132)

clippy -D warnings refused `fn into_host(&mut self, ..)`: an into_* method takes self by value. The
rig hands one datagram to the host; deliver says so and names no conversion. Every call site is
renamed; nothing else changes.
MattJackson added a commit that referenced this pull request Oct 14, 2026
…brtc-terminate-port; the port tests' calls renamed with it
@MattJackson MattJackson closed this pull request by merging all changes into predev in 4f9a948 Oct 14, 2026
@MattJackson
MattJackson deleted the lane-webrtc-terminate branch October 14, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant