Skip to content

test(browser_egress): pin caller-supplied identity isolation - #23

Merged
senamakel merged 20 commits into
epic/7328-security-busfrom
tinycomputer-111-untrusted-identity-epic
Oct 24, 2026
Merged

senamakel merged 20 commits into
epic/7328-security-busfrom
tinycomputer-111-untrusted-identity-epic

Conversation

@senamakel

@senamakel senamakel commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a real Chromium module-level acceptance test proving BrowserOpenSession caller options cannot replace the host-configured egress policy ID or generation. The live authority callback must receive the host-selected identity and consume the approved socket under that same scope.

This is supplemental TinyComputer browser-egress acceptance for OpenHuman#7328. Canonical TinyComputer tinyhumansai#111 was closed by PR tinyhumansai#165; this PR does not claim direct TCP/UDP/QUIC or process-level confinement.

The branch merges latest canonical TinyComputer main at 4c52cd3f5aeefc4835c55b1324cc016d02bf1b8b to take the Tokio 1.53.3 security fix, and includes the resulting lockfile update at e79a71ac. The DNS-rebinding live fixture now uses an inline favicon so Chromium's implicit favicon request cannot race with the deliberate post-rebind navigation in its connection counter.

Validation

  • RUST_TEST_THREADS=1 TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test --locked -p tinycomputer --features static-link,test-connector --lib live_chromium_module_ignores_caller_supplied_egress_identity -- --nocapture — passed (1/1) after the main merge
  • RUST_TEST_THREADS=1 TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test --locked -p tinycomputer --features static-link,test-connector --lib live_chromium_module_never_dials_a_rebound_private_socket -- --nocapture — passed (1/1) with the favicon fixture correction
  • cargo deny check advisories — passed; only existing yanked-package warnings
  • cargo fmt --all -- --check and git diff --check — passed

Refs tinyhumansai/openhuman#7328

senamakel and others added 16 commits October 23, 2026 08:38
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The feature test script now runs the browser egress live tests with the
egress environment flag enabled, matching the existing live browser test
invocation so that this suite is exercised alongside the others.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Clone the locked address list before the assertion so the mutex guard is
released prior to the comparison, avoiding a held lock across the assert.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Replace the unnecessary format! call with a to_string conversion on the
static HTML string in the live worker fetch test, since the literal
contains no interpolation.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live egress tests previously bound the denied listener to a second
loopback address on the same port as the allowed listener, which is not
portable across environments. Each denied listener now binds to its own
ephemeral port and the tests assert the ports differ, so the fixtures
exercise host-based denial rather than address-based separation.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live egress tests now pass the denied listener's full socket address
to the browser fixture host instead of only its port, so the denied host
is explicitly authorized and the tests exercise the intended rejection
path.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The DNS rebinding test now clones the observation list instead of holding the
mutex guard across the assertions, so the lock is released before the proxy
call that follows.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The monolithic live_tests.rs file was replaced by a live_tests directory
containing separate modules for navigation, denied requests, and DNS
rebinding scenarios. This keeps each live Chromium egress test group
readable and makes it easier to extend coverage without growing a single
oversized file.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The DNS rebinding test now binds the rebound listener to the same port as the
allowed listener but on the IPv6 loopback address, so the two sockets share a
port while remaining distinct endpoints. The assertions were updated to check
that the ports match and the addresses differ, which better exercises the
rebinding scenario.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformat the rebound listener bind call in the DNS rebinding live test to
satisfy the line length limit. No behaviour change.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
fix(deps): bump tokio to 1.53.3 for RUSTSEC-2026-0386
…er-egress-acceptance

test(browser-egress): cover controlled DNS rebinding
…ored

Add a live test asserting that a browser session opened with caller-supplied
policy_id and generation still authorizes and consumes sockets under the
host-provided module scope. The fixture helper now accepts optional caller
options so the open-session payload can be overridden per test.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel and others added 2 commits October 24, 2026 04:17
Update the lockfile for the tinybus 0.1.9 and tinytools 0.6.0 releases, which swap the zip dependency for rawzip and add icu_casemap and unicode-normalization for case folding and text normalization.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel and others added 2 commits October 24, 2026 04:39
The allowed fixture page now declares an empty data-URI favicon so the
browser does not issue an implicit /favicon.ico request that could
interfere with the connection accounting in the rebinding test.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformat the allowed fixture HTML byte literal in the DNS rebinding
live test so it fits within the line width limit. No behaviour change.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit 33587b7 into epic/7328-security-bus Oct 24, 2026
13 checks passed
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.

2 participants