[Workers] Add Cloudflare Access configuration docs - #31730
Conversation
Review⏸️ Automatic reviews for this PR are paused. This PR has already received 2 automatic reviews. To run another review, a codeowner can comment
Fan Out Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
Style Guide ReviewWarnings (1)
Suggestions (2)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
| Access can protect one Worker's production `workers.dev` URL, preview URLs, or both. You can also protect all Workers or all Worker previews in an account. For setup instructions, refer to [Cloudflare Access](/workers/configuration/cloudflare-access/). | ||
|
|
||
| If your Worker relies on the signed-in user's identity, [validate the Access JWT](/workers/configuration/cloudflare-access/#use-signed-in-user-information-in-your-worker) in your Worker code. | ||
| If your Worker relies on the signed-in user's identity, [validate the Access JWT](/cloudflare-one/access-controls/applications/http-apps/authorization-cookie/validating-json/#cloudflare-workers-example) in your Worker code. |
There was a problem hiding this comment.
There's two things here:
- Validate the JWT as a defense in depth in case Access ever gets removed and you want to guarantee unauth'd users can't reach your app
- Use the get-identity endpoint (also in that link) to access information about the authenticated user to use in your application
| ### Protect one hostname, Custom Domain, or path {/* dashboard-protect-one-hostname-custom-domain-or-path */} | ||
|
|
||
| You can also configure Access for Workers by creating an Access application with a Worker destination. | ||
| Use hostname-based Access when a specific URL that routes to your Worker should require sign-in. This can protect a `workers.dev` hostname, a Custom Domain, a subdomain, or a path. |
There was a problem hiding this comment.
This could probably use an explainer that referencing a Worker is the entire Worker vs. using a hostname based Access app is truly just that explicit hostname.
| - `preview_worker`: Protect one Worker's preview deployments only. | ||
| - `all_workers`: Protect every Worker's production and preview deployments. | ||
| - `all_preview_workers`: Protect every Worker's preview deployments only. | ||
| - `my-worker.example.workers.dev` |
There was a problem hiding this comment.
might be worth linking to our dev doc about protecting subdomains, paths and using wildcards
|
|
||
| | Policy option | Result | | ||
| | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | Cloudflare account | Allows members of this Cloudflare account to sign in. Use this option when access should be limited to people who already belong to the account. | |
There was a problem hiding this comment.
hyperlink to our broader policy explanation section in Access
- Tighten intro and section copy; fix heading casing and toggle label ordering - Split JWT guidance into defense-in-depth vs. reading user identity - Clarify hostname vs. whole-Worker protection scope - Link to Application paths and Access policies docs
|
/full-review |
irvinebroque
left a comment
There was a problem hiding this comment.
What about these places?
|
Hey there, we've marked this pull request as stale because there's no recent activity on it. This label helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant). |
Summary
Adds a new Workers configuration page for Cloudflare Access. The page explains how to require sign-in for all Workers, one Worker, preview deployments, and specific hostnames or paths.
Also links the new page from the Workers configuration index and adds dashboard screenshots for the Access setup flows.
Screenshots (optional)
Documentation checklist