fix: remove persisted jwt_secret from DB and migration code

The jwt_secret was stored in app_secrets table and migrated from settings
table. Since JWT signing secret is now ephemeral (generated fresh each boot),
remove the migration code that moved jwt_secret between tables.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
DaLaw2 2026-04-03 19:35:25 +08:00
parent 91dfa7924a
commit dff51ba6bf

View File

@ -186,17 +186,6 @@ impl SecretStore {
count += 1;
}
// 3. Migrate jwt_secret
if let Some(secret) = self.db.get_setting("jwt_secret")?
&& secret != "__encrypted__"
&& !secret.is_empty()
{
self.set_secret("jwt_secret", &secret)?;
self.db.set_setting("jwt_secret", "__encrypted__")?;
log!(CryptoLog::SecretMigrated("jwt_secret".to_string()));
count += 1;
}
self.db.set_setting("secrets_migrated", "true")?;
log!(CryptoLog::MigrationComplete(count));
Ok(())