feat(security): Zugangsdaten verschluesselt speichern (#021)
AES-256-GCM mit Schluessel aus APP_SECRET fuer SMTP-Passwort und Webhook-Geheimnis. Bestehende Klartextwerte werden weiter gelesen und beim naechsten Speichern umgeschluesselt. 156 Tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { prisma } from "@/lib/db";
|
||||
import { kennzahlen } from "@/server/queries/hosts";
|
||||
import { aktiveKanaele, ueberKanalSenden, type Nachricht } from "./kanaele";
|
||||
import { aktiveKanaele, konfigurationLesen, ueberKanalSenden, type Nachricht } from "./kanaele";
|
||||
import { alertNachricht, zusammenfassungNachricht, type AlertNachrichtDaten } from "./nachrichten";
|
||||
|
||||
/**
|
||||
@@ -149,7 +149,7 @@ export async function ueberEinenKanalSenden(kanalId: string, nachricht: Nachrich
|
||||
typ: eintrag.typ,
|
||||
name: eintrag.name,
|
||||
aktiv: eintrag.aktiv,
|
||||
konfiguration: eintrag.konfiguration as never,
|
||||
konfiguration: konfigurationLesen(eintrag.typ, eintrag.konfiguration),
|
||||
};
|
||||
})());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user