Re: Problem with reloading groups in pg_hba.conf - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Problem with reloading groups in pg_hba.conf
Date
Msg-id 200203271616.g2RGGIJ29540@candle.pha.pa.us
Whole thread Raw
In response to Re: Problem with reloading groups in pg_hba.conf  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> Tom Lane writes:
> 
> > I don't think GRANT CONNECT fits into our setup at all.  I also doubt
> > that it will be needed very much once we have schemas.
> 
> People have many times asked for a way to alter the connection settings
> from within the database.  For instance, you add users in the database,
> but then you need to go elsewhere to give that user any access.  Consider
> GRANT CONNECT a built-in editor for pg_hba.conf.  You don't have to
> actually store the information in two separate places.

OK, Peter, I have implemented a 'samegroup' keyword in pg_hba.conf that
works just like sameuser, except it checks for user membership in a
group that is the same name as the database.  Two lines of code (plus
docs), lots of flexibility.

So, if people want to control everything from psql, then can just put
samegroup in the database column and create groups for each database. 
If we want to extend this, we can add a GRANT CONNECT command that
optionally creates the group and add/removes users from that group.

This is part of my pg_hba.conf overhaul patch that I am still working
on.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: compile bug in HEAD?
Next
From: Peter Eisentraut
Date:
Subject: Re: Rolling v7.2.1 ...