cf-access-wall
Installation
SKILL.md
cf-access-wall — declarative Access provisioning
Zero Trust free tier covers 50 seats; Access attaches directly to *.workers.dev hostnames (verified live 2026-07-23 — no zone, no domain purchase). One Access app offers BOTH login paths on a single screen: GitHub for developers, emailed 6-digit code for non-technical staff (no account creation). Enforcement is real: unauthenticated requests 302 to the team login page.
Self-Evolving Skill: Cloudflare's API/dashboard drift → fix scripts + the dashboard-forge Vendor Quirks log immediately on real breakage.
Flow
- Spec — write
<project>/…/access-spec.jsonagainstschema/access-spec.schema.json. The spec lives in the PROJECT repo (it carries team emails); this skill stays agnostic. - Scoped token (once per account) — the existing account token usually lacks Access scopes and cannot grant itself more. Forge one via the dashboard-forge method (sibling skill): human logs into dash.cloudflare.com in the automation Chrome; drive Manage Account → Account API Tokens → Edit on
Access,Access: Identity Providers,Access: Organizations,Access: Service Tokens; DOM-extract →vault set --stdin <scope> cf.api_token. Account-token gotcha: verify with/accounts/{id}/tokens/verify(the/user/…endpoint always rejects account-owned tokens). - GitHub OAuth app (if the GitHub path is wanted) —
node scripts/gh-oauth-app.mjs --name <app> --callback https://<team>.cloudflareaccess.com/cdn-cgi/access/callback --expect-account <owner> --vault-scope <scope>The--expect-accountidentity preflight is mandatory doctrine (wrong-owner incident, 2026-07-23). Create the app right after a fresh login to ride the sudo grace window. - Provision —
node scripts/setup-access.mjs <spec.json>— idempotent (GET-before-POST), safe to re-run after every spec edit; pre-existing orgs/idps/apps are adopted, not overwritten. - Verify enforcement —
curl -s -o /dev/null -w '%{http_code}' https://<host>/→ expect302; then a service-token request → expect200:curl -H "CF-Access-Client-Id: $ID" -H "CF-Access-Client-Secret: $SECRET" …