From 027546eeb228ab25debca7a299a5cc84f4bfb48c Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Fri, 4 Dec 2026 23:44:10 +0800 Subject: [PATCH] docs: mandate Account API Tokens for CI/CD and services --- docs/cloud-governance-standard.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/cloud-governance-standard.md b/docs/cloud-governance-standard.md index cc96576..d8a8882 100644 --- a/docs/cloud-governance-standard.md +++ b/docs/cloud-governance-standard.md @@ -12,7 +12,10 @@ Format: `--[-]` (lowercase ASCII, digits, hyphens o - **D1 Database**: `--db[-]` - **KV Namespace**: `--kv-` - **R2 Bucket**: `--r2-` -- **API Token Name**: `gha---` +- **API Token Name**: + - CI/CD: `gha---` + - Service / Runtime: `--` + - Personal Interactive Diagnostics: `--ro` ### Google Cloud (GCP) - **Project**: `--` (e.g. `example-prod-01`) @@ -26,6 +29,7 @@ Format: `--[-]` (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** (`//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.