Skip to content

[Workers] Add Cloudflare Access configuration docs#31730

Open
chythram05 wants to merge 4 commits into
cloudflare:productionfrom
chythram05:chythra/workers-access-dev-docs
Open

[Workers] Add Cloudflare Access configuration docs#31730
chythram05 wants to merge 4 commits into
cloudflare:productionfrom
chythram05:chythra/workers-access-dev-docs

Conversation

@chythram05

Copy link
Copy Markdown

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

  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 2 warnings, 💡 2 suggestions found in full PR diff.

Fan Out Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (1)
File Issue
workers/configuration/cloudflare-access.mdx line 30 Inconsistent dashboard option label — The summary table tells users to choose **Previews & Production**, but the step-by-step instructions for the same workflow (line 54) say the option is **Production & Previews**. Fix: Align the table cell with the steps by changing **Previews & Production** to **Production & Previews** on line 30.

Style Guide Review

Warnings (1)
File Issue
workers/configuration/cloudflare-access.mdx line 45 Avoid directional language — Image alt text uses above (Workers & Pages overview showing the Protect all Workers card above the Workers application list.) Fix: Rewrite the alt text to avoid directional language, e.g. describe the card position by name or location on the page.
Suggestions (2)
File Issue
workers/configuration/cloudflare-access.mdx line 13 Break semicolons into separate sentences — Sentence joins two independent clauses with a semicolon (Allowed visitors reach your Worker; everyone else runs into a login page or gets their request blocked.) Fix: Split into two sentences: Allowed visitors reach your Worker. Everyone else runs into a login page or gets their request blocked.
workers/configuration/cloudflare-access.mdx line 19 Short bullet lists as prose — Prerequisites list contains only two bullet items (A Cloudflare Zero Trust organization... and Permission to manage Workers...) Fix: Consider combining the two prerequisites into a single sentence or prose paragraph.
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/fan-out-review Forces a full review using the per-file fan-out mode regardless of diff size. Each file is reviewed in its own session for maximum per-file detail. ⚠️ This may take a very long time on large PRs and may fail or time out — use only when you want the most thorough review and are willing to wait.
/holistic-review Forces a full review using the holistic mode regardless of diff size. The entire diff is reviewed in one pass, enabling cross-file reasoning. Faster and more reliable on large PRs.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's two things here:

  1. 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
  2. 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@mvvmm

mvvmm commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

/full-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants