Skip to content

feat(permissions): add capabilities and scoped tokens - #6

Open
PiquelChips wants to merge 1 commit into
feat/permissions-attachmentsfrom
feat/permissions
Open

PiquelChips wants to merge 1 commit into
feat/permissions-attachmentsfrom
feat/permissions

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Nothing says yet what each caller of a repository may do. This adds the model the rest of the stack builds on, in origin-shared's access module.

Capabilities, written as text: read <path>, write <path>, annotate <kind>, land <target> or land *, and admin. Writing a path implies reading it, land * covers every target but policy, and changing the rules always takes admin.

Rights are what a caller may do: a level, none, read or write, under every path (PathAccess, where the most specific path decides), the kinds they annotate, the targets they land on, and whether they're admin. A scope only narrows rights, admin included, and rights cover a scope only if it's a part of them.

Tokens are short-lived and scoped: who they act for, their capabilities, and when they expire. A server signs them with its node key and verifies them without storing them. They're written origin1.<claims>.<signature>, the signature covering the claims after a domain prefix of its own, so nothing else the key signs passes for a token.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@PiquelChips
PiquelChips added this pull request to stack #7 October 14, 2026 14:38
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 2 times, most recently from 6cef652 to 202bf52 Compare October 14, 2026 17:32
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 2 times, most recently from 8af0822 to fe22e3e Compare October 14, 2026 18:50
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 2 times, most recently from e4017c6 to 2121267 Compare October 14, 2026 21:46
@PiquelChips PiquelChips self-assigned this Oct 15, 2026
@PiquelChips PiquelChips added the enhancement New feature or request label Oct 15, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in sourceorigin.dev Oct 15, 2026
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 2 times, most recently from 2c1a19f to df030d0 Compare October 28, 2026 16:49
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 2 times, most recently from 8c541f7 to 3dc97d7 Compare November 2, 2026 14:14
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 2 times, most recently from d736f8d to 7cd65f8 Compare November 2, 2026 23:34
@PiquelChips
PiquelChips removed this pull request from stack #18 November 4, 2026 18:00
@PiquelChips
PiquelChips added this pull request to stack #38 November 4, 2026 18:00
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 6 times, most recently from 8d93a6a to e24349d Compare November 4, 2026 19:41
@PiquelChips
PiquelChips force-pushed the feat/permissions branch 3 times, most recently from 1c2976b to bb3a243 Compare November 4, 2026 20:50
Nothing yet says what each caller of a repository may do. This adds
the model the rest builds on, in `origin-shared`'s `access` module.

A capability is one thing a caller may do, written as text: `read
<path>`, `write <path>`, `annotate <kind>`, `land <target>` or `land *`,
and `admin`. Writing a path implies reading it, `land *` covers every
target but `policy`, and changing the rules always takes `admin`.
`Rights` are what a caller may do, resolved from a policy: their level,
none, read or write, under every path (`PathAccess`, where the most
specific path decides), the kinds they annotate, the targets they land
on, and whether they're `admin`. A scope narrows rights: nothing it
holds adds one, and rights cover a scope only if it's a part of them.

A `Token` is short-lived and scoped: who it acts for, its capabilities,
and when it expires, signed with a server's node key, so the server
verifies it without storing it. It's written `origin1.<claims>.<sig>`,
the signature covering the claims after a domain prefix of its own, so
no other bytes the key signs pass for a token.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/permissions Capabilities, path rules, credentials and tokens enhancement New feature or request security Trust boundaries, authentication and access control

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant