1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 03:45:44 +01:00
Files
sops/audit/schema.sql
AJ Bahnken 038001b3a3 Auditing support
* Implement auditing support

* Document auditing

* Address review comments

* Change log level for errors reading audit config

* Disable auditors during tests

* Make changes to docs suggested by @jvehent

* Code review fixes to init() in audit.go

* Implement encrypt audit event

* Include filepath in Tree created from sops/encrypt/encrypt

* Fix changes in audit.go to stay with current style

* Implement RotateEvent within rotate command

* github.com/lib/pq vendor dependencies

* Always get current user in PostgresAuditor.Handle()

* Initial CR fixes + gofmt

* gofmt

* fixed placement of audit event in rotate()

* Moved to a single table for audit events.

* Revert "Moved to a single table for audit events."

This reverts commit 7e7817e8a1.

* Remove audit tables delete protection rules

* Move to a single audit_event table with action column

* Remove unnecessary tree declaration
2018-04-22 21:21:58 +02:00

13 lines
319 B
SQL

CREATE TABLE audit_event (
id SERIAL PRIMARY KEY,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
action TEXT,
username TEXT,
file TEXT
);
CREATE ROLE sops WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD 'sops';
GRANT INSERT ON audit_event TO sops;
GRANT USAGE ON audit_event_id_seq TO sops;