-
Notifications
You must be signed in to change notification settings - Fork 0
Operators Access Policy Split
github-actions[bot] edited this page Feb 27, 2026
·
9 revisions
Ensure Cloudflare Access protects interactive/admin routes while allowing public tokenized share downloads.
- Initial setup of R2-Explorer custom domain.
- Access policy drift correction.
- Recovery from unexpected public/private route exposure.
- Access to Cloudflare Access policy management for target domain.
- Worker deployed on
files.unsigned.sh(or equivalent domain). - At least one valid share token for validation.
- Target domain, example:
files.unsigned.sh - Access policy include rules for org users/groups
- Existing share token ID for public path verification
-
Ensure Access app coverage is split by path for the same hostname:
- App A (production API):
files.unsigned.sh/api/v2/*with:-
Allowpolicy for trusted identities. -
Service Authpolicy for CI/service tokens.
-
- App B (production public download):
files.unsigned.sh/share/*with policy actionBypass. - App C (preview API):
preview.files.unsigned.sh/api/v2/*with:-
Allowpolicy for trusted identities. -
Service Authpolicy for preview CI/service tokens.
-
- App D (preview public download):
preview.files.unsigned.sh/share/*with policy actionBypass.
- App A (production API):
-
Confirm there are no stale API bypass apps:
files.unsigned.sh/api/v2/share/*files.unsigned.sh/api/share/*r2-explorer-preview.exploit.workers.dev/api/*
-
Validate protected API routes (should redirect to Access login when unauthenticated):
curl -I https://files.unsigned.sh/api/v2/list
curl -I https://preview.files.unsigned.sh/api/v2/list- Validate public token route (no Access redirect):
curl -I https://files.unsigned.sh/share/<token-id>
curl -I https://preview.files.unsigned.sh/share/<token-id>- Validate Service Auth on API route:
curl -i \
-H "CF-Access-Client-Id: <service-token-client-id>" \
-H "CF-Access-Client-Secret: <service-token-client-secret>" \
https://files.unsigned.sh/api/v2/session/info
curl -i \
-H "CF-Access-Client-Id: <preview-service-token-client-id>" \
-H "CF-Access-Client-Secret: <preview-service-token-client-secret>" \
https://preview.files.unsigned.sh/api/v2/session/info- Validate Worker share-management with service-token headers:
export R2_EXPLORER_ACCESS_CLIENT_ID="<service-token-client-id>"
export R2_EXPLORER_ACCESS_CLIENT_SECRET="<service-token-client-secret>"
r2 share worker create files workspace/demo.txt 10m --max-downloads 1-
/api/v2/*requires Access-authenticated session. -
/share/<token-id>is reachable without Access membership and still enforces token validity. -
/api/v2/share/*is never an AccessBypasspath. - Worker is configured with
R2E_ACCESS_TEAM_DOMAINandR2E_ACCESS_AUD, and/api/v2/*rejects invalid or missing Access JWT assertions. - Preview Worker is configured with
R2E_ACCESS_AUD_PREVIEWmatching the preview API app audience.
-
/share/*redirects to Access login:- bypass policy missing, disabled, or shadowed by another app rule.
-
r2 share worker createfails withHTTP 302or401:- CLI request missing
R2_EXPLORER_ACCESS_CLIENT_IDorR2_EXPLORER_ACCESS_CLIENT_SECRET. - Service token is not included by a
Service Authpolicy on/api/v2/*. -
R2E_ACCESS_AUD/R2E_ACCESS_AUD_PREVIEWdoes not match app audience.
- CLI request missing
-
/api/v2/*is publicly reachable:- API app missing, disabled, or host/path mismatch.
- Mixed behavior across clients:
- stale DNS/session/cache state; retest with clean session.
- Reapply last known-good policy model per host:
-
/api/v2/*withAllow+Service Auth. -
/share/*withBypass.
-
- Re-run both curl checks for protected and public path behavior.
- Audit policy edits and actor history in Cloudflare account logs.
- Record policy IDs, order, and change timestamp.
- Document blast radius and any temporarily exposed paths.
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