mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-04 02:29:06 +00:00
feat(passwd): logicsrc passwd --email resets the vault and the keyring with one password (#302)
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>
This commit is contained in:
parent
f10c94ca38
commit
ef965b0aaa
6 changed files with 517 additions and 20 deletions
|
|
@ -566,7 +566,8 @@ export function registerCredsCommands(parent: Command, options: RegisterOptions
|
|||
if (result.reenrolled) {
|
||||
process.stdout.write(
|
||||
`Email recovery is re-armed: a NEW recovery code was emailed to ${result.reenrolledEmail}. ` +
|
||||
"The code you just used no longer works.\n",
|
||||
"The code you just used no longer works.\n" +
|
||||
"You are done. That email is only the replacement code to keep: it does not ask you to recover again.\n",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue