cloudflare-zero-trust-access

Integrate Cloudflare Zero Trust Access authentication into Hono Workers middleware.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-zero-trust-access
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-zero-trust-access
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/cloudflare-zero-trust-access
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-zero-trust-access

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @hono/cloudflare-access, hono, cloudflare_workers_types, and includes templates (resource) and references (resource) components.

What problem does it solve?

Integrates Cloudflare Access authentication with Cloudflare Workers using proven patterns (Hono middleware, JWT validation, service tokens, CORS handling, multi-tenant setups) to secure APIs and admin dashboards.

Core Features & Use Cases

  • Hono middleware integration for quick setup
  • Manual JWT validation workflows
  • Service tokens for machine-to-machine auth
  • CORS + Access pattern and multi-tenant configurations
  • Error prevention patterns and guidance

Quick Start

Install dependencies, configure wrangler.jsonc with environment variables, and implement a basic Hono app with cloudflareAccess middleware.

Frequently Asked Questions about cloudflare-zero-trust-access

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate Cloudflare Workers with Cloudflare Access?

Cloudflare Access authentication for Workers uses JWT validation and Hono middleware. Install @hono/cloudflare-access, configure environment variables in wrangler.jsonc, and apply the cloudflareAccess middleware to protected routes. The middleware validates tokens issued by Cloudflare's Zero Trust platform automatically.

Can I use Cloudflare Access for machine-to-machine authentication?

Yes, service tokens enable machine-to-machine authentication alongside user JWT validation. Configure service token authentication in your Worker to allow automated systems and APIs to authenticate without user interaction, supporting admin dashboards and inter-service communication.

How do I validate JWTs manually in Cloudflare Workers?

Manual JWT validation uses Web Crypto API within Cloudflare Workers to verify tokens directly without middleware. Extract the token, validate the signature against Cloudflare's public keys, and check claims—essential for custom workflows where Hono integration isn't suitable.

Does Cloudflare Access work with CORS in Workers?

Yes, this Skill includes patterns for combining Cloudflare Access authentication with CORS configuration. Set headers correctly and order middleware to handle both token validation and cross-origin requests, with built-in error prevention for common conflicts.

What's required to set up multi-tenant access control with Cloudflare Workers?

Multi-tenant configurations leverage Access tokens and environment-driven settings to isolate tenants. Use JWT claims to route requests to tenant-specific resources and configure separate Access policies per tenant, with TypeScript typings to prevent configuration errors.

Can I test Cloudflare Access integration locally?

Testing helpers and production-ready type definitions support local and staging validation. Mock tokens and test error prevention patterns before deploying, ensuring JWT validation, middleware ordering, and service token flows work correctly in your environment.