> On Aug 23, 2021, at 12:51 PM, Stephen Frost <sfr...@snowman.net> wrote:
> 
> Simply using superuser_arg() isn't sufficient is exactly the point that
> I'm trying to make.  As a 'landlord', I might very well want to have
> some kind of 'landlord' role that isn't directly a superuser but which
> could *become* a superuser by having been GRANT'd a superuser role- but
> I certainly don't want that role's objects to be able to be messed with
> by the tenant.

> If one of those other non-superuser roles is, itself, a role that can
> become a superuser 

If you have a sandbox-superuser who can do anything within the sandbox but 
nothing outside the sandbox, then you need a pretty good wall at the periphery 
of the sandbox.  Breaking sandbox-superuser-ishness into multiple distinct 
privileges rather than one monolithic privilege doesn't change the need for a 
good wall at the periphery.  The pg_manage_database_objects role doesn't 
encompass all sandbox-superuser privileges, but it is on that side of the wall.

We could agree to move the wall a little, and say that non-superuser roles who 
have the ability to become superusers are on the other side of the wall.  
That's fine.  I'd have to rework the patch a bit, but conceptually that seems 
doable.  We could also say that non-superusers who are members of privileged 
roles (pg_execute_server_programs, pg_signal_backend, etc) are likewise on the 
other side of that wall.

Does that work?

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Reply via email to