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

From Tom Lane
Subject Re:   Re: Re: Revoke Connect Privilege from Database not working
Date
Msg-id 3467676.1744041977@sss.pgh.pa.us
Whole thread Raw
In response to Re:   Re: Re: Revoke Connect Privilege from Database not working  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re:   Re: Re: Revoke Connect Privilege from Database not working
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On master, confirmed that after this command the privilege:
> test_user=c/test_admin (on database testdb) still exists.  That seems like
> a bug. Its at least a POLA violation and I cannot figure out how to read
> the revoke reference page in a way that explains it.

I believe what's going on there is explained by the rule that
"grants and revokes done by a superuser are done as if issued
by the object owner".  So here, what would be revoked is
test_user=c/postgres, which isn't the privilege at issue.
Include GRANTED BY in the REVOKE to override the default
choice of grantor.

IIRC, said rule was invented before we had the GRANTED BY
syntax.  It probably doesn't make as much sense today,
but I'd be very afraid of breaking peoples' work flows
by changing it.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re:   Re: Re: Revoke Connect Privilege from Database not working
Next
From: "David G. Johnston"
Date:
Subject: Re:   Re: Re: Revoke Connect Privilege from Database not working