Re: Auditing extension for PostgreSQL (Take 2) - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Auditing extension for PostgreSQL (Take 2)
Date
Msg-id 20150415.093737.74027275338109111.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Auditing extension for PostgreSQL (Take 2)  (David Steele <david@pgmasters.net>)
Responses Re: Auditing extension for PostgreSQL (Take 2)
List pgsql-hackers
> Thank you for pointing that out!
> 
> Ironic that it was the commit directly after the one I was testing with
> that broke the patch.  It appears the end of the last CF is a very bad
> time to be behind HEAD.
> 
> Fixed in attached v8 patch.

Thank you for your quick response.

BTW, in my understanding pg_audit allows to track a table access even
if it's used in a view. I think this is a nice feature and it would be
better explicitly stated in the document and the test case is better
included in the regression test.

Here is a sample session:

CREATE TABLE test2 (id INT);
CREATE VIEW vtest2 AS SELECT * FROM test2;
GRANT SELECT ON TABLE public.test2 TO auditor;
GRANT SELECT ON TABLE public.vtest2 TO auditor;
SELECT * FROM vtest2;
NOTICE:  AUDIT: SESSION,1,1,READ,SELECT,,,SELECT * FROM vtest2;
NOTICE:  AUDIT: OBJECT,1,1,READ,SELECT,VIEW,public.vtest2,SELECT * FROM vtest2;
NOTICE:  AUDIT: OBJECT,1,1,READ,SELECT,TABLE,public.test2,SELECT * FROM vtest2;

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: inherit support for foreign tables
Next
From: Sawada Masahiko
Date:
Subject: Re: Auditing extension for PostgreSQL (Take 2)