Cloudflare Access secured with Auth0 and PassKey only login
Terraform configuration for my infrastructure
- Cloudflare Access is secured with Auth0
- Auth0 Action and Forms enforce login with PassKey only
- A Cloudflare tunnel accessible via SSH at meerkat.patkub.vip
Create terraform.tfvars with:
# Cloudflare Account Email
cf_email = "..."
# Cloudflare Global API Key ( https://dash.cloudflare.com/profile/api-tokens )
cf_api_key = "..."
# Cloudflare Domain Overview Account ID
cf_account_id = "..."
# Cloudflare Domain Overview API Zone ID
cf_zone_id = "..."
# Auth0 M2M Application Details
AUTH0_DOMAIN = "..."
AUTH0_CLIENT_ID = "..."
AUTH0_CLIENT_SECRET = "..."
# Passkey Policy Settings
# Number of logins without a passkey (min: "1")
MAX_LOGINS_WITHOUT_PASSKEY = "3"Run:
terraform init
terraform applyFollow: Short-lived certificates (legacy)
Configure server with:
chmod +x ./scripts/server/install.sh
./scripts/server/install.sh./scripts/server/sshd/sshd.sh- Setup sshd for Meerkat
Reference: Connect to SSH with client-side cloudflared (legacy)
Configure client devices with:
chmod +x ./scripts/client/install.sh
./scripts/client/install.sh- Adds client-side cloudflared SSH host for meerkat
- Patches SDKMAN! to automatically import Cloudflare Zero Trust certificate when installing a Java JDK
./scripts/client/ssh/ssh.sh- Adds SSH host for meerkat./scripts/client/sdkman/patch.sh- Patches SDKMAN!
Install dependencies
pnpm installLint
pnpm lint- Lint with biome and apply changespnpm lint:check- Check linting with biomepnpm format- Format with biome and apply changespnpm format:check- Check formatting with biome
Run tests
pnpm test- Run unit testspnpm test:watch- Automatically re-run tests when files change