Email recovery needs the recovery code from the enrollment email. People who
delete their mail lose it, and with it the only way back in.
`logicsrc vault recovery enable --assisted` (opt-in) replaces that code with a
fresh sign-in: recovery asks for the one-time code emailed at that moment and a
confirmation in the browser with a passkey of the account or its connected
CoinPay identity (bound by subject, never by email, never creating an account,
no session made).
- Server: U is kept sealed under VAULT_ESCROW_KEY in vault_recovery_assisted
(migration 015) only for accounts that ask. A step-up
(vault_recovery_stepups) is single use, lives ten minutes, names no account
and is approved only by a proof belonging to the account being recovered.
The second proof is checked before the one-time code, so a missing
confirmation never spends it. A claim without a confirmed step-up never
returns U. disable and a plain re-enroll delete the stored U.
- CLI: `passwd --email` and `vault recover --email` print the link, wait for
the confirmation, then ask for the one-time code. The re-arm keeps the mode.
- This mode is custodial: the server holds everything that opens the vault.
docs/opencreds/security.md says so; accounts that do not opt in keep the
split-key scheme unchanged.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
An account has one personal vault and one keyring, plus a local copy on each
machine. `logicsrc passwd` (and `--email`) changed this machine and left the
rest to manual commands: `vault sync`, then `keyring sync --use-remote` on
every other machine.
- passwd pulls the account's vault first and pushes it after. Without the
pull, a password set on another machine since the last sync won on the next
pull ("the account's wins") and silently replaced the one just chosen. It
also lets a freshly logged-in machine with no local vault reset by email.
- `keyring sync` takes the account's keyring without a flag in the two cases
where nothing can be lost: the same keyring under a newer password, or a
newer keyring that holds every key this machine has (the old one is still
backed up). Anything else stays a question, as before.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Email recovery reset the vault only. The SSH keyring kept its old passphrase,
so someone who had forgotten everything recovered the vault and was then
refused by `keyring restore` ("Wrong keyring passphrase").
- `logicsrc passwd --email`: opens the vault with the two emailed codes, then
puts the vault and the keyring under one new password. New vault recovery
key, email recovery re-armed, same end state as `vault recover --email`.
- Every `passwd` run stores the keyring's user key as an item in the vault
(found by a stable id, verified against a keyring entry before use), so the
vault's way back in is the keyring's too and nobody is asked a second secret.
- A keyring nothing opens is set aside (kept as keyring.bak-NNN) and started
fresh; keys whose files are still under ~/.ssh with the same fingerprint are
put back, the rest are named.
- The re-arm email after a recovery had the first-time wording ("run
logicsrc vault recover --email"), which read as an instruction to recover
again: three recoveries in five minutes on one account. It now says the
recovery is complete and there is nothing to do. The CLI says so too.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
backup() moved sync.json away with the old keyring, so the fresh keyring
never replaced the account copy (seen live on 2026-12-02; fixed by hand with
keyring sync --use-local).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(cli): logicsrc passwd: one password for the vault and the SSH keyring
The personal vault and the keyring each had their own password, so the
keyring prompt ("Keyring passphrase for id_ed25519") asked for a secret
nobody remembered. `logicsrc passwd` opens both (current password, or the
recovery key; it tries the vault password on the keyring first), asks for
one new password twice, and re-wraps both user keys under it. Not one item
is re-encrypted; recovery keys keep working. Nothing is written until both
stores are open.
The vault sync already follows a password change. The keyring sync compares
the wrapped key, so the account copy is replaced (the `keyring sync
--use-local` path). --reset-keyring starts a fresh keyring when its
passphrase and recovery key are both lost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* passwd: LOGICSRC_NEW_PASSWORD, so one script asks once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* passwd: audit the re-wrap as vault.rekey
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>