Skip to content

Scoped command tokens: a credential for one command on one device - #188

Merged
Daily-AC merged 9 commits into
mainfrom
feat/scoped-token
Nov 5, 2026
Merged

Daily-AC merged 9 commits into
mainfrom
feat/scoped-token

Conversation

@Daily-AC

@Daily-AC Daily-AC commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Adds the wcs_ scoped command token (ADR 0021): bound to one of the owner's devices and one literal command, enforced by the relay (device, exec-only rights) and the agent (exact canonical request), revocable, expiring, rollback-safe. Migration 016. CLI: wanctl scoped-token create|list|revoke. Ships with the next regular release; the docs say it is not available until then. ADR stays proposed until it ships.

Tested: full suite and -race with Postgres, real-binary relay+agent+CLI end-to-end, old-binary rollback check, Codex read-only review (1 High fixed, 2 Medium assessed).

🤖 Generated with Claude Code

Daily-AC and others added 9 commits November 5, 2026 08:31
A wcs_ token is bound at issue time to one of the owner's devices and one
literal command. The relay admits it only to that device with exec-only
capabilities and stamps the command on the authenticated agent control
channel; the agent accepts only the exact canonical exec request. Agents that
do not register scoped_exec are never handed one. Revocation and expiry stop
the next request and end running sessions.

See docs/adr/0021-scoped-command-token.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cess

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n them

An older relay's namespace-only lookup excludes kind 'delegated' only; a new
kind would have resolved as a full account token. A scoped_tokens row now marks
the token scoped. Found in the Codex review.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…he en page

The docsite build requires code blocks to be copied, not translated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Daily-AC
Daily-AC merged commit 4062ee5 into main Nov 5, 2026
0 of 4 checks passed
@Daily-AC
Daily-AC deleted the feat/scoped-token branch November 5, 2026 17:25
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.

1 participant