Re: Revoke Connect Privilege from Database not working - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Revoke Connect Privilege from Database not working
Date
Msg-id 2222571.1769014621@sss.pgh.pa.us
Whole thread Raw
In response to Re: Revoke Connect Privilege from Database not working  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-bugs
Nathan Bossart <nathandbossart@gmail.com> writes:
> Yeah, I think doing most of the work in select_best_grantor() is obviously
> better.  I recall wondering whether we should check for INHERIT or SET
> privilege (or both) on the grantor role, and IIRC I settled on INHERIT
> because select_best_grantor() searches through roles we have INHERIT on.

Yeah, I mentally had that point as something to check on.  Clearly,
if you have SET ROLE privilege then you can become the target role
and then issue the GRANT, so if we define GRANTED BY like that
then we're not allowing anything that can't be done today.  However,
it feels like INHERIT is a more natural test to make, since AIUI
that is what permits "automatic" use of a role's privileges, and that
seems to be what we'd be doing here.

I'd be interested to hear Robert's opinion on this, or somebody
else who worked on the SET/INHERIT splitup.

Also cc'ing Peter, who put in the current effectively-a-noise-clause
behavior of GRANTED BY, to see if he has standards-compliance or
other concerns about changing this.

> Would you like to handle docs/tests/committing, or shall I?

I'm willing to push it forward if we have consensus to do it.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #19377: Query planner interesting behaviour
Next
From: David Rowley
Date:
Subject: Re: BUG #19385: Normal SELECT generates an ineffecifient query plan compare to the prepared SELECT.