feat(core-audit): admin tRPC procedure for eraseSubject

Adds auditProcedure (adminOnly middleware + defineErrorMiddleware([])) in
core-audit/src/integrations/api/procedures.ts. Adds createAuditRouter that
captures an IAuditLog and exposes a single eraseSubject mutation with zod
input validation. Non-admins receive FORBIDDEN. Barrel re-exports
pseudonymize, createAuditErasureHook, createAuditRouter, auditRouter,
AuditRouter, auditProcedure, AdminTrpcUser. Adds AUDIT_PSEUDONYM_SALT to
turbo.json globalEnv to clear lint warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 16:25:09 +02:00
parent 270897c550
commit 131efd5d2f
5 changed files with 207 additions and 1 deletions

View File

@@ -21,7 +21,8 @@
"SENTRY_ENVIRONMENT",
"VERCEL_GIT_COMMIT_SHA",
"NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA",
"VERCEL_ENV"
"VERCEL_ENV",
"AUDIT_PSEUDONYM_SALT"
],
"boundaries": {
"tags": {