feat(security): add strictness settings schema, multi-auth migration, and EmergencyRecoveryService

This commit is contained in:
tyuXX 2026-11-26 21:17:46 +00:00
parent 4ac7b5d1b4
commit f3d05db412
5 changed files with 365 additions and 1 deletions

View file

@ -270,6 +270,19 @@ export class VaultService {
return cred ? structuredClone(cred) : undefined;
}
exportMasterKeyHex(): string | null {
return this.masterKey ? this.masterKey.toString('hex') : null;
}
exportAllCredentials(): Record<string, VaultCredential> {
this.assertUnlocked();
const out: Record<string, VaultCredential> = {};
for (const [id, cred] of this.credentials.entries()) {
out[id] = structuredClone(cred);
}
return out;
}
upsertCredential(input: VaultCredentialInput): VaultCredentialMeta {
this.assertUnlocked();
const now = new Date().toISOString();