An audit log for Postgres that can prove itself
Most Postgres audit logs tell you what happened. FoxByte’s Blackbox also shows whether the record was edited afterwards, attributes each change to a login, and gives you a way back to just before it.
Three ways to audit schema changes in Postgres
| pgAudit | Your own event triggers | FoxByte Blackbox | |
|---|---|---|---|
| Where the record lives | The PostgreSQL server log | A table you design | An append-only table in the database |
| Shows an edit made afterwards | No | Only if you build it | Yes: every entry is hash-chained to the one before |
| Proof against a superuser | No | No | Signed anchors kept off the machine (Enterprise) |
| Who made the change | The database role | Whatever you capture | The login role, person or agent, and the tool the client reported |
| Stops a destructive change | No | If you write it | DROP and TRUNCATE blocked by policy, with the attempt recorded |
| A way back | No | No | A branch of main as it was just before any entry |
| Reads and data writes | Yes, when configured | If you write it | No reads; TRUNCATE by anyone, and agents’ UPDATE and DELETE |
pgAudit is the right tool when you need every read in a log. The Blackbox is for proving who changed the schema and that nobody rewrote the story since.
Read it, check it, prove it
fox blackbox lists the changes with who made them. fox blackbox verify recomputes the hash chain, so an edited or deleted entry shows. fox blackbox integrity checks the entries against the signed anchors written outside the database, and the standalone fox-verify does the same for an auditor who does not trust your machine.
$ fox blackbox $ fox blackbox verify $ fox blackbox integrity
What one entry holds
Who
The login role, which a client cannot change, and whether it is a person or an agent.
What
The command, the object and the full statement, and whether it was applied, flagged or blocked.
Where and when
The branch, the session, the time, and the tool as the client reported it.
Questions about auditing Postgres
A schema change writes one entry in the same transaction. People’s reads and data writes are not recorded, so they pay nothing; an agent’s UPDATE or DELETE adds one entry per statement.
A superuser can stop the event triggers that write the record. Signed anchors kept off the machine prove that recorded history was not rewritten, and the next release adds a scan that records changes the triggers missed.
Recording, verifying and the independent verifier are free in every edition. Writing signed anchors on a schedule is part of Enterprise.
Bring the database over with fox import, from PostgreSQL, MySQL, MariaDB, MongoDB or files. Every schema change from then on is recorded.
Put your schema on the record.
Every schema change is recorded from the moment you install. Verifying it is free.
$ curl -fsSL https://get.thefoxbyte.com/install.sh | sh




