Re: pgaudit - an auditing extension for PostgreSQL - Mailing list pgsql-hackers

From Neil Tiffin
Subject Re: pgaudit - an auditing extension for PostgreSQL
Date
Msg-id 5681A8FD-2E79-4307-88AE-1A042FDC3F50@neiltiffin.com
Whole thread Raw
In response to Re: pgaudit - an auditing extension for PostgreSQL  (Yeb Havinga <yebhavinga@gmail.com>)
Responses Re: pgaudit - an auditing extension for PostgreSQL
List pgsql-hackers
> On Feb 17, 2015, at 3:40 AM, Yeb Havinga <yebhavinga@gmail.com> wrote:
>
> Hi list,
>
. . . . .

> Auditing superuser access means auditing beyond the running database.
> The superuser can dump a table, and pipe this data everywhere outside of
> the auditing domain. I cannot begin to imagine the kind of security
> restrictions you'd need to audit what happens with data after libpq has
> produced the results. My best guess would be to incorporate some kind of
> separation of duty mechanism; only allow certain superuser operations
> with two people involved.

My views are from working with FDA validated environments, and I don’t really understand the above.  It is not db
auditing’sjob to stop or control the access to data or to log what happens to data outside of PostgreSQL.  To audit a
dbsuperuser is very simple, keep a log of everything a super user does and to write that log to a write append, no read
filesystemor location.  Since the db superuser can do anything there is no value in configuring what to log.  This
shouldbe an option that once set, cannot be changed without reinstalling the PostgreSQL binary.  The responsibility for
auditing/controllingany binary replacement is the operating system’s, not PostgreSQL.  In this environment the db
superuserwill not have authorized root access for the os. 

The use case examples, that I am familiar with, are that procedural policies control what the db superuser can do.  If
thepolicy says that the db superuser cannot dump a table and pipe this data someplace without being supervised by a
thirdparty auditor (building on the above), then what you want in the log is that the data was dumped by whom with a
dateand time.  Thats it.  Its up to policies, audit review, management, and third party audit tools, to pick up the
violation. Auditing’s job is to keep a complete report, not prevent.  Prevention is the role of security. 

Neil




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: "multiple backends attempting to wait for pincount 1"
Next
From: Jim Nasby
Date:
Subject: Re: Proposal : REINDEX xxx VERBOSE