pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restricting user access to databases
4+ messages / 2 participants
[nested] [flat]

* Restricting user access to databases
@ 2001-04-24 00:39 Jared Sulem <jsulem@sulem.freeserve.co.uk>
  2001-04-24 14:23 ` Re: Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
  2001-04-24 14:32 ` Re: Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
  0 siblings, 2 replies; 4+ messages in thread

From: Jared Sulem @ 2001-04-24 00:39 UTC (permalink / raw)
  To: pgsql-admin

Is there anyway to make PostgreSQL automatically only grant access to 
databases by their owners, and preferably database superusers, rather 
than making lots of pg_hba.conf entries and password files?

It would be nice if there was an option to do this, so then pg_hba.conf 
would only need editing to allow exceptions to this.  It should make 
administrating a lot a users with many databases much easier.

Jared




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restricting user access to databases
  2001-04-24 00:39 Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
@ 2001-04-24 14:23 ` Jared Sulem <jsulem@sulem.freeserve.co.uk>
  1 sibling, 0 replies; 4+ messages in thread

From: Jared Sulem @ 2001-04-24 14:23 UTC (permalink / raw)
  To: pgsql-admin

Jared Sulem wrote:

> Is there anyway to make PostgreSQL automatically only grant access to 
> databases by their owners, and preferably database superusers, rather 
> than making lots of pg_hba.conf entries and password files?

Just had an idea.  Another token could be added to the pg_hba.conf file: 
'owner'.  Then the line:

host 
all 
192.168.3.0 
255.255.255.0 
password owner

Would only allow users that owned the database they were trying to 
access to login.  'owner' being like a virtual file containing only the 
owner's name of the database, that the user is trying to access.

(Or is there already a way to easily do this?)

Jared






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restricting user access to databases
  2001-04-24 00:39 Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
@ 2001-04-24 14:32 ` Jared Sulem <jsulem@sulem.freeserve.co.uk>
  2001-04-25 02:11   ` Re: Restricting user access to databases Tim Frank <tfrank@registrar.uoguelph.ca>
  1 sibling, 1 reply; 4+ messages in thread

From: Jared Sulem @ 2001-04-24 14:32 UTC (permalink / raw)
  To: pgsql-admin

Jared Sulem wrote:

 > Is there anyway to make PostgreSQL automatically only grant access to
 > databases by their owners, and preferably database superusers, rather
 > than making lots of pg_hba.conf entries and password files?

Just had an idea.  Another token could be added to the pg_hba.conf file:
'owner'.  Then a line like:

host all 192.168.3.0 255.255.255.0 password owner

Would only allow users that owned the database they were trying to
access to login.  'owner' being like a virtual file containing only the
owner's name of the database, that the user is trying to access.

(Or is there already a way to easily do this?)

Jared







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restricting user access to databases
  2001-04-24 00:39 Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
  2001-04-24 14:32 ` Re: Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
@ 2001-04-25 02:11   ` Tim Frank <tfrank@registrar.uoguelph.ca>
  0 siblings, 0 replies; 4+ messages in thread

From: Tim Frank @ 2001-04-25 02:11 UTC (permalink / raw)
  To: pgsql-admin

Jared,

	It doesn't jump out at you but if you read the pg_hba.conf help REALLY 
closely you will find that you can do this:

host sameuser 192.168.3.0 255.255.255.0 password

Where "sameuser" under the DBNAME allows connection to a database of the 
same name of the user trying to connect.  This isn't "quite" what you are 
asking for, but if you make sure that users' databases are named the same 
as their user account it will work.  It really doesn't work for my 
situation since our databases aren't specific to "users". You might be 
able to work with that though.

Tim Frank

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 24/04/01, 9:35:09 AM, jsulem@sulem.freeserve.co.uk (Jared Sulem) wrote 
regarding Re: Restricting user access to databases:


> Jared Sulem wrote:

>  > Is there anyway to make PostgreSQL automatically only grant access to
>  > databases by their owners, and preferably database superusers, rather
>  > than making lots of pg_hba.conf entries and password files?

> Just had an idea.  Another token could be added to the pg_hba.conf file:
> 'owner'.  Then a line like:

> host all 192.168.3.0 255.255.255.0 password owner

> Would only allow users that owned the database they were trying to
> access to login.  'owner' being like a virtual file containing only the
> owner's name of the database, that the user is trying to access.

> (Or is there already a way to easily do this?)

> Jared





> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

> http://www.postgresql.org/search.mpl



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-04-25 02:11 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-24 00:39 Restricting user access to databases Jared Sulem <jsulem@sulem.freeserve.co.uk>
2001-04-24 14:23 ` Jared Sulem <jsulem@sulem.freeserve.co.uk>
2001-04-24 14:32 ` Jared Sulem <jsulem@sulem.freeserve.co.uk>
2001-04-25 02:11   ` Tim Frank <tfrank@registrar.uoguelph.ca>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox