feat(auth): add optional authentication boundary

- Add account, JWT session, revocation, cookie and bearer handling.
- Protect server surfaces while preserving public health, manifest and disabled mode.
- Add SQLite migration and focused server regression coverage.
This commit is contained in:
agent committed 2026-11-04 15:43:33 -05:00
1 parent d4bb274982
commit de41571b5c
33 files changed
+1083 -20

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { redactAuthRequestBody } from "../src/interceptors/logging.interceptor";
describe("redactAuthRequestBody", () => {
it("redacts login passwords on local and API-prefixed route paths", () => {
const body = { username: "operator", password: "synthetic-secret" };
expect(redactAuthRequestBody("/auth/login", body)).toEqual({
username: "operator",
password: "[REDACTED]",
});
expect(redactAuthRequestBody("/api/v1/auth/login", body)).toEqual({
username: "operator",
password: "[REDACTED]",
});
expect(redactAuthRequestBody("/api/v1/scenarios", body)).toBe(body);
});
});