Repository navigation
feat(permissions): add capabilities and scoped tokens - #6
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 14, 2026 14:54
730bb9b to
21caf29
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
2 times, most recently
from
October 14, 2026 17:32
6cef652 to
202bf52
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
2 times, most recently
from
October 14, 2026 18:50
8af0822 to
fe22e3e
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 14, 2026 21:10
fe22e3e to
cd2e8ca
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 14, 2026 21:29
cd2e8ca to
14a2c0a
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
2 times, most recently
from
October 14, 2026 21:46
e4017c6 to
2121267
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 14, 2026 21:48
2121267 to
38675f3
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 14, 2026 22:00
38675f3 to
c7d6efd
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 15, 2026 11:11
c7d6efd to
0bec471
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
2 times, most recently
from
October 28, 2026 16:49
2c1a19f to
df030d0
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
October 28, 2026 20:33
df030d0 to
161d8db
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
2 times, most recently
from
November 2, 2026 14:14
8c541f7 to
3dc97d7
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
2 times, most recently
from
November 2, 2026 23:34
d736f8d to
7cd65f8
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
from
November 4, 2026 17:58
7cd65f8 to
65990d1
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
6 times, most recently
from
November 4, 2026 19:41
8d93a6a to
e24349d
Compare
PiquelChips
force-pushed
the
feat/permissions
branch
3 times, most recently
from
November 4, 2026 20:50
1c2976b to
bb3a243
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'saccessmodule.Capabilities, written as text:
read <path>,write <path>,annotate <kind>,land <target>orland *, andadmin. Writing a path implies reading it,land *covers every target butpolicy, and changing the rules always takesadmin.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'readmin. 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)