Architecture — Access Hand-Over
Only two kinds of token may manage other tokens, and Cloudflare refuses to create such a token through the API. So both are made by hand, and every other token is created in code by the project-setup layer (SR-INFRA-009 SR-F-07, ADR-INFRA-011). The layers themselves are in Layered Environments.
1. Hand-over

Read the picture left to right: a person creates the token-creating tokens, each applies one layer, and that layer creates the tokens below it in code. Personal values are piped to the site’s non-production vault; each pipeline token is rolled into the site’s vault for its environment. Every consumer reads its own vault.
2. Made by hand
| Token | Created by | Applies | Lifetime | Where it is used |
|---|---|---|---|---|
| Bootstrap | An account administrator | L1 | Short-lived, deleted after the apply | Released by op run into one L1 run in the bootstrap dev container |
| Project setup, non-production | An account administrator | L2 non-production | Made once, kept expired; rolled for each run with a short expiry, expired after | Released by op run into one L2 run in the setup dev container |
| Project setup, production | An account administrator | L2 production | Made once, kept expired; rolled for each run with a short expiry, expired after | Rolled into the setup layer’s production vault just before the dispatch, read by the production setup workflow through its read-only service account, cleared and expired straight after |
| State key pair per L2 root | An account administrator, in R2, on the state bucket only | Read and write of the state bucket | Made once, kept expired; rolled for each run with a short expiry, expired after | The same release path as the root’s apply token |
| Service account per site and environment | An account administrator, in 1Password | Read-only on that environment’s vault | 90 days or less | The only secret of the site’s GitHub environment for that environment |
L1 creates no token. The project-setup tokens also hold DNS edit, used only for each zone’s mail records (ADR-INFRA-012); the site’s own records stay with the site’s tokens.
3. Created in code by L2
| Token | Environments | Can change | Lifetime | Handed to |
|---|---|---|---|---|
| Personal infrastructure | Non-production only | Account storage, Pages and Workers; its own zone’s DNS, firewall, routes and settings | Short-lived | The site’s non-production vault, for the site’s dev container |
| Personal state | Non-production only | The state bucket only | Short-lived | The same vault |
| Pipeline infrastructure deploy | Both | The same list as the personal infrastructure token | Short-lived, renewed before a release | Rolled by a person into the site’s vault for that environment |
| Pipeline publishing | Both | Pages only | Short-lived, renewed before a release | The same vault |
| Pipeline state | Both | The state bucket only | Short-lived, renewed before a release | The same vault |
| Pipeline media copy | Both | Read objects in the non-production media bucket; write objects in its own environment’s media bucket | Short-lived, renewed before a release | The same vault |
- One permission list for both environments. Non-production holds exactly what production holds, scoped to its own zone and buckets, so a release proven in non-production proves what production will do. The code holds the list for non-production; the hand-made production tokens are checked against the same list on every roll.
- No personal production token. A person never holds a token that can change production. A production incident the pipeline cannot fix is a recorded dashboard change by an administrator signed in as themselves.
- Values are piped or rolled, never printed. A personal value goes from the encrypted state straight to the site’s non-production vault. A pipeline token’s value never leaves the setup run: a person rolls it in the dashboard into the site’s vault for that environment. No repository writes into another, so no cross-repository credential exists.
- Permissions are looked up by name in code and never copied as identifiers.
- Expiry is checked in the plan. A token whose expiry is in the past, or further ahead than its role allows, fails the plan.
- Hand-made tokens are kept, not re-made. Their permissions are checked once and stay fixed; they are unusable between uses, rolled to a new value for each run or release and expired right after. An exposed one is deleted and made anew.
4. People
Only members of the account’s administrator group create the hand-made tokens, and a token can never hold more than its creator’s role. Member roles, sign-in and audit review are in the runbooks: Restrict Account Members, Sign In With a Hardware Key and Review the Audit Log.
5. Rules that make the design hold
- Only the hand-made tokens can create or change tokens. No layer, pipeline or personal token can raise its own privileges.
- Each token is scoped to one account and, where the provider allows, one zone or one bucket. No token covers all accounts or all zones.
- One token per runner and per person. A pipeline token is never used by hand, and a personal token carries its holder’s name for the audit log.
- Revoking one site’s tokens changes only that site’s entries in L2.