Light
Dark
All diagrams ← CDN script Data flow (A) →
Candid Leap · WF-Algolia

Deep Dive — Security & Infrastructure

Authenticated boundary
Encryption
Pipeline
Trust boundariesEvery hop authenticated — no anonymous ingress

Designer → Backend

webflow.getIdToken() → POST /auth/resolve-id-token → JWT HS256, 60-min TTL. assertSiteMatch blocks cross-site (IDOR) access; silent re-auth on 401.

JWT HS25660-min TTL

Webflow → CF Worker

HMAC-SHA256 over timestamp:rawBody; headers x-webflow-signature + x-webflow-timestamp. Constant-time crypto.subtle.verify.

HMAC-SHA256±5-min replay window

CF Worker → Backend

x-shared-secret header on every internal call; 100 req/s limiter on /internal.

shared secret100 req/s

Force-reindex gate

5-min HS256 confirmation token minted by the sync-cost-preview endpoint, plus a 5-min per-mapping cooldown.

5-min token5-min cooldown

Browser exposure

Published site sees only the public search-only Algolia key; the extension JWT lives in memory; zero secrets in the CDN script.

search-only keyno secrets shipped
Secrets at restSecrets never reach the browser

Fail-fast env

Zod schema validates env at boot — JWT_SECRET ≥ 32 chars, ENCRYPTION_KEY exactly 64 hex chars; missing vars stop boot.

Zod schemamissing vars stop boot

AES-256-GCM

Webflow OAuth token + Algolia admin key encrypted as v1:iv:tag:ciphertext. Boot guard assertCredentialsEncrypted fails startup if plaintext rows exist; API responses + logs redact secrets.

v1:iv:tag:ciphertextredacted in responses + logs
CI/CD — GitHub Actions4 workflows

ci.yml — per PR

lint · typecheck · reconcile gate · build · backend / extension / shared-types / script tests · security audit.

Playwright 68 tests × 3 browsers = 204 runs

publish-script.yml

Manual dispatch: semver bump → npm publish @latest → git tag + GitHub release. jsDelivr resolves @major natively — no dist-tag step.

manual dispatchdry-run mode

deploy-docs.yml

Docusaurus build → Cloudflare Pages.

cf-worker.yml

Worker tests; the deploy job is a disabled stub — deploys are manual wrangler deploy --env <env>.

deploy stub disabledmanual wrangler
EnvironmentsAll infra US-region

Staging

worker wf-algolia-ingress-staging · queue webflow-sync-staging + webflow-sync-staging-dlq · backend https://staging-wfa.candidleap.com

Production

worker wf-algolia-ingress · queue webflow-sync + webflow-sync-dlq · backend https://api.candidleap.com

Queues — shared config

DLQ retention is set post-deploy via wrangler queues update (platform default 4 days; target 14 days) — not in wrangler.toml.

max_retries 5retry_delay 1800 s (30 min)max_batch_size 1

Runtime hosts

Railway (Express, always-on for workers/cron) · MongoDB Atlas — OAuth token + Algolia admin key at rest · Cloudflare Workers + Queues · CF Pages (Docusaurus docs) · npm + jsDelivr (script CDN).

all US-region