mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-17 05:43:36 +00:00
feat(crypto): boot-time DEK migration to system-wrapped v3 format
utils/crypto-migration/dek-migration.ts carries the legacy unwrap paths (PBKDF2 password KEK, OIDC/WebAuthn system keys, hardcoded-default fallback) and migrates every server-unwrappable DEK to the v3 wrap at startup. Password-wrapped DEKs migrate at next login or from a live session via adoptRecoveredDEK. Legacy rows are kept for now; cleanup flips on once the new path is authoritative.
This commit is contained in:
@@ -117,6 +117,13 @@ import {
|
||||
operation: "backend_init_db",
|
||||
});
|
||||
|
||||
const { UserKeyManager } = await import("./utils/user-keys.js");
|
||||
await UserKeyManager.getInstance().initialize();
|
||||
|
||||
const { runBootDekMigration } =
|
||||
await import("./utils/crypto-migration/dek-migration.js");
|
||||
await runBootDekMigration();
|
||||
|
||||
const authManager = AuthManager.getInstance();
|
||||
await authManager.initialize();
|
||||
DataCrypto.initialize();
|
||||
|
||||
Reference in New Issue
Block a user