敏感设置增加访问审计

This commit is contained in:
Christ committed 2026-08-15 19:13:59 +08:00
1 parent eff4143fd6
commit afb7e2f0d9
12 files changed
+348 -5

No files matched your search

@@ -0,0 +1,14 @@
-- +goose Up
CREATE TABLE IF NOT EXISTS security_audit_logs (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
user_id BIGINT NOT NULL,
action VARCHAR(128) NOT NULL,
resource VARCHAR(255) NOT NULL,
keys_json TEXT NOT NULL,
outcome VARCHAR(32) NOT NULL DEFAULT 'accepted',
created_at BIGINT NOT NULL,
INDEX idx_security_audit_logs_user_created (user_id, created_at, id)
);
-- +goose Down
DROP TABLE IF EXISTS security_audit_logs;