FoxByte
Postgres audit log

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.

$ fox blackbox verify
you@team.devCREATE TABLE notes9f2c
priya@team.devALTER TABLE users ADD plan41ab
you@team.devGRANT SELECT ON notesc07e
agent-claudeDROP TABLE invoices · blockede5d1
recording… 1 entrieswho, what, when, which tool
Compared

Three ways to audit schema changes in Postgres

pgAuditYour own event triggersFoxByte Blackbox
Where the record livesThe PostgreSQL server logA table you designAn append-only table in the database
Shows an edit made afterwardsNoOnly if you build itYes: every entry is hash-chained to the one before
Proof against a superuserNoNoSigned anchors kept off the machine (Enterprise)
Who made the changeThe database roleWhatever you captureThe login role, person or agent, and the tool the client reported
Stops a destructive changeNoIf you write itDROP and TRUNCATE blocked by policy, with the attempt recorded
A way backNoNoA branch of main as it was just before any entry
Reads and data writesYes, when configuredIf you write itNo 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.

In practice

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
Each entry

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