Skip to content

Access and identity

llms.txtlists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/terragucci/standards/access-and-identity/.
For this repo, list who can take each action in the page's table: read the forge's collaborators and their roles, the branch protection of the default branch and of the approvals branch, the `approval` key in terragucci.yml on the default branch, the principals in the signers file, and the trust policy of each role `oidc` names, through the forge's API or CLI and the cloud's CLI.
Also read `approval_rules`, `policy.override` and `environments` there, and the roles in `.chant/trust.json`.
Report each action with the people or roles who can take it, then list who can approve, override and apply each root in this repo, and flag any action that the `approval` mode leaves unprovable.
Change nothing.
Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`.

Every terragucci stage is a job in your CI, so the controls you already run decide who can apply to production and show an auditor who did.

Need Comes from
SSO the forge’s sign-in: SAML or OIDC on GitHub, SAML on GitLab, LDAP or OAuth2 on Forgejo; Slack’s or Teams’ own sign-in for chat approvals
RBAC forge permissions and branch protection for the code, the approval mode for gated waves, and cloud IAM for what each job’s role reaches
Audit the audit trail: each approval with its approver, digest and time, and the apply that used it

The signers file and policy.override are the only lists of people terragucci reads; both live in the repo. Offboarding someone takes them off the forge and chat workspace and out of both lists.

Each row names who may take the action, what enforces it, and the key that changes it. A key marked “at base” is read from the applied commit’s first parent, so a pull request that edits it is decided by the default branch’s value.

Action Who may Enforced by Set by
Open a pull request and get a plan anyone with write access; a fork’s pull request gets no plan the forge; the plan job’s role is read-only and its trust names your repo oidc.plan_role
Re-plan from a comment or a dispatch write access (on GitLab, Developer or above); anyone else gets no plan (comment checks) the forge’s permissions, read by the comment job comments on GitLab
Lock or unlock a pull request’s roots, /terragucci lock and unlock write access the comment job apply.when: pull-request or locks: plan; without either, the comment is refused
Merge branch protection: required reviews and the required terragucci/plan status (settings per forge) the forge the forge’s rules
Apply an open pull request, /terragucci apply write access, once each of apply.requires holds: by default an approval of the head by a reviewer other than its authors, passing checks, mergeable, and up to date with the default branch. Always: terragucci/plan passed, the head did not move, the pipeline file is unchanged, and no other pull request holds a lock on a root it reaches. Gated waves still wait the comment job, then the gate apply.when, apply.requires
Approve a waiting wave an approval the approval mode counts, from someone who had no hand in the change the wave’s job, against the ledger approval, at base
Approve a wave approval_rules covers as many distinct approvers as count asks, holding a roles role in .chant/trust.json, one of them proven not the author when not_author is set; roles and not_author count only approvals that prove who made them, under sealed or pr-review (More than one approver) the wave’s job approval_rules and .chant/trust.json, at base
Approve a wave held by cost, a failed hook or a policy hold rule as for any waiting wave the wave’s job cost.approve_above, ci.hooks, policy.outcomes, at base
Answer a decision point, with apply.point the point’s deciders, to its quorum; a relayed click counts as the clicker, and an agent counts for nobody chant’s points apply.point and the workspace’s points file, at base
Approve from Slack or Teams the chat platform’s sign-in, the user’s line in the signers file, and a relay token that can only approve; under sealed the relay records nothing (relay checks) the relay, in your cloud notify.relay
Approve a state migration terragucci approve <name> from a checkout, signed under sealed; a pull request review and a chat click never count wave 1’s job approval, at base
Approve a pull request’s ephemeral environment terragucci approve ephemeral <n>, signed under sealed the ephemeral job ephemeral and approval, at base
Override a policy denial the people policy.override lists, or an entry for the root and the rules that denied it; a role in an entry counts only under sealed (scoped overriders) the wave’s job policy.override, at base
Change what the policy holds, releases or denies whoever merges the change: a pull request’s own policy edits take effect once it merges branch protection policy and the policy directory, at base
Apply the apply role, whose trust names the default branch alone; with environments or oidc.roles, a role per environment (Scoping by environment) the cloud’s trust oidc
Read or write a state cloud IAM on each role’s state keys; config check warns when one role reaches two environments the cloud the roles’ policies
Release a state lock a killed job left anyone whose own cloud identity can reach the lock, once an approval the mode counts names its ID unlock-state, which first checks that no run older than the lock is alive approval
Export a state version anyone whose own cloud identity can read the state, once someone other than the requester approved the request (export) state export approval
Agents and MCP write access to start an agent from a comment; no forge token and no cloud role in the agent’s step, and its change comes back as a commit that plans like any other. terragucci mcp reads with its own environment’s credentials and refuses approve (agents) the forge and the agent’s push job agent
Propose a change over MCP, terragucci mcp --propose an agent connected to it, with the forge token the server starts with: push a branch other than the default branch, chant/lifecycle and the apply.branches branches, open a pull request from it, and comment /terragucci plan. No tool approves, applies, overrides or merges, and the pull request plans and waits at the gate like any other (propose over MCP) the server’s tools, and what the server’s token may do on the forge the token in the server’s environment
Apply from a coding agent’s own shell whatever cloud credentials that shell holds. terragucci guard refuses the binaries’ apply, destroy, import, state edits and -auto-approve in a pipeline root, and a hook refuses them in Claude Code’s Bash tool; it does not stop a binary run by another path, from a script, or once the agent edits the hook or PATH (guard refusals) the credentials: a plan role that cannot write, state roles per environment, and approvals bound to the plan digest terragucci guard, on that machine

This is the full table of the three modes; the other pages link here. Every mode binds the wave’s set digest, so an approval of other plans is refused as changed, and in every mode an approval counts only from someone who had no hand in the change.

Mode Counts Setup Proves
ledger (default) any approval of the digest on chant/lifecycle, signed or not none that the approved plan is the plan that applied
pr-review as under ledger, or the merged pull request’s approval of its head by a writer who had no hand in the change (on GitLab, a Developer or above, after the merge request’s latest push), when the wave plans what the review saw none; optionally require terragucci/approval in branch protection on GitHub and Forgejo, or an approval rule on GitLab as ledger, plus a forge review by someone other than the author, under their forge identity and so under your SSO
sealed only an approval sealed with terragucci approve --sign by a key the signers file at base lists for its approver a signers file; init lists each wave under identity.gates as ledger, plus an ssh signature by a key the signers file lists for that approver

The mode is read at base, as are the signers file and chant.workspace.json. approval: { mode: ledger, require_signed: true } refuses every unsigned approval on the ledger. Approve a waiting wave says which mode is in force when the key is unset, the approvals runbook covers day-to-day use, and the threat model what each mode stops.

Secret Held by Never held by
the forge token token_env names the rollout job and respond --mode apply on GitHub and Forgejo, whose other jobs use the run’s own token; on GitLab, every generated job, as TG_TOKEN the steps that run a pull request’s code (forge tokens)
the merge token, apply.merge_token_env the pr-merge job; on GitLab also the comments job, in the terragucci-merge environment every job that runs a pull request’s code
agent.token_env the agent’s push jobs the agent’s own step
the relay token the relay, in your cloud, which refuses one that administers the repo, may push to the default branch or, on GitLab, has the api scope every generated job
an approver’s signing key the approver’s own machine every job and the relay
COSIGN_PRIVATE_KEY the publish job every other job

Handle secrets follows the secrets your roots read, from the forge’s store to the state.

environments, or oidc.roles by root glob, give each environment’s roots their own plan and apply identities, and each wave applies in one job per group of identities, which carries only its own group’s identities. Whether one environment’s apply job can still assume another environment’s role depends on whether the cloud’s trust can tell their tokens apart:

Setup One environment’s apply job and another’s role
environments on GitHub, each apply role trusting its environment’s subject kept apart: the job’s token names its forge environment, whose deployment branch rule keeps other branches out
environments on GitLab kept apart on AWS by each environment’s oidc.audience, and on GCP and Azure by the token’s environment claims
environments on Forgejo not kept apart: every job of one ref carries the same subject; use a repo or a protected branch per environment
oidc.roles without environments, on any forge not kept apart: the groups’ jobs run in no forge environment and carry the default branch’s subject. A role per environment keeps a root from using another environment’s identity by accident; it does not stop code in one group’s job from assuming another group’s role. config check names the groups (terragucci-shared-subject)
a Terragrunt repo one job per wave, holding every unit’s roles

The wave’s deciding job holds every environment’s plan identities and no apply identity. Separate environments has the forge and cloud settings for each row, and terragucci forge check reads them back.

terragucciHelp setting it up: Intentius

These docs count page views and clicks with PostHog. They set no cookies, store nothing in your browser, and send nothing when your browser asks not to be tracked.