access: identity grants and one run credential replacing both task grants #1265

Closed
opened 2026-10-27 13:39:41 +00:00 by sam · 0 comments
Owner

Secrets and capabilities granted to identities; workflows name their identity, callees run as their own identity and the caller needs run on the callee; one run credential replaces WorktreeGrantIssuer and StateStoreGrantIssuer, stored as a digest in the State Store, expiring at workflow timeout plus margin, revoked on end and swept at start, unknown-credential runs parked for retry; State Store, forge RPC, worktree RPC and secret retrieval verify it; audit event on every identity start with server-stamped actor/principal/org/workspace; forge RPC subjects keyed by identity ID. Design: docs/prds/orgs-and-access.md (Approved).

Notes

SCOPING (2026-10-04), from the code. Today: two separate per-task grants, both in memory. The State Store grant (staterpc TaskGrants, registered by archied, used by the container for Update/Transition/InsertEvent/steps) dies with the State Store process; the worktree publication grant (worktreerpc.Grants in archied) dies with archied. The forge RPC (forgerpc) checks nothing: any NATS publisher can comment/close/open PRs on any repo. Order: (1) one run credential: digest persisted in the State Store, expiry from the task timeout plus margin, swept at start; the container gets one token used for the State Store and worktree push; archied verifies it through a State Store RPC. (2) forge RPC verifies the credential and only acts on the run's own repository. (3) identity grants for secrets and capabilities, workflows naming their identity, callee identity and run permission. (4) identity-start audit event, forge RPC subjects keyed by identity ID. Related: the broker-wide NATS token in Kit containers is filed separately.
Slices 1-2 done (319e8f49 one persisted run credential for store calls and push; f4f0ec05 forge RPC needs it and stays in the run's repository). Decisions (Sam, 2026-10-04): identity grants (secrets, capabilities) are a control-plane resource edited from the dashboard, replacing granted_credentials in config.toml; a workflow that names an identity always runs as it, and the dispatcher needs run on that workflow.

Close reason

Done: one run credential per task, persisted as a digest in the State Store with expiry at the task limit plus a margin, swept at start (319e8f49); worktree push and forge RPC verify it and stay in the run's repository (319e8f49, f4f0ec05); identity credential grants edited from the dashboard and applied live (1c999872); a workflow naming an identity runs as it and the dispatcher needs run on it, which covers callees (7f1aeb19); every run start audited by the State Store or the credential withdrawn (c28b0adb); identity RPC subjects keyed by identity ID (6c208f2b). Unknown-credential runs already park transient. Secret retrieval through the egress proxy moves onto run credentials in archie-core-egkf.11.


Imported from beads archie-core-cklk · GitHub #1026 · type task · priority P1 · created 2026-09-23 · closed 2026-10-04

Secrets and capabilities granted to identities; workflows name their identity, callees run as their own identity and the caller needs run on the callee; one run credential replaces WorktreeGrantIssuer and StateStoreGrantIssuer, stored as a digest in the State Store, expiring at workflow timeout plus margin, revoked on end and swept at start, unknown-credential runs parked for retry; State Store, forge RPC, worktree RPC and secret retrieval verify it; audit event on every identity start with server-stamped actor/principal/org/workspace; forge RPC subjects keyed by identity ID. Design: docs/prds/orgs-and-access.md (Approved). ### Notes SCOPING (2026-10-04), from the code. Today: two separate per-task grants, both in memory. The State Store grant (staterpc TaskGrants, registered by archied, used by the container for Update/Transition/InsertEvent/steps) dies with the State Store process; the worktree publication grant (worktreerpc.Grants in archied) dies with archied. The forge RPC (forgerpc) checks nothing: any NATS publisher can comment/close/open PRs on any repo. Order: (1) one run credential: digest persisted in the State Store, expiry from the task timeout plus margin, swept at start; the container gets one token used for the State Store and worktree push; archied verifies it through a State Store RPC. (2) forge RPC verifies the credential and only acts on the run's own repository. (3) identity grants for secrets and capabilities, workflows naming their identity, callee identity and run permission. (4) identity-start audit event, forge RPC subjects keyed by identity ID. Related: the broker-wide NATS token in Kit containers is filed separately. Slices 1-2 done (319e8f49 one persisted run credential for store calls and push; f4f0ec05 forge RPC needs it and stays in the run's repository). Decisions (Sam, 2026-10-04): identity grants (secrets, capabilities) are a control-plane resource edited from the dashboard, replacing granted_credentials in config.toml; a workflow that names an identity always runs as it, and the dispatcher needs run on that workflow. ### Close reason Done: one run credential per task, persisted as a digest in the State Store with expiry at the task limit plus a margin, swept at start (319e8f49); worktree push and forge RPC verify it and stay in the run's repository (319e8f49, f4f0ec05); identity credential grants edited from the dashboard and applied live (1c999872); a workflow naming an identity runs as it and the dispatcher needs run on it, which covers callees (7f1aeb19); every run start audited by the State Store or the credential withdrawn (c28b0adb); identity RPC subjects keyed by identity ID (6c208f2b). Unknown-credential runs already park transient. Secret retrieval through the egress proxy moves onto run credentials in archie-core-egkf.11. --- _Imported from beads `archie-core-cklk` · GitHub #1026 · type task · priority P1 · created 2026-09-23 · closed 2026-10-04_
sam added the hightask labels 2026-10-27 13:39:41 +00:00
sam self-assigned this 2026-10-27 13:39:41 +00:00
sam closed this issue 2026-10-27 13:39:42 +00:00
sam added a new dependency 2026-10-27 13:41:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1265