Re: Please advice TODO Item pg_hba.conf - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Please advice TODO Item pg_hba.conf
Date
Msg-id 18744.1145834069@sss.pgh.pa.us
Whole thread Raw
In response to Re: Please advice TODO Item pg_hba.conf  (Gevik Babakhani <pgdev@xs4all.nl>)
List pgsql-hackers
Gevik Babakhani <pgdev@xs4all.nl> writes:
> On Sun, 2006-04-23 at 17:06 -0400, Alvaro Herrera wrote:
>> If I'm not mistaken, the general principle for creating objects is leave
>> their ACLs as NULLs.

> Personally I think this would create an conflict only in case of the
> CONNECT privilege. If the ACL is NULL and we treat NULL as default and
> the CONNECT privilege is part of default privileges then how do we
> distinguish between someone NOT HAVING THE CONNECT PRIVILEGE to connect
> to a certain database.

You're not following Alvaro's point.  The code's behavior is that a NULL
ACL is interpreted as being the default ACL for the object type.
Whether people would be allowed to connect would depend on what we set
as the default privilege state for the CONNECT privilege.  But since
we are going to grant it to PUBLIC by default (no, that's not open to
debate), people will succeed in connecting to a database with NULL ACL.
That's just like they can succeed in creating schemas in a database with
NULL ACL today.

Revoking privileges from an object with NULL ACL doesn't leave it NULL
(try it and see, preferably on an object where the default privileges
include some for PUBLIC --- databases or functions will do).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Protocol Message Graph
Next
From: Tom Lane
Date:
Subject: Re: Please advice TODO Item pg_hba.conf