* feat(auth): implement ADR-001 Workstream C — ticket auth, SSRF, and pre-flight audit
C1: Boot-time ENCRYPTION_MASTER_KEY / AUTH_SECRET validation (instrumentation.ts);
remove silent fallback in encryption.ts; guard marketplace token from data-plane misuse.
C2: SSRF host-allowlist (PROXY_HOST_ALLOWLIST) in ssrf.ts; route iframe proxy through safeFetch.
C3: ticketClient.ts — exchanges long-lived API key for 5-min EdDSA ticket from Marketplace;
audience fixed to ENGINE_AUDIENCE='wwv-data-engine'; cache keyed by engine not plugin.
C4: WsClient.ts first-message auth — sends {type:'auth',v:1,token} on open; queues subscribes
until {type:'welcome'}; gated by ticketAuthEnabledForPlugin.
C5: edition.ts — ticketAuthEnabledForPlugin reads NEXT_PUBLIC_WWV_TICKET_AUTH_PLUGINS flag.
Step 0: docs/deploys/2026-05-21-adr-001-preflight.md + docs/feature-flags.md audit artifacts.
Tests: ticketClient.spec, WsClient.spec, ssrf.spec updated (342 passing).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): resolve three PR #171 type-check and startup failures
- auth-contracts.spec.ts: assert WebSocketAuthMessage.token as PluginTicket
(not SensitiveString — distinct branded types fail toEqualTypeOf equality)
- pkce.spec.ts: replace function(){return this} mock with arrow fn to fix
TS2683 implicit-this error in strict mode
- test-local-dev.yml: add ENCRYPTION_MASTER_KEY so instrumentation.ts boot
validation doesn't crash the startup test in CI
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): fix pkce mock constructor and env injection for startup test
- pkce.spec.ts: use function(this: object) instead of arrow fn so the
mock can be called with `new Configuration(...)` (arrow functions are
not constructors)
- test-local-dev.yml: sed-replace ENCRYPTION_MASTER_KEY in .env after
cp .env.example so Next.js instrumentation boot check passes in CI
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): also sed-replace AUTH_SECRET in .env for startup test
.env.example has AUTH_SECRET= (empty), which Next.js loads and overrides
the system env var, causing the same boot crash as ENCRYPTION_MASTER_KEY.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(setup): auto-generate ENCRYPTION_MASTER_KEY in setup.mjs
The Playwright CI workflow uses `pnpm run setup` which previously only
generated AUTH_SECRET. ENCRYPTION_MASTER_KEY remained empty from
.env.example, causing instrumentation.ts boot validation to crash.
This fix also improves the new-developer onboarding experience — both
required secrets are now generated in a single setup step.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
123 lines
3.8 KiB
JSON
123 lines
3.8 KiB
JSON
{
|
|
"name": "worldwideview",
|
|
"version": "2.17.4",
|
|
"private": true,
|
|
"type": "module",
|
|
"packageManager": "[email protected]",
|
|
"scripts": {
|
|
"setup": "node scripts/setup.mjs",
|
|
"test-worktree": "node scripts/test-worktree.mjs",
|
|
"clean": "node -e \"const fs=require('fs');fs.rmSync('.next',{recursive:true,force:true})\"",
|
|
"dev": "node scripts/dev.mjs",
|
|
"dev:all": "concurrently -n \"dev,backends\" -c \"magenta,blue\" \"pnpm dev\" \"pnpm dev:backends\"",
|
|
"dev:backends": "docker compose --profile engine up wwv-data-engine wwv-redis",
|
|
"dev:plugins": "node scripts/watch-local-plugins.mjs",
|
|
"predev": "node scripts/boot-db.mjs && npx dotenv-cli -c -- node scripts/safe-db-push.mjs && npx prisma generate && node scripts/copy-cesium.mjs && node scripts/sync-local-plugins.mjs",
|
|
"copy-cesium": "node scripts/copy-cesium.mjs",
|
|
"prebuild": "node scripts/check-build-env.mjs",
|
|
"build": "next build --webpack",
|
|
"start": "next start",
|
|
"test": "vitest run",
|
|
"test:e2e": "playwright test",
|
|
"test:mutate": "stryker run",
|
|
"lint": "eslint .",
|
|
"db:reset": "npx prisma migrate reset --force",
|
|
"db:prune": "node scripts/db-prune.mjs",
|
|
"generate": "prisma generate"
|
|
},
|
|
"dependencies": {
|
|
"@auth/prisma-adapter": "^2.11.2",
|
|
"@auth/supabase-adapter": "^1.11.2",
|
|
"@prisma/adapter-pg": "^7.8.0",
|
|
"@prisma/client": "^7.8.0",
|
|
"@prisma/client-runtime-utils": "7.8.0",
|
|
"@sentry/nextjs": "^10.53.1",
|
|
"@supabase/supabase-js": "^2.106.0",
|
|
"@types/pg": "^8.20.0",
|
|
"@vercel/analytics": "^1.6.1",
|
|
"@worldwideview/wwv-plugin-sdk": "workspace:*",
|
|
"bcryptjs": "^3.0.3",
|
|
"cesium": "^1.141.0",
|
|
"cheerio": "^1.2.0",
|
|
"hls.js": "^1.6.16",
|
|
"insecam-api": "^0.0.3",
|
|
"jose": "^6.2.3",
|
|
"lucide-react": "^1.16.0",
|
|
"next": "16.2.6",
|
|
"next-auth": "^5.0.0-beta.30",
|
|
"openid-client": "^6.8.4",
|
|
"pg": "^8.21.0",
|
|
"prisma": "^7.8.0",
|
|
"react": "19.2.6",
|
|
"react-dom": "19.2.6",
|
|
"react-player": "^3.4.0",
|
|
"resium": "1.21.1",
|
|
"satellite.js": "^7.0.1",
|
|
"stripe": "^22.1.1",
|
|
"tslib": "^2.8.1",
|
|
"undici": "^8.3.0",
|
|
"ws": "^8.20.1",
|
|
"zod": "^4.4.3",
|
|
"zustand": "^5.0.13"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/compat": "^2.1.0",
|
|
"@eslint/eslintrc": "^3.3.5",
|
|
"@playwright/test": "^1.60.0",
|
|
"@stryker-mutator/core": "^9.6.1",
|
|
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/bcryptjs": "^3.0.0",
|
|
"@types/cesium": "^1.70.4",
|
|
"@types/node": "^25",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@types/ws": "^8.18.1",
|
|
"@typescript-eslint/eslint-plugin": "^8.59.4",
|
|
"@typescript-eslint/parser": "^8.59.4",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"@vitest/coverage-v8": "4.1.6",
|
|
"concurrently": "^9.2.1",
|
|
"copy-webpack-plugin": "^14.0.0",
|
|
"eslint": "^9",
|
|
"eslint-config-airbnb": "^19.0.4",
|
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
"eslint-config-next": "^16.2.6",
|
|
"eslint-plugin-import": "^2.32.0",
|
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"fast-check": "^4.8.0",
|
|
"jsdom": "^28.1.0",
|
|
"rollup-plugin-external-globals": "^0.13.0",
|
|
"tree-kill": "^1.2.2",
|
|
"tsx": "^4.22.2",
|
|
"typescript": "^5",
|
|
"vite": "^8.0.13",
|
|
"vitest": "^4.1.6"
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"@spz-loader/core": "0.3.0",
|
|
"form-data@<2.5.4": "^2.5.5",
|
|
"form-data@>=3.0.0 <3.0.4": "^3.0.4",
|
|
"form-data@>=4.0.0 <4.0.4": "^4.0.5",
|
|
"fast-uri@<3.1.2": "^3.1.2"
|
|
},
|
|
"onlyBuiltDependencies": [
|
|
"@prisma/engines",
|
|
"@sentry/cli",
|
|
"prisma",
|
|
"protobufjs",
|
|
"sharp",
|
|
"esbuild",
|
|
"better-sqlite3"
|
|
]
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0",
|
|
"pnpm": ">=9.0.0"
|
|
}
|
|
}
|