-
Notifications
You must be signed in to change notification settings - Fork 0
Operators Access Policy Split
github-actions[bot] edited this page Feb 25, 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 (protected):
files.unsigned.sh/*with policy actionAllowfor trusted identities. - App B (public download bypass):
files.unsigned.sh/share/*with policy actionBypass. - App C (HMAC admin bypass):
files.unsigned.sh/api/share/*with policy actionBypass.
- App A (protected):
-
Confirm the more-specific bypass apps (
/share/*and/api/share/*) take precedence over the broad/*app. -
Validate protected root and API routes (should redirect to Access login when unauthenticated):
curl -I https://files.unsigned.sh/
curl -I https://files.unsigned.sh/api/list- Validate public token route (no Access redirect):
curl -I https://files.unsigned.sh/share/<token-id>- Validate Worker share-management works without an Access browser session:
r2 share worker create files workspace/demo.txt 10m --max-downloads 1-
/api/*requires Access-authenticated session. -
/share/<token-id>is reachable without Access membership and still enforces token validity. -
/api/share/*is reachable without Access membership but still requires Worker admin HMAC (or Access JWT) and should not become public200. - Worker is configured with
R2E_ACCESS_TEAM_DOMAINandR2E_ACCESS_AUD, and/api/*rejects invalid or missing Access JWT assertions.
Notes:
- When
/api/share/*is an AccessBypass, Access does not injectCf-Access-Jwt-Assertionon those requests. A logged-in browser session can still be authenticated by the Worker via theCF_Authorizationcookie. CLI callers should use HMAC admin headers.
-
/share/*redirects to Access login:- bypass policy missing, disabled, or lower precedence than broad rule.
-
r2 share worker createfails withHTTP 302:-
/api/share/*bypass is missing, so Access is intercepting HMAC traffic. - If bypass is intentionally disabled, set
R2_EXPLORER_ACCESS_CLIENT_ID/R2_EXPLORER_ACCESS_CLIENT_SECRETfor CLI calls so Access service-token auth is presented at the edge.
-
-
/api/*is publicly reachable:- broad access policy too permissive or bypass too broad.
- Mixed behavior across clients:
- stale DNS/session/cache state; retest with clean session.
- Reapply last known-good policy pair:
-
/*allow for org identities. -
/share/*bypass only.
-
- 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