Browser uses this computer's internet only after the owner grants it, as a revocable capability

未关闭
#559 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

Read the referenced Runtime routes in gateway_browser.rs and gateway_provider_proxy.rs, then trace the setup in scripts/browser-source-home-config.mjs and the approval work in #177 and #178. The direction calls for a Runtime-held, revocable grant checked by Gateway and exit-provider for local and remote Exits. Done includes approval, immediate revocation, migration behavior, release notes and SECURITY.md updates, plus design review by Irzhy.

由索引模型根据 Issue 内容生成。

描述

Problem

Browser reaches the internet through this computer's connection without the owner ever granting it (Anders, 7 Nov: "the browser should be using capability tokens to get internet access").

Containment holds: pages never get a network device or raw sockets. The Mac VM has no network device (elastos-vz/src/bin/browser-vz-engine-supervisor.rs:970), the Linux tap forwards nothing (scripts/browser-vm-linux-network.py), and every connection goes Gateway (gateway_browser_stream.rs) to exit-provider to browser-local-exit, which dials from the host.

Consent does not:

  • Setup writes the local Exit with allowed_hosts: ["*"], ports 80 and 443, plus the Runtime's own local ports 8090 and 61180 (scripts/browser-source-home-config.mjs:510-536). Same in 2.0.0.
  • The Runtime's check is the signed launch token's actor being browser (require_runtime_wallet_authority(..., &[BROWSER_CAPSULE_ID]), gateway_browser.rs:428, 620, 711; gateway_provider_proxy.rs allowlist). The manifest capability elastos://browser/exit is not checked by any Runtime route.
  • Home can mint any app's launch token (SECURITY.md, "Home can currently obtain every app's capability").
  • Browser Settings, Exit node, offers This device or a remote Exit; there is no Off.
  • The release notes never say Browser uses this computer's internet connection.

This breaks PRINCIPLES.md ("capabilities must be explicit ... narrow, auditable, and revocable"; Exit "must stay behind explicit Runtime policy").

Direction

The Runtime holds Browser's internet grant as a capability: issued only after the owner approves it once on the Runtime-owned approval surface (#178) with the passkey, bound to Browser on this Home (principal, session, instance) and never readable by Home or the app (#177). Gateway and exit-provider check that grant on every connection instead of the actor name, for the local and remote Exits alike. Without it, Browser shows one page asking for permission. Revoking in System refuses new connections at once and closes open ones within 2 seconds (#173 Browser authority contribution).

Done means

  • A fresh Home's Browser opens no connection until the owner approves; the approval names this computer's connection.
  • Revoke in System stops new and open connections within 2 s; restart and token expiry keep it revoked.
  • A Home-minted Browser launch token without the grant is refused for local and remote Exits.
  • Updating a Home that used Browser before asks once, and does not keep the old implicit grant.
  • Release notes and SECURITY.md say what Browser can reach.
  • Design reviewed by Irzhy before code.

Part of #173; depends on #177 and #178.

主要语言
Rust
星标
6
派生
2
平均合并
1 天 3 小时
30 天内合并 PR
42

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

elastos/elastos-runtime 的其他 Issue

查看 elastos/elastos-runtime 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。