mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-19 01:51:11 +08:00
Three related robustness fixes for the cloud pairing flow: 1. Trusted license public keys are env-configurable (ZPAN_LICENSE_PUBLIC_KEYS) instead of hardcoding dev keys in source — a leaked dev key is rotated via config and never baked into production builds. Registered in all platform factories. 2. Certificate verification surfaces a specific rejection reason (signature/issuer/instance/expired/host), and the pairing modal distinguishes a cert-verification failure from a genuine timeout instead of showing both as "expired". On failure the poll handler rolls back the orphaned cloud binding. 3. After verifying + storing the certificate, the instance confirms the binding to the cloud (zpan-cloud-sdk 2.1.0's POST /licenses/:id/confirm) so the cloud pairing page resolves to success only once the instance actually accepted it. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
742 B
Plaintext
19 lines
742 B
Plaintext
# Local development secrets for `wrangler dev` / `vite dev`.
|
|
# Copy this file to `.dev.vars` (gitignored) and fill in real values.
|
|
|
|
# Required: better-auth signing secret. Generate with: openssl rand -base64 32
|
|
BETTER_AUTH_SECRET=
|
|
|
|
# Local ZPan URL.
|
|
BETTER_AUTH_URL=http://localhost:5185
|
|
TRUSTED_ORIGINS=http://localhost:5185
|
|
|
|
# Local ZPan Cloud URL.
|
|
ZPAN_CLOUD_URL=http://localhost:5186
|
|
|
|
# Trusted license signing public keys (PASERK k4.public.*, comma-separated).
|
|
# Dev keys are configured here — NOT hardcoded in source — so a leaked dev key is
|
|
# rotated via config and never trusted by production builds. Pair this with the
|
|
# matching LICENSE_SIGNING_KEY in zpan-cloud/.dev.vars (run `npm run gen-keypair`).
|
|
ZPAN_LICENSE_PUBLIC_KEYS=
|