Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/cloud-governance-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ Format: `<domain>-<app>-<component>[-<env>]` (lowercase ASCII, digits, hyphens o
- **D1 Database**: `<domain>-<app>-db[-<env>]`
- **KV Namespace**: `<domain>-<app>-kv-<purpose>`
- **R2 Bucket**: `<domain>-<app>-r2-<purpose>`
- **API Token Name**: `gha-<domain>-<repo>-<scope>`
- **API Token Name**:
- CI/CD: `gha-<domain>-<repo>-<scope>`
- Service / Runtime: `<domain>-<service>-<ro|writer>`
- Personal Interactive Diagnostics: `<domain>-<tool>-ro`

### Google Cloud (GCP)
- **Project**: `<domain>-<tier>-<suffix>` (e.g. `example-prod-01`)
Expand All @@ -26,6 +29,7 @@ Format: `<domain>-<app>-<component>[-<env>]` (lowercase ASCII, digits, hyphens o
## 2. Least-Privilege Boundaries

### Cloudflare
- **Account vs. User API Tokens**: Create all CI/CD (`gha-*`), service/runtime, and unattended automation tokens as **Account API Tokens** (`/<account_id>/api-tokens`), not User API Tokens (`/profile/api-tokens`), so credentials are bound to the account lifecycle rather than a personal login. Reserve **User API Tokens** strictly for personal interactive CLI or read-only diagnostic tools (`*-ro`).
- Scope every CI API token to a **single account** (`Include -> Specific account`) and only the exact resource types used (`Workers Scripts: Edit`, `Cloudflare Pages: Edit`, `D1: Edit`, etc.).
- Public repositories must store `CLOUDFLARE_*` secrets in a protected GitHub Environment (e.g. `web-production`) restricted to `main`/`master`; repository-level `CLOUDFLARE_*` secrets must be empty.
- Unattended-operation policy: do NOT store high-privilege org admin keys in CI solely for auto-rotation, and do NOT impose manual 90-day rotation chores. Rely on single-account/project isolation, restricted scopes, and hard spend caps; rotate manually only on incident or scope change.
Expand Down