Re: pgaudit - an auditing extension for PostgreSQL

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>, Neil Tiffin <neilt(at)neiltiffin(dot)com>
Cc: Yeb Havinga <yebhavinga(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, MauMau <maumau307(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Ian Barwick <ian(at)2ndquadrant(dot)com>
Subject: Re: pgaudit - an auditing extension for PostgreSQL
Date: 2015-02-17 18:17:53
Message-ID: 54E385D1.6040703@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/17/15 12:07 PM, Stephen Frost wrote:
>> My views are from working with FDA validated environments, and I don’t really understand the above. It is not db auditing’s job to stop or control the access to data or to log what happens to data outside of PostgreSQL. To audit a db superuser is very simple, keep a log of everything a super user does and to write that log to a write append, no read filesystem or location. Since the db superuser can do anything there is no value in configuring what to log. This should be an option that once set, cannot be changed without reinstalling the PostgreSQL binary. The responsibility for auditing/controlling any binary replacement is the operating system’s, not PostgreSQL. In this environment the db superuser will not have authorized root access for the os.
> I agree that it's not the auditing job to stop or control access to
> data, but it's not so simple to audit the superuser completely. The
> issue is that even if you have a hard-coded bit in the binary which says
> "audit everything", a superuser can change the running code to twiddle
> that bit off, redirect the output of whatever auditing is happening,
> gain OS-level (eg: shell) access to the system and then make changes to
> the files under PG directly, etc. Setting a bit in a binary and then
> not allowing that binary to be unchanged does not actually solve the
> issue.

If we've allowed a superuser *in the database* that kind of power at the
OS level then we have a problem. There needs to be *something* that a
database SU can't do at the OS level, otherwise we'll never be able to
audit database SU activity.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-02-17 18:23:40 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Tom Lane 2015-02-17 18:14:00 Re: "multiple backends attempting to wait for pincount 1"