Skip to content

secondsky/claude-skills / plugins/cloudflare-zero-trust-access/skills/cloudflare-zero-trust-access

cloudflare-zero-trust-access

Verified

Cloudflare Zero Trust Access authentication for Workers. Use for JWT validation, service tokens, CORS, or encountering preflight blocking, cache race conditions, missing JWT headers.

templates/.env.example

View on GitHub
# Cloudflare Zero Trust Access - Environment Variables
#
# Copy this to .env.local for local development
# DO NOT commit .env.local to git!
#
# For production, set these using Wrangler secrets:
# npx wrangler secret put ACCESS_TEAM_DOMAIN
# npx wrangler secret put ACCESS_AUD

# ============================================================================
# REQUIRED: Access Configuration
# ============================================================================

# Your Cloudflare Access team domain (without https://)
# Find this in: Zero Trust Dashboard > Settings > Custom Pages
# Example: your-team.cloudflareaccess.com
ACCESS_TEAM_DOMAIN=your-team.cloudflareaccess.com

# Application Audience (AUD) tag
# Find this in: Zero Trust Dashboard > Access > Applications > Your App
# Click on your application > Copy the "Application Audience" value
# Example: abc123def456ghi789jkl012mno345pqr678stu901vwx234yz
ACCESS_AUD=your-app-aud-tag-here

# ============================================================================
# OPTIONAL: Service Tokens (for machine-to-machine auth)
# ============================================================================

# Service Token Client ID
# Create in: Zero Trust Dashboard > Access > Service Auth > Create Service Token
# Example: abc123.access
# SERVICE_TOKEN_ID=

# Service Token Client Secret
# IMPORTANT: Only shown once when creating token! Store securely.
# SERVICE_TOKEN_SECRET=

# ============================================================================
# OPTIONAL: CORS Configuration
# ============================================================================

# Frontend application URL (for CORS)
# FRONTEND_URL=https://app.example.com

# ============================================================================
# OPTIONAL: Multi-Tenant Configuration
# ============================================================================

# Default tenant ID (if using multi-tenant pattern)
# DEFAULT_TENANT_ID=default

# ============================================================================
# DEVELOPMENT: Local Testing
# ============================================================================

# For local development with Wrangler
# Note: Access won't work locally without proper setup
# Consider mocking JWT for local dev

# Mock JWT for local testing (base64 encoded)
# MOCK_JWT_ENABLED=true
# MOCK_USER_EMAIL=dev@example.com

# ============================================================================
# SETUP INSTRUCTIONS
# ============================================================================

# 1. Copy this file:
#    cp .env.example .env.local

# 2. Fill in your values:
#    - ACCESS_TEAM_DOMAIN: From Zero Trust Dashboard
#    - ACCESS_AUD: From your Access Application

# 3. For service tokens (optional):
#    - Create token in Zero Trust Dashboard
#    - Copy ID and Secret to SERVICE_TOKEN_ID and SERVICE_TOKEN_SECRET

# 4. For production:
#    - DO NOT use .env files in production
#    - Set secrets via Wrangler:
#      npx wrangler secret put ACCESS_TEAM_DOMAIN
#      npx wrangler secret put ACCESS_AUD
#      npx wrangler secret put SERVICE_TOKEN_ID
#      npx wrangler secret put SERVICE_TOKEN_SECRET

# 5. Add to .gitignore:
#    echo ".env.local" >> .gitignore

# ============================================================================
# FINDING YOUR ACCESS CONFIGURATION
# ============================================================================

# ACCESS_TEAM_DOMAIN:
# 1. Go to https://one.dash.cloudflare.com/
# 2. Select your account
# 3. Go to Zero Trust > Settings > Custom Pages
# 4. Your team domain is shown at the top (e.g., "your-team.cloudflareaccess.com")

# ACCESS_AUD:
# 1. Go to Zero Trust > Access > Applications
# 2. Click on your application
# 3. Scroll down to "Application Audience"
# 4. Copy the AUD tag (long alphanumeric string)

# ============================================================================
# SECURITY NOTES
# ============================================================================

# ⚠️ NEVER commit .env.local or .env files to git
# ⚠️ NEVER hardcode secrets in your code
# ⚠️ Always use Wrangler secrets for production
# ⚠️ Rotate service tokens regularly (quarterly recommended)
# ⚠️ Use different credentials for dev/staging/production
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall