mirror of
https://github.com/DaLaw2/NetGuardia.git
synced 2026-08-24 14:10:28 +09:00
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:
parent
91dfa7924a
commit
dff51ba6bf
@ -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(())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user