Re: [sepgsql 3/3] Add db_procedure:execute permission checks
Kohei KaiGai <kaigai@kaigai.gr.jp>
From: Kohei KaiGai <kaigai@kaigai.gr.jp>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PgHacker <pgsql-hackers@postgresql.org>
Date: 2013-04-11T16:10:35Z
Lists: pgsql-hackers
Attachments
- sepgsql-v9.3-replace-get-object-description.v1.patch (application/octet-stream) patch v9
2013/4/11 Alvaro Herrera <alvherre@2ndquadrant.com>: > Kohei KaiGai wrote: >> This patch adds sepgsql support for permission checks almost >> equivalent to the existing FUNCTION EXECUTE privilege. > > While skimming this patch I noticed that you're using > getObjectDescription() as the "audit_name" of objects. This may be a > bit unstable, for example consider that it's translated if lc_messages > is set to something other than english. I would suggest that the object > identity as introduced by commit f8348ea32ec8 is a better choice for > this. > Thanks for your suggestion. I tried to replace getObjectDescription() by getObjectIdentity() almost mechanically, even though I had to put special handling around OAT_POST_CREATE hook, as existing code doing, because SnapshotNow cannot reference the new object just after creation. Even though it massively affects regression test results, my preference is the format using getObjectIdentity(), because audit log is not assumed being read by human eyes usually. Thus, newer one is kindness style for script developers to put just an identifier of object into "name" field of audit log, without anything else. Best regards, -- KaiGai Kohei <kaigai@kaigai.gr.jp>
Commits
-
Allow extracting machine-readable object identity
- f8348ea32ec8 9.3.0 cited