Skip to content

[Workers] Document Access Service Auth setup for remote bindings - #31021

Merged
petebacondarwin merged 19 commits into
productionfrom
docs/access-protected-remote-bindings
May 22, 2026
Merged

[Workers] Document Access Service Auth setup for remote bindings#31021
petebacondarwin merged 19 commits into
productionfrom
docs/access-protected-remote-bindings

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Expands the Wrangler remote bindings docs to document the full Cloudflare Access Service Auth setup required when running Wrangler against an Access-protected Worker. Previously the only guidance was a single bullet noting the CLOUDFLARE_ACCESS_CLIENT_ID / CLOUDFLARE_ACCESS_CLIENT_SECRET env vars exist, with no mention of the Access policy or service token setup needed for those vars to work.

This change:

  • Promotes the existing one-line bullet under "Important Considerations" into a new ### Connecting to Access-protected Workers subsection on the remote bindings page.
  • Adds a 3-step <Steps> procedure covering: attaching a Service Auth policy to the existing Access application that protects the Worker's hostname, creating a service token, and exposing the credentials to Wrangler.
  • Includes the OpenNext-discovered caveat that creating a separate Access app scoped to the Worker hostname can block requests, with a link to opennextjs-cloudflare#1171.
  • Cross-links the CLOUDFLARE_ACCESS_CLIENT_ID / CLOUDFLARE_ACCESS_CLIENT_SECRET entries on the system environment variables page to the new subsection.

Prompted by cloudflare/workers-sdk#14008, which fixes a bug where Wrangler ignored these env vars when the Access app was configured to only accept Service Auth tokens. With that fix in place, the documented service-token flow now works reliably against the configuration OpenNext recommends, so the full setup steps are worth documenting in our own docs rather than only on the OpenNext side.

Documentation checklist

@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK, @cloudflare/dev-plat-leads
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/product-owners, @MattieTK

@ask-bonk ask-bonk Bot added product:access Related to Access product triage Waiting for a docs team review. labels May 22, 2026
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Review complete for PR #31021.

Added labels: product:access, triage

Posted a review with 4 inline suggestions:

  • CRITICALsrc/content/docs/workers/development-testing/index.mdx line 328: *.<account>.workers.dev contains an unescaped JSX tag (<account>) that will break the MDX build. Suggested wrapping it in backticks.
  • MEDIUM — Line 314: "Worker's custom route" uses a possessive on an inanimate object; rephrased per style guide.
  • MEDIUM — Line 338: Nested dashboard paths use instead of the required plain > separator.
  • LOW — Lines 345–346: Placeholder values use lowercase (<client-id>) instead of the style guide's ALL_CAPS_UNDERSCORES format.

I also flagged that the documentation style guide checklist in the PR description is still unchecked.

github run

petebacondarwin and others added 4 commits May 22, 2026 16:27
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
@petebacondarwin
petebacondarwin marked this pull request as ready for review May 22, 2026 15:29
devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread src/content/docs/workers/development-testing/index.mdx Outdated
Comment thread src/content/docs/workers/development-testing/index.mdx Outdated
Comment thread src/content/docs/workers/development-testing/index.mdx Outdated
Comment thread src/content/docs/workers/development-testing/index.mdx Outdated
Comment thread src/content/docs/workers/development-testing/index.mdx Outdated
petebacondarwin and others added 3 commits May 22, 2026 17:16
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@ascorbic

Copy link
Copy Markdown
Contributor

Ah, approved before seeing the Devin style guide follow-ups

petebacondarwin and others added 6 commits May 22, 2026 17:34
….mdx

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
….mdx

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@petebacondarwin
petebacondarwin enabled auto-merge (squash) May 22, 2026 17:17
@petebacondarwin
petebacondarwin merged commit 742a8a6 into production May 22, 2026
11 checks passed
@petebacondarwin
petebacondarwin deleted the docs/access-protected-remote-bindings branch May 22, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:access Related to Access product product:workers Related to Workers product size/s triage Waiting for a docs team review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants