Add governed encryption administration

This commit is contained in:
2026-08-04 01:27:52 +02:00
parent 42f35f8d00
commit ba92d8bf32
15 changed files with 1472 additions and 4 deletions
@@ -0,0 +1,27 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
const moduleSource = readFileSync("src/module.ts", "utf8");
const panel = readFileSync("src/features/EncryptionAdminPanel.tsx", "utf8");
const api = readFileSync("src/api/encryption.ts", "utf8");
assert.match(moduleSource, /"admin.sections": adminSections/);
assert.match(moduleSource, /encryption\.admin\.vaults/);
assert.match(moduleSource, /encryption\.admin\.migrations/);
assert.match(moduleSource, /encryption\.admin\.recovery/);
assert.match(panel, /<AdminPageLayout/);
assert.match(panel, /<DataGrid/);
assert.match(panel, /<StatusBadge/);
assert.match(panel, /<TableActionGroup/);
assert.match(panel, /cannot recall plaintext/);
assert.match(panel, /distinct custodians/);
assert.match(panel, /owning module must durably update/);
assert.match(panel, /Encryption cannot be disabled/);
assert.doesNotMatch(panel, /provider_key_ref/);
assert.doesNotMatch(panel, /wrapped_key_refs/);
assert.doesNotMatch(api, /provider_key_ref/);
assert.doesNotMatch(api, /wrapped_key_refs/);
assert.match(api, /expected_revision/);
assert.match(api, /disable-preflight/);
console.log("Encryption administration UI structural contract passed.");