logicsrc/apps/pwa/test
Anthony Ettinger 8528634e09 vault: opt-in paid email recovery for the personal vault ($5 lifetime)
A second way back into a logicsrc personal vault when the master password and
the offline recovery key are both gone, without the server holding anything
that alone (even with the DB and server env) opens the vault.

Client (packages/opencreds): random escrow key E encrypts the user key K
(AES-256-GCM, AAD "<ns>:vault:email-escrow:v1|<createdAt>"); E is split into
S (random, to the server) and U = E XOR S (emailed once as a checksummed
Crockford recovery code, never stored). `recover --email` checks the code's
check group first, asks the server for a one-time code, claims S, recombines
E, proves K against an item, sets a new password, issues a new offline
recovery key and re-enrolls with fresh shares (warns loudly if that fails).
New `recovery status|buy|enable|disable` commands; the CLI client lives in
packages/cli/src/vault-sync.ts.

Server (apps/pwa): /api/opencreds/recovery/{checkout,enroll,start,claim} +
status/disable. S is sealed under VAULT_ESCROW_KEY (versioned for rotation,
AAD binds the user). Enrollment is pending until the email with U is sent,
else rolled back. One-time codes: 8 digits, HMAC at rest, 15 min, 5 tries,
single use, 3 starts/hour; claims are audited and announced by email.
Purchase via CoinPay checkout (purpose vault_recovery); /api/coinpay/webhook
now verifies once and dispatches by purpose, auto_rotation unchanged.
Settings card with status and a Buy button. Migration 014 in both dialects.

Docs: security.md and crypto.md "Email recovery (opt-in, paid)" sections with
the honest trade-off; cli.md command reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:20:54 +00:00
..
app-grants.test.mjs App grants: one secret sealed to an external app (key hub phase 1) (#286) 2026-11-11 05:16:37 -08:00
appbar.test.mjs fix(pwa): unbreak sign-out, and stop echoing $PUBLIC_ORIGIN in the CLI hint (#108) 2026-07-30 10:56:36 -07:00
auto-rotation.test.mjs feat(rotation): buy automatic rotation, $29 per team per 30 days (CoinPay) (#272) 2026-10-29 05:12:01 +00:00
cli-hint.test.mjs feat(credentials): link directories to team secrets (#129) 2026-08-04 17:17:04 -07:00
credshare-rekey.test.mjs security: harden credentials app after the 2026-10-27 dev2 incident (CLI 0.10.0) 2026-10-28 16:04:22 +00:00
credshare-vaults.test.mjs security: harden credentials app after the 2026-10-27 dev2 incident (CLI 0.10.0) 2026-10-28 16:04:22 +00:00
identity-hardening.test.mjs security: harden credentials app after the 2026-10-27 dev2 incident (CLI 0.10.0) 2026-10-28 16:04:22 +00:00
keyring-share.test.mjs feat(keyring): revocable share link for SSH public keys (#267) 2026-10-29 01:57:47 +00:00
keyring.test.mjs feat(keyring): end-to-end encrypted keyring for SSH keys and key pairs, optional cloud sync (CLI 0.12.0) 2026-10-28 18:45:46 +00:00
machine-keys.test.mjs security: keep signing keys out of deployable team vaults (CLI 0.13.0) (#264) 2026-10-28 19:31:28 +00:00
opencreds-sync.test.mjs vault: autosync the personal vault to the logicsrc account (#226) 2026-10-04 03:45:25 -07:00
origin.test.mjs fix(pwa): return the caller's own host in the CLI device-flow URLs (#105) 2026-07-30 09:19:37 -07:00
ring-footer.test.mjs Use the latest shared footer (#277) 2026-10-31 07:14:35 +00:00
rotation.test.mjs feat(rotation): buy automatic rotation, $29 per team per 30 days (CoinPay) (#272) 2026-10-29 05:12:01 +00:00
seo.test.mjs app.logicsrc.com: sitemap.xml + robots Sitemap line (public pages only) (#294) 2026-11-22 08:03:57 -08:00
signing-keys.test.mjs security: keep signing keys out of deployable team vaults (CLI 0.13.0) (#264) 2026-10-28 19:31:28 +00:00
signup-profile.test.mjs feat(pwa): signup profile fields via @profullstack/profile (#256) 2026-10-26 04:24:44 -07:00
team-members.test.mjs security: harden credentials app after the 2026-10-27 dev2 incident (CLI 0.10.0) 2026-10-28 16:04:22 +00:00
vault-page.test.mjs Add one-click unlock for all granted vaults 2026-10-30 22:51:34 +00:00
vault-recovery.test.mjs vault: opt-in paid email recovery for the personal vault ($5 lifetime) 2026-11-30 15:20:54 +00:00