joule-moq-room and the public room (L5c-2): grants with proof of possession, the lifecycle by the room's clock, room authorities at the relay, and two relay fixes #334
Loading…
Reference in a new issue
No description provided.
Delete branch "joule-moq/room-live"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
L5c-2: the public room. Builds on #325 (joule-moq/ingest, with #327 and #324), merged into main at
58093c5d; this branch has origin/main (046575ea) merged in.What it adds
joule-moq-room(new;joule-code/joule-code-rs/crates/joule-moq-room, a workspace of its own with its own lock file, because it builds on wai-rs, whose serde_json features would otherwise reach every crate of the joule-code workspace). A room service that holds a room's authority and clock keys and:POST /grant {principal, role}signs a short-livedWRG1grant (a publisher's, or a viewer's) for a key the page made. Grants are bounded per client address, overall, and per room. The grant alone is useless: the relay honours it only beside the key's proof of possession (live-rooms §10.5);joinandpublishwhen the track appears andleavewhen the relay ends it. Records go on the clock's events track in live-events §8.1's MSF form;GET /roomgives the signed descriptor, the composition descriptor and the publishers' grants;t0, same keys) once the last publisher has left.Its keys file must have mode 0600, and the service refuses it otherwise.
Keyshas noDebug.joule-moq-relay:[[auth.authorities]]: honours every grant an authority's key signs, beside its proof and within its window, mapped as live-rooms §10.2 maps it.joule-moq's newGrantHeadreads the grant under the authority's key.*field in a rule's or a door rule's prefix matches any field.trust_fieldholds each[room, principal, kind]namespace to the key it names.limits.max_session_ms,max_ingress_kbps(withingress_burst_ms) andmax_resident_mb(the binary exits with 70).unlimitedexempts a session from those limits; the room's clock uses it.EXPIRED_AUTH_TOKENwhen its authority grant expires.Two relay fixes, found on the deployed room:
tests/fetch_in_flight.rs.joule-moq-web:wai-live-web'sRoom.setGrants.grantProofBy/clientSetupWithProof, so a test can present a proof by another key.serviceend-to-end scenario. With--base <origin>(and--betweento pace runs) it runs against a deployment.CI: a new
joule-moq-roomworkflow.joule-moq-web's browser workflow now also runs on room-service changes.Tests (build host, aarch64-apple-darwin, at
dfb24a1a)cargo test --locked -p joule-moq-relay --all-targetspasses, including:tests/room_authority.rs: authority grants with and without proof, a forged authority, the door's trust field, the session limit, an unlimited session, grant expiry, and the ingress limit;tests/fetch_in_flight.rs;The two integration tests passed 5 runs out of 5.
joule-moq --lib(84),joule-moq-web(8), andjoule-moq-room(cargo test --locked: 4 unit tests +tests/room_service.rs) all pass.e2e/run.sh(compose, webtransport, websocket, goaway, service) in the host's Chrome: 107 of 107 checks pass.Deployment
Live at https://wai.transaction.science/room/. Two LaunchAgents run on prod, built from
dfb24a1a:science.transaction.wai-room-relayon 127.0.0.1:9681, WebSocket only, no UDP;science.transaction.wai-roomon 127.0.0.1:9682.They sit behind Caddy's
@waiblock (handle /moq,handle_path /room-api/*) and the existing tunnel; the configuration and plists are in site-ops (deploy/wai-room/).Production e2e: from the build host, in Chrome with fake media, against the live page and relay. 4 of 4 runs, 120 of 120 checks, after 3 of 3 runs (90 checks) in the batch before. Each run checks:
pop_missing), or with another key's proof (pop_wrong_key), is refused the session;🤖 Generated with Claude Code
joule-moq-room and the public room (L5c-2): grants with proof of possession, the lifecycle authored by the room's clock, room authorities at the relayto joule-moq-room and the public room (L5c-2): grants with proof of possession, the lifecycle by the room's clock, room authorities at the relay, and two relay fixes