敏感设置增加访问审计
This commit is contained in:
1 parent
eff4143fd6
commit
afb7e2f0d9
12 files changed
+348
-5
No files matched your search
@@ -0,0 +1,16 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE IF NOT EXISTS security_audit_logs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL,
|
||||
action TEXT NOT NULL,
|
||||
resource TEXT NOT NULL,
|
||||
keys_json TEXT NOT NULL DEFAULT '[]',
|
||||
outcome TEXT NOT NULL DEFAULT 'accepted',
|
||||
created_at INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_security_audit_logs_user_created
|
||||
ON security_audit_logs(user_id, created_at DESC, id DESC);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE IF EXISTS security_audit_logs;
|
||||
Reference in new issue
Block a user