Skip to content

Teach agents to use Access service tokens - #269

Merged
kale-stew merged 2 commits into
mainfrom
kylie/access-service-tokens
Nov 6, 2026
Merged

kale-stew merged 2 commits into
mainfrom
kylie/access-service-tokens

Conversation

@kale-stew

Copy link
Copy Markdown
Member

Takes over #98. Nothing on main tells an agent what to do when it reaches a Cloudflare Access login page. This teaches it to check for an authorized service token and send it correctly.

What changed

  • skills/cloudflare-one/SKILL.md: an "Access-Protected Webpages and APIs" section with the CF-Access-Client-Id / CF-Access-Client-Secret header pair. It covers:
    • the Service Auth policy requirement
    • secret handling and cross-origin redirects
    • single-header mode
    • The description also triggers on non-browser clients reaching Access-protected resources.
  • skills/cloudflare/SKILL.md: a routing row that sends these requests to cloudflare-one.
  • README.md: the cloudflare-one row mentions service-token access.

Changes from #98

These follow the review on #98:

  • Rebased onto current main.
  • Docs links use index.md routes (Cleanup docs links, prefer explicit markdown routes #211).
  • Left the cloudflare skill's description and README row unchanged; the routing row is enough to reach cloudflare-one.
  • Added single-header mode behavior from the docs: failures return 401 or 403 instead of redirecting, and no CF_Authorization cookie is returned, so every request needs the header.
  • Dropped the undocumented CF_ACCESS_CLIENT_ID / CF_ACCESS_CLIENT_SECRET names.
  • Reworded the API-token bullet to state only that service tokens are a separate credential. The docs don't say what an API token does at an Access application.

Validation

When a non-browser client hits a Cloudflare Access login page, check for
an authorized service token and send its header pair on the original
request. Cover Service Auth policies, secret handling, cross-origin
redirects, and single-header mode. Route these requests from the
cloudflare skill to cloudflare-one.

Co-authored-by: scottbuscemi <4336848+scottbuscemi@users.noreply.github.com>
Co-authored-by: Brendan Irvine-Broque <1221592+irvinebroque@users.noreply.github.com>

@acoyfellow acoyfellow left a comment

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.

Thanks for picking this up. It all checks out against the docs except one bullet. Details are inline.

reviewed-sha: 5230d02

Comment thread skills/cloudflare-one/SKILL.md Resolved
Co-authored-by: Jordan Coeyman <coeyman@gmail.com>
@kale-stew
kale-stew merged commit 0ebb241 into main Nov 6, 2026
4 checks passed
@kale-stew
kale-stew deleted the kylie/access-service-tokens branch November 6, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants