Skip to content

Scoped remote access: per-device permissions and OAuth for outside agents #1530

Closed

Description

@currentbits

Solenta Web pairs devices with one full-access, revocable token each (electron/webDevices.js:155); there are no scope fields. External MCP pairing (electron/pairing.js:24) has 4 capabilities (read/launch/steer/read_all), but no OAuth and no per-tool declaration. Hosted agents (ChatGPT, cloud bots) can't connect, and a paired phone can do everything the desktop can.

Proposal (M):

  1. Device scopes at pairing time: Read only / Steer threads / Full. Separate grants for file write, git write (commit/push/merge), terminal (observe vs type), preview control and settings. Enforce them on the host per IPC channel, not in the UI.
  2. Every orchestration MCP tool declares the capability it needs; calls without it fail closed.
  3. OAuth 2.1 (PKCE) on the MCP endpoint so hosted agents can sign in, plus a "Copy MCP URL" button next to the existing token/JSON copy (IntegrationsSection.tsx:194-217).

Continues #245 and #151.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Oct 9, 2026
  2. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Parts 1-2 are done on branch coder/scoped-remote-access-per-device-permissi-93c3a4. Part 3 (OAuth) moves to #1541: the MCP endpoint listens only on loopback, so OAuth alone doesn't let hosted agents in.

    • Device scopes (electron/webScopes.js):
      • Presets: Read only, Steer threads, Full.
      • Extra grants: files, git, terminal (watch or type), preview, settings.
      • All 280 IPC channels are classified, and an unlisted channel needs full.
      • webBridge.js checks the scope before any handler runs and filters terminal:data pushes.
      • Devices paired before this change keep full access, as does the legacy token.
    • External MCP tools: each one declares its capability in EXTERNAL_TOOLS. The pairing only sees tools it holds, and every call re-checks.
    • UI:
      • Add device has a scope picker, and each device row shows what it may do.
      • The pairing reveal has a "Copy MCP URL" button.
  3. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Parts 1-2 merged in #1545 (876cb44).

    The review found two problems, both fixed before merge:

    • attachments:readImage now only serves images under attachments, worktrees or project folders unless the device has full access.
    • threads:setPermissionMode now needs full access.

    OAuth continues in #1541.

  4. added
    plan:done
    and removed
    plan:doing
    on Oct 9, 2026
  5. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Landed from Solenta thread "Scoped remote access: per-device permissions and OAuth for o" (PR #1545). Closed on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions