Found via #1725: the canary steps in CI authenticate to the production host's dashboard with CANARY_TOKEN, which needs instance admin because writing the update-settings resource is instance-level. That token sits in CI secrets and is a god-token on the production host.
Done when the canary uses a grant scoped to what it does — read the update/signals endpoints, write update-settings, trigger installs — and CANARY_TOKEN no longer carries instance admin. The registry-writing DEPLOY_TOKEN stays CI-only (promotion runs in CI via the promote workflow, never on the host).
Found via #1725: the canary steps in CI authenticate to the production host's dashboard with CANARY_TOKEN, which needs instance admin because writing the update-settings resource is instance-level. That token sits in CI secrets and is a god-token on the production host.
Done when the canary uses a grant scoped to what it does — read the update/signals endpoints, write update-settings, trigger installs — and CANARY_TOKEN no longer carries instance admin. The registry-writing DEPLOY_TOKEN stays CI-only (promotion runs in CI via the promote workflow, never on the host).
Implemented in c180a2deb (on main): the canary can now run as a dedicated service-account identity in the system org carrying only the new org-canary-grant policy (read the signal endpoints, read/write update-settings, trigger an install). POST /api/chat/update/install|defer now map to update on Object::"update" instead of run on any workflow; active service accounts can authenticate with bearer tokens; new POST /api/identities/{id}/tokens plus the BindIdentityPersonalToken RPC mint tokens for non-user identities (user-kind targets refused, caller recorded as audit actor). Engine tests pin the exact allow/deny surface; task check green.
Remaining operational step (on the production host): create the service_account identity, issue its token, install the org-canary-grant policy per RELEASING.md, then replace the CANARY_TOKEN secret with that token and confirm a canary.yml run passes with it.
Implemented in c180a2deb (on main): the canary can now run as a dedicated service-account identity in the system org carrying only the new `org-canary-grant` policy (read the signal endpoints, read/write update-settings, trigger an install). `POST /api/chat/update/install|defer` now map to `update` on `Object::"update"` instead of `run` on any workflow; active service accounts can authenticate with bearer tokens; new `POST /api/identities/{id}/tokens` plus the `BindIdentityPersonalToken` RPC mint tokens for non-user identities (user-kind targets refused, caller recorded as audit actor). Engine tests pin the exact allow/deny surface; `task check` green.
Remaining operational step (on the production host): create the service_account identity, issue its token, install the `org-canary-grant` policy per RELEASING.md, then replace the CANARY_TOKEN secret with that token and confirm a canary.yml run passes with it.
Follow-up in 2f8076d7f (pushed): the first rehearsal with the scoped token showed the permit alone wasn't enough — service accounts created via the API get the developer role, whose shipped policy permits org-wide read. The grant is now a pair: org-canary-grant (permit) plus org-canary-grant-forbid (access.CanaryGrantForbidPolicy), which negates exactly the permit's surface for the canary identity; a forbid wins within the level. Engine tests pin the allow/deny surface with the principal carrying the developer role, and task canary:rehearse proves it live against a local host: scoped token gets 403 on /api/access/policies, 200 on /api/chat/update, and the full canary loop (start/status/check/promote) runs on it. REHEARSE_EXIT=0, task check green. RELEASING.md setup now installs both policies.
Follow-up in 2f8076d7f (pushed): the first rehearsal with the scoped token showed the permit alone wasn't enough — service accounts created via the API get the developer role, whose shipped policy permits org-wide read. The grant is now a pair: org-canary-grant (permit) plus org-canary-grant-forbid (access.CanaryGrantForbidPolicy), which negates exactly the permit's surface for the canary identity; a forbid wins within the level. Engine tests pin the allow/deny surface with the principal carrying the developer role, and task canary:rehearse proves it live against a local host: scoped token gets 403 on /api/access/policies, 200 on /api/chat/update, and the full canary loop (start/status/check/promote) runs on it. REHEARSE_EXIT=0, task check green. RELEASING.md setup now installs both policies.
sam
added the mediumtask labels 2026-11-14 14:45:43 +00:00
sam
added the deferred label 2026-11-15 17:26:13 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found via #1725: the canary steps in CI authenticate to the production host's dashboard with CANARY_TOKEN, which needs instance admin because writing the update-settings resource is instance-level. That token sits in CI secrets and is a god-token on the production host.
Done when the canary uses a grant scoped to what it does — read the update/signals endpoints, write update-settings, trigger installs — and CANARY_TOKEN no longer carries instance admin. The registry-writing DEPLOY_TOKEN stays CI-only (promotion runs in CI via the promote workflow, never on the host).
Implemented in
c180a2deb(on main): the canary can now run as a dedicated service-account identity in the system org carrying only the neworg-canary-grantpolicy (read the signal endpoints, read/write update-settings, trigger an install).POST /api/chat/update/install|defernow map toupdateonObject::"update"instead ofrunon any workflow; active service accounts can authenticate with bearer tokens; newPOST /api/identities/{id}/tokensplus theBindIdentityPersonalTokenRPC mint tokens for non-user identities (user-kind targets refused, caller recorded as audit actor). Engine tests pin the exact allow/deny surface;task checkgreen.Remaining operational step (on the production host): create the service_account identity, issue its token, install the
org-canary-grantpolicy per RELEASING.md, then replace the CANARY_TOKEN secret with that token and confirm a canary.yml run passes with it.Follow-up in
2f8076d7f(pushed): the first rehearsal with the scoped token showed the permit alone wasn't enough — service accounts created via the API get the developer role, whose shipped policy permits org-wide read. The grant is now a pair: org-canary-grant (permit) plus org-canary-grant-forbid (access.CanaryGrantForbidPolicy), which negates exactly the permit's surface for the canary identity; a forbid wins within the level. Engine tests pin the allow/deny surface with the principal carrying the developer role, and task canary:rehearse proves it live against a local host: scoped token gets 403 on /api/access/policies, 200 on /api/chat/update, and the full canary loop (start/status/check/promote) runs on it. REHEARSE_EXIT=0, task check green. RELEASING.md setup now installs both policies.