Repository navigation
fix(gateway): let apps open inside the sandboxed home shell - #202
Conversation
App documents carried frame-ancestors <Home origin>, but the Home GUI shell that mounts them is an opaque sandboxed document. frame-ancestors checks every ancestor and an opaque origin never matches, so every app frame in the installed Home was blocked (ERR_BLOCKED_BY_RESPONSE). Keep frame-ancestors 'none' on the Home host and <Home origin> on shell capsules; drop it from app and viewer documents until the Runtime-owned host mounts app frames directly (#176). A foreign page that frames an app gets an opaque sandboxed document with no Home cookie, launch token or API authority. The browser regression now opens Assistant and Marketplace through the real gateway Home -> shell -> app chain (fails on develop), and checks that a foreign frame carries no cookie and gets no API authority. Refs #167 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review by the operator (Claude Opus, 2 October 08:35 UTC). This is the same model family as this PR's author, so it is not the independent different-family review the rule needs; a Codex review of this head is still required before merge. |
|
Tested in a real signed-in Home on macOS, built from this PR's head
CI: all checks pass except |
|
Independent adversarial review (Codex, gpt-6.1-sol; different model family from the Claude author), requested by Anders on 2 October, head |
|
Installed #153 Home proof has started for exact head |
|
The installed proof 36998746112 stopped before build after six Kubo connection timeouts; its dispatch branch cannot read the develop/PR caches under GitHub's cache scopes. |
|
Exact head |
|
Finished under Anders’s authorization: PR202 merged after green CI, Codex adversarial PASS and the exact-head installed Home journey. |
|
Independent adversarial review (Codex), exact head 0146b8a / tree a7f65054bbd6a744f1894657e02397f017ad7f74. |
|
Exact candidate0146b8ae315f4ac94a84b77628ffe3ab8688e6a9 / tree a7f65054bbd6a744f1894657e02397f017ad7f74 passes all checks in CI37048331449 and the installed Home journey37048532582; current Codex adversarial PASS remains exact-head. |
Fixes the app-frame regression from #197 reported in #167. With this change, Marketplace, Assistant and every other app open inside the installed Home again. Base
develop.Cause
App documents carried
frame-ancestors <Home origin>. The Home GUI shell that mounts them is an opaque sandboxed document, andframe-ancestorschecks every ancestor against the source list. An opaque origin serializes asnull, so the browser refused every app frame withERR_BLOCKED_BY_RESPONSE.Change
shell_content_security_policyapplies option (1) from the #167 analysis:frame-ancestors 'none'.home-gui,home-cli) keepframe-ancestors <Home origin>, because the Home host is their direct parent.Home keeps its cookie, launch token and API authority. A foreign page that frames an app receives an opaque sandboxed document that holds only what the page itself supplies.
Tests
content_sandbox_browseropens Home, then the sandboxed shell (/apps/home-gui/, originnull), then Assistant and Marketplace, all from real gateway responses. Both apps load, and Home's cookie and storage stay with Home. The test fails againstdevelop's server code, where Assistant stays blocked inside the shell.hostile.examplepage frames Assistant. The browser sends that request without the Home cookie, Home's cookie and storage stay with Home, and the gateway answers unsigned API requests with 403.frame-ancestors. The shell test still checksframe-ancestors <Home origin>.Local results on a Mac: both browser tests,
cargo fmt,clippy -D warningsand the source-gate steps pass. 2272elastos-serverlib tests pass; 8 custody and media tests depend on the local environment and fail the same way ondevelop.Claude wrote this change, so the independent review comes from a different model family. Irzhy owns the isolation design.
Refs #167
Made with Cursor
Current integration candidate:
0146b8ae315f4ac94a84b77628ffe3ab8688e6a9, treea7f65054bbd6a744f1894657e02397f017ad7f74, after a normal merge of develop0bc1c277. The feature files are unchanged, and approved #216 is integrated. Anders authorized this session to finish the branch and mark ready. Basic gates and current Codex source review pass. Current CI and installed signed-in Home Marketplace/Assistant journey are active; every gate applies to this exact candidate.