Re: Sample pg_hba.conf allows local users to access all databases

2023-08-02 Thread William Edwards
Hi David, David G. Johnston schreef op 2023-08-01 19:35: On Tue, Aug 1, 2023 at 10:13 AM William Edwards wrote: This allows all local users connecting over TCP to access all databases, not only the databases that the user is a member of as one might expect. Proof that user is able to access

Re: Sample pg_hba.conf allows local users to access all databases

2023-08-01 Thread David G. Johnston
On Tue, Aug 1, 2023 at 10:13 AM William Edwards wrote: > This allows all local users connecting over TCP to access all databases, > not only the databases that the user is a member of as one might expect. > > Proof that user is able to access database that it is not a member of is > below. Role

Re: Sample pg_hba.conf allows local users to access all databases

2023-08-01 Thread Christophe Pettus
> On Aug 1, 2023, at 10:13, William Edwards wrote: > This allows all local users connecting over TCP to access all databases, not > only the databases that the user is a member of as one might expect. There's really no notion of a user being "a member of" a database in PostgreSQL. Users are

Sample pg_hba.conf allows local users to access all databases

2023-08-01 Thread William Edwards
Hi, The sample pg_hba.conf in master (https://github.com/postgres/postgres/blob/master/src/backend/libpq/pg_hba.conf.sample) contains the following lines: ``` # IPv4 local connections: hostall all 127.0.0.1/32 @authmethodhost@ # IPv6 local connections: