secondsky/claude-skills / plugins/cloudflare-zero-trust-access/skills/cloudflare-zero-trust-access
cloudflare-zero-trust-access
VerifiedCloudflare Zero Trust Access authentication for Workers. Use for JWT validation, service tokens, CORS, or encountering preflight blocking, cache race conditions, missing JWT headers.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.1 KB |
| references/access-policy-setup.md | markdown | 13.5 KB |
| references/common-errors.md | markdown | 15.1 KB |
| references/jwt-payload-structure.md | markdown | 12.8 KB |
| references/quick-start.md | markdown | 1.8 KB |
| references/service-tokens-guide.md | markdown | 15.3 KB |
| references/use-cases.md | markdown | 8.1 KB |
| references/value-proposition.md | markdown | 1.6 KB |
| scripts/create-service-token.shexecutable | script | 8.3 KB |
| scripts/test-access-jwt.shexecutable | script | 10.8 KB |
| templates/.env.example | other | 4.2 KB |
| templates/cors-access.ts | script | 8.1 KB |
| templates/hono-basic-setup.ts | script | 3.8 KB |
| templates/jwt-validation-manual.ts | script | 6.6 KB |
| templates/multi-tenant.ts | script | 10.1 KB |
| templates/service-token-auth.ts | script | 7.5 KB |
| templates/types.ts | script | 8.5 KB |
| templates/wrangler.jsonc | other | 3.9 KB |
references/quick-start.md
View on GitHub# Quick Start Guide: Cloudflare Zero Trust Access
**Purpose**: Step-by-step setup for new users integrating Access authentication with Hono middleware
**Use When**: Setting up Zero Trust Access for the first time, configuring Access for a new Worker, or verifying basic authentication flow
**Time to Complete**: 15-20 minutes
---
## Quick Start
### 1. Install Package
```bash
bun add hono @hono/cloudflare-access
```
### 2. Configure Access
**Dashboard**:
1. Go to Zero Trust > Access > Applications
2. Create application for your Worker domain
3. Create policy (e.g., "Emails ending in @company.com")
4. Copy Application Audience (AUD) tag
**wrangler.jsonc**:
```jsonc
{
"vars": {
"ACCESS_TEAM_DOMAIN": "your-team.cloudflareaccess.com",
"ACCESS_AUD": "your-aud-tag"
}
}
```
### 3. Add to Worker
Use `templates/hono-basic-setup.ts` as starting point:
```typescript
import { Hono } from 'hono'
import { cloudflareAccess } from '@hono/cloudflare-access'
const app = new Hono<{ Bindings: Env }>()
app.use('/admin/*', cloudflareAccess({
domain: (c) => c.env.ACCESS_TEAM_DOMAIN
}))
app.get('/admin/dashboard', (c) => {
const { email } = c.get('accessPayload')
return c.json({ email })
})
export default app
```
### 4. Deploy and Test
```bash
bunx wrangler deploy
```
Access: `https://your-worker.example.com/admin/dashboard`
Expected: Redirect to Access login, then back to dashboard after auth.
---
**Next Steps**:
- Load `references/common-errors.md` for error prevention
- Load `references/jwt-payload-structure.md` for accessing user claims
- Load `references/access-policy-setup.md` for advanced policy configuration
**Related References**:
- `references/service-tokens-guide.md` - Machine-to-machine authentication
- `references/use-cases.md` - Detailed implementation examples
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |