-
Notifications
You must be signed in to change notification settings - Fork 0
Operators Key Rotation
github-actions[bot] edited this page Feb 28, 2026
·
3 revisions
Rotate Cloudflare Access service-token credentials used by r2 share worker ...
automation without interrupting share-management operations.
- Scheduled credential rotation.
- Suspected service-token secret exposure.
- Operator handoff or boundary changes.
- Access to Cloudflare Zero Trust service-token management.
- Ability to update secrets/env used by CLI automation.
- Ability to run worker smoke checks.
R2_EXPLORER_BASE_URLR2_EXPLORER_ACCESS_CLIENT_IDR2_EXPLORER_ACCESS_CLIENT_SECRET
- Export existing values for rollback reference:
export OLD_CLIENT_ID="${R2_EXPLORER_ACCESS_CLIENT_ID}"
export OLD_CLIENT_SECRET="${R2_EXPLORER_ACCESS_CLIENT_SECRET}"-
Create a new Access service token in Cloudflare Zero Trust.
-
Update automation environment/secrets with the new values.
-
Validate API probe with service-token headers:
curl -i \
-H "CF-Access-Client-Id: ${R2_EXPLORER_ACCESS_CLIENT_ID}" \
-H "CF-Access-Client-Secret: ${R2_EXPLORER_ACCESS_CLIENT_SECRET}" \
"${R2_EXPLORER_BASE_URL%/}/api/v2/session/info"- Validate share lifecycle commands:
r2 share worker create files documents/test.txt 1h --max-downloads 1
r2 share worker list files documents/test.txt- Revoke/disable the old service token after validation.
-
r2 share worker createsucceeds with new credentials. -
r2 share worker listreturns expected records. - Old service token no longer works after revocation.
-
401 access_required:- wrong client ID/secret pair or missing Service Auth policy.
-
401 token_invalid_signature:- Access JWKS/signing issue.
-
401 token_claim_mismatch:- Access AUD mismatch.
-
403 insufficient_scope:- Worker scope requirements are stricter than token claims.
- Restore previous service-token credentials in automation env.
- Re-run API probe and share lifecycle checks.
- Keep old token active until new credentials are confirmed healthy.
- Record rotation timestamp and operator.
- Record old/new client IDs and revocation time.
- Capture verification command outputs.
Getting Started
Guides
Operator Runbooks
- Overview
- Cloudflare Access Routing Runbook
- Incident Response Runbook
- Access Service Token Rotation Runbook
- Readonly Maintenance Runbook
- Worker/Share Rollback Runbook
- Security Gates Remediation
Option Reference