Skip to content

feat: the grant permission (manage:grant) and subject-mode conditions - #327

Merged
Mearman merged 8 commits into
mainfrom
feat/grant-permission
Oct 1, 2026
Merged

Mearman merged 8 commits into
mainfrom
feat/grant-permission

Conversation

@Mearman

@Mearman Mearman commented Oct 1, 2026

Copy link
Copy Markdown
Member

Implements #323: a manage:grant capability authorises its bearer to mint other capability tokens; the minted token cites its authoriser via a new authorised-by claim, and the authoriser's trilean conditions are evaluated against the minted child's claims at verify time, so an issuer can bar the holder from granting the permission or the underlying capability to itself. The chain-root rule is generalised to every scope kind. Rust parity (typed delegations-remaining, predicate subset with not/and and subject-bearing delegates, the authorised-by walk) and conformance vectors follow on this branch before it leaves draft. Refs #323.

A manage:grant capability authorises its bearer to mint other capability
tokens; the mint cites its authoriser through a new authorised-by claim
whose obligations include evaluating the authoriser's conditions against
the minted child's claims, so an issuer can bar the holder from granting
to itself. The chain-root rule is stated for every scope kind, and the
registry gains manage:grant.
The authorised-by link is checked in the token walk (bearer, verb,
scope and expiry narrowing, one delegations-remaining hop, subject-mode
conditions against the child) and at mint time, with canGrantVia as the
pure query. Subject mode registers grantee-is and granted-capability-is,
and the walk gains a depth bound and cycle guard.
authorised-by, grants-capability and a typed delegations-remaining join
TokenClaims so none can fall into the extension tail unchecked, with a
round-trip test covering all three at once.
The predicate subset gains strict-Kleene not/and/or (the shape of the
no-self-grant bars) and two delegate systems, grantee-is and
granted-capability-is, which resolve against the minted child a
grant-capability's conditions bind and are indeterminate without one.
The iterative walk tracks which claim links each pair of tokens, upholds
the authorisation obligations (bearer, manage:grant verb,
grants-capability, scope and expiry narrowing, one
delegations-remaining hop, subject-mode conditions against the minted
child) and closes the gap that left delegations-remaining unchecked on
parent links. Tests mirror the TypeScript matrix.
A manage:grant root with the no-self-grant bar in its conditions, an
exec:pty mint authorised by it, and a second-level grant-capability
passed onward, pinning the claims' wire shape across implementations.
…r own module

generate.ts is at the max-lines cap, so the new grant-permission vectors
and the room:member chain they sit beside live in token-vectors.ts, with
everything they share with generate.ts handed over explicitly. The
regenerated vector files are byte-identical.
@Mearman
Mearman force-pushed the feat/grant-permission branch from 18d0963 to 49272b9 Compare October 1, 2026 17:21
@Mearman
Mearman marked this pull request as ready for review October 1, 2026 17:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-01T17:39:37.964429Z 49272b9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 7f4291b into main Oct 1, 2026
9 checks passed
@Mearman
Mearman deleted the feat/grant-permission branch October 1, 2026 17:40
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