Merge branch 'phase/029-handbuch'

# Conflicts:
#	src/worker/index.ts
This commit is contained in:
2026-10-12 16:56:22 +02:00
13 changed files with 701 additions and 3 deletions
+1
View File
@@ -48,6 +48,7 @@ test("neuen Host einrichten", async ({ page }) => {
await expect(page.getByRole("button", { name: "Fingerprint stimmt – vertrauen" })).toBeVisible({
timeout: 30_000,
});
await page.screenshot({ path: "docs/anleitung/bilder/hostkey-bestaetigen-desktop.png", fullPage: true });
await page.getByRole("button", { name: "Fingerprint stimmt – vertrauen" }).click();
await expect(page.getByText("Einmalig per Passwort")).toBeVisible({ timeout: 15_000 });
await expect(page.getByLabel("Bootstrap-Befehl", { exact: true })).toContainText("SSHKV_BOOTSTRAP");
+19
View File
@@ -73,3 +73,22 @@ describe("Deployment-Key", () => {
expect(dump).not.toContain(kern.slice(0, 40));
});
});
describe("Master-Key-Pruefung beim Start (#029)", () => {
it("meldet einen falschen Master-Key verstaendlich", async () => {
const { masterKeyPruefen } = await import("@/worker/geheimnisse");
const id = await deploymentKeySicherstellen();
await expect(masterKeyPruefen(id)).resolves.toBeUndefined();
const falsch = path.join(verzeichnis, "falsch.key");
writeFileSync(falsch, randomBytes(32), { mode: 0o600 });
const richtig = process.env["SSHKV_MASTER_KEY_FILE"];
process.env["SSHKV_MASTER_KEY_FILE"] = falsch;
masterKeyVergessen();
try {
await expect(masterKeyPruefen(id)).rejects.toThrow(/passt nicht zur Datenbank/);
} finally {
process.env["SSHKV_MASTER_KEY_FILE"] = richtig;
masterKeyVergessen();
}
});
});