Files
breadcrumb-the-shire/modules/audit/db/updates/2026-04-05-api-audit-redaction-hardening.sql

10 lines
341 B
MySQL
Raw Normal View History

-- API audit redaction hardening:
-- 1) Store full SHA-256 hashes (64 chars) for IP and user-agent fields.
-- 2) Remove historical API audit rows that may contain plaintext query values or identifiers.
ALTER TABLE `api_audit_log`
MODIFY COLUMN `ip` CHAR(64) NULL,
MODIFY COLUMN `user_agent` CHAR(64) NULL;
DELETE FROM `api_audit_log`;