Skip to content

feat(wildbloomd): let the ICE issuer hand out STUN alone - #91

Merged
TheCryptoDonkey merged 2 commits into
mainfrom
feat/wildbloomd-stun-only
Oct 23, 2026
Merged

TheCryptoDonkey merged 2 commits into
mainfrom
feat/wildbloomd-stun-only

Conversation

@TheCryptoDonkey

Copy link
Copy Markdown
Member

Stacked on #89 (protocol and vectors); independent of the Drop change (#90). Optional: nothing here is needed for the owner's node on stall, because Drop falls back to its built-in STUN server on a 404.

Flag, environment variable and route names are unchanged. --turn-issuer --turn-url stun:stun.example.net:3478, with no secret, is now the STUN-only mode.

  • grants/turn.rs: ice_urls no longer requires a TURN URL. New has_turn_url. TurnIssuer holds an Option<TurnSecret>; for STUN alone mint returns {credential:"", urls, username:""} and mints no label; for TURN it is the same HMAC as before, and a TURN issuer built without its secret answers 503 rather than signing nothing. The log line is now "issued a pair of ICE configurations" (still no URLs or usernames).
  • main.rs: the secret is required if and only if a configured URL is turn:/turns:. A --turn-secret-file or WILDBLOOM_TURN_SECRET given with STUN-only URLs stops start-up with "a TURN secret was given but no --turn-url is turn: or turns:". The start-up rule is a small function with its own test. The secret variable is still removed from child environments in every mode (the existing tests cover it). Help text updated.
  • README flag help and docs/THREAT-MODEL.md updated; the operator notes and self-hoster recipes are in the protocol PR (docs: let direct send run on STUN alone (protocol and vectors) #89).

Tests: cargo test -p wildbloomd (163 plus the integration targets pass), cargo clippy --workspace --all-targets -- -D warnings, cargo fmt --all -- --check. New tests: a STUN-only issuer returns exact canonical bytes with empty credentials and needs no secret; a TURN issuer with no secret is 503; ice_urls accepts STUN alone; start-up accepts STUN-only with no secret, refuses STUN-only with a secret file or the variable, refuses TURN with no secret. One unrelated test, replicas::tests::interrupted_temporary_write_keeps_the_committed_revision_and_unknown_state_refuses, failed once in a parallel run and passed on rerun; I did not investigate it.

Not done: renaming the flags or route to ICE names (left as an open question in the spec), any redeploy.

Base automatically changed from feat/direct-stun-protocol to main October 23, 2026 21:36
--turn-issuer with only stun: URLs now needs no secret: it returns the URLs
with an empty username and credential and mints nothing. The secret is
required if and only if a --turn-url is turn: or turns:, and one given with
STUN alone stops start-up. Flag, env and route names are unchanged.
@TheCryptoDonkey
TheCryptoDonkey force-pushed the feat/wildbloomd-stun-only branch from 08df6bd to d1c94de Compare October 23, 2026 21:36
@TheCryptoDonkey
TheCryptoDonkey merged commit b1a7b10 into main Oct 23, 2026
8 checks passed
@TheCryptoDonkey
TheCryptoDonkey deleted the feat/wildbloomd-stun-only branch October 23, 2026 22:01
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