feat(iroh): defer NAT traversal until admission#4
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Added a fail-closed per-dial bootstrap authority fix in 3ca9903 and 0daf035. The regression stages two concurrent dials to the same EndpointID with disjoint direct destinations before either QUIC Initial is sent. Before the fix, both Initials reached the second destination. Each resolve now returns a unique mapped-address token whose immutable authority contains only that dial’s canonical explicit paths. Initial dispatch looks up and carries that authority into the remote actor, filters its shared path set per attempt, rejects endpoint mismatches, and unregisters the token when the dial completes or is dropped. Verification at 0daf035:
Dependency pins: Iroh 0daf035, noq d8534ca45d2f00a3db06914b9f265b8f53d35d03. |
Stacked on #3.
Adds an opt-in endpoint gate that keeps NAT traversal, candidate exchange, probing, cached direct-path reuse, and direct migration disabled until the application authorizes the exact live connection. Relay and explicitly supplied initial direct paths remain available for the admission protocol.
Authorization fails closed if the endpoint actor, remote actor, or exact connection is gone. Repeated authorization is idempotent. Multiple connections to one EndpointID maintain independent authorization and retry state.
Pins noq, noq-proto, and noq-udp to the security-fixed commit from manaflow-ai/noq#1 so passive local-IP migration is also gated on both client and server.
Verification:
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Defers NAT traversal until the app authorizes each exact connection, while keeping relay or explicitly supplied initial direct paths available for admission. Also scopes bootstrap authority per dial so Initials only go to that attempt’s allowed addresses.
New Features
Builder::defer_nat_traversal_until_authorized(true)to opt in.Connection::authorize_nat_traversal(); idempotent; fails closed withNatTraversalAuthorizationErrorif the endpoint, remote actor, or connection is gone.EndpointIdnever share bootstrap paths.Dependencies
noq,noq-proto, andnoq-udpto the security-fixed git revision so passive local-IP handshake migration is authorized on both client and server.quick-xmlto0.41.0.plistto1.10.0.Written for commit 6b2c35b. Summary will update on new commits.