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

From Robert Haas
Subject Re: pgaudit - an auditing extension for PostgreSQL
Date
Msg-id CA+TgmoYeeAWDoyBaBAmNFJbivZ9FO=nK-4WZDVdJxBNthKBFrA@mail.gmail.com
Whole thread Raw
In response to Re: pgaudit - an auditing extension for PostgreSQL  (Stephen Frost <sfrost@snowman.net>)
Responses Re: pgaudit - an auditing extension for PostgreSQL  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
On Tue, Dec 16, 2014 at 1:28 PM, Stephen Frost <sfrost@snowman.net> wrote:
> The magic "audit" role has SELECT rights on a given table.  When any
> user does a SELECT against that table, ExecCheckRTPerms is called and
> there's a hook there which the module can use to say "ok, does the audit
> role have any permissions here?" and, if the result is yes, then the
> command is audited.  Note that this role, from core PG's perspective,
> wouldn't be special at all; it would just be that pgaudit would use the
> role's permissions as a way to figure out if a given command should be
> audited or not.

This is a little weird because you're effectively granting an
anti-permission.  I'm not sure whether that ought to be regarded as a
serious problem, but it's a little surprising.

Also, what makes the "audit" role magical?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: pgbench -f and vacuum
Next
From: Robert Haas
Date:
Subject: Re: Postgres TR for missing chunk