Repository navigation
fix(host): allow concurrent authenticated Broker sessions per identity - #80
Merged
Merged
Conversation
Guard asynchronous registration and request forwarding against identity races, disconnects, and Host shutdown. Add regression coverage for spoofing, concurrency, and cancellation.
Track remote Broker sessions separately under one logical ID, bind request ingress and route frames to each session, and exercise concurrent mTLS behavior. Interim checkpoint before expanding certificate policy and cancellation lifecycle per review.
…sions Allow separately authenticated Broker certificates for one ID, reject valid registration differences, prevent cancelled VWS opens from forwarding, and tear down only the session whose admitted control stream closes. Update docs and bounded regressions.
Record Phase 2b validation, review outcome, focused commit SHA, and protected-main manual merge requirement.
Record rebased phase commits, the new main base, and post-rebase validation without changing Broker behavior.
MichalCz
force-pushed
the
fix/79-concurrent-broker-sessions
branch
from
September 29, 2026 09:54
6ea4ab0 to
4818abb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Allow independent, simultaneous authenticated Broker HTTP/2 sessions to share one logical Broker ID without an arbitrary session or certificate-count cap. Each connection must present a TLS-verified client certificate and independently pass registration authorization; the Broker role and normalized registration must match. Different trusted certificates may coexist under that ID, including across certificate rotation. Guest, local-peer, and federation uniqueness remains unchanged.
Each Broker session receives its own route updates and owns its HTTP/WebSocket requests. Closing one admitted Broker control stream tears down only its physical session; a failed duplicate registration cannot detach an admitted one. A cancelled Broker WebSocket open no longer forwards after asynchronous authorization or falls back to another route. No wire-protocol changes.
Closes #79.
Verification
npm test: bounded partition 1, 387/387 passed; partition 2, 173 passed, 4 skipped; zero failures with the existing 1 MiB per-test memory guard.npm run lintandgit diff --check: passed.Evidence limit
Cancellation after a destination is acquired has an explicit cleanup guard in the Host, but there is no separate deterministic acquisition-race test. The test exercises cancellation during deferred route authorization and verifies no fallback and sibling usability. Raw changed-line coverage was not measured.