Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms(). - Mailing list pgsql-hackers

On Fri, 2010-07-09 at 14:06 +0000, Robert Haas wrote:
> Log Message:
> -----------
> Add a hook in ExecCheckRTPerms().
> 
> This hook allows a loadable module to gain control when table permissions
> are checked.  It is expected to be used by an eventual SE-PostgreSQL
> implementation, but there are other possible applications as well.  A
> sample contrib module can be found in the archives at:
> 
> http://archives.postgresql.org/pgsql-hackers/2010-05/msg01095.php
> 

The loadable module doesn't "gain control" here it simplify kicks-in
after, and in addition to, normal checking. That just means you have the
option of failing for additional reasons.

We're not passing in any form of context other than the rangetable so
what additional reasons could there be? This is of no use to anything
that uses object labelling. We're not even at the part of the executor
where we would be able to identify objects yet, so I can't see what
value this brings. Though I am certainly in favour in general terms of
simple changes to enhance security configuration features.

Strangely, I was looking into removing the ExecCheckRTPerms check
altogether by forcing plan invalidation when permissions are updated.
That would be a performance tweak that would render this change useless.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: including backend ID in relpath of temp rels - updated patch
Next
From: Stephen Frost
Date:
Subject: Re: [v9.1] Add security hook on initialization of instance