pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Kris Deugau <vwebtest@webhart.deepnet.cx>
Cc: pgsql-admin@postgresql.org
Subject: Re: DB Access Restrictions
Date: Thu, 22 Aug 2002 07:19:57 -0500
Message-ID: <20020822121957.GA31721@wolff.to> (raw)
In-Reply-To: <200208220205.g7M25oZ22546@candle.pha.pa.us>
References: <3D5AD560.AEBD8AF8@webhart.deepnet.cx>
	<200208220205.g7M25oZ22546@candle.pha.pa.us>

On Wed, Aug 21, 2002 at 22:05:49 -0400,
  Bruce Momjian <pgman@candle.pha.pa.us> wrote:
> 
> In 7.3, due out in a few months, there is a USER column where you can
> list users or specify a filename containing usernames.

Another key thing about 7.3 is that that match for access now includes
the username, so you can have multiple access methods for different users
on the same DB. I am currently using the following in a CVS version of 7.3:
# TYPE       DATABASE      USER      IP_ADDRESS    MASK               AUTH_TYPE

local        all           postgres                              ident postgres
local        area,book,template1 bruno                           ident sameuser
local        area,book     nobody                                ident nobody
local        sameuser      all                                   ident sameuser

The ident file has the following in it:
# MAP     IDENT    PGUSERNAME
postgres	root	postgres
postgres	bruno	postgres
postgres	postgres	postgres
nobody	bruno	nobody
nobody	nobody	nobody

The net result of this is that the postgres account can use any database.
bruno can use area, book, bruno or template1 (the last one is needed to
create new databases). nobody (the web server) can access area, book
and nobody (if it existed). Other users can access a db matching their
username.
The postgres user can be used by bruno, root or postgres. And the nobody
user can be used by bruno or nobody. Other users are stuck using their
normal username to connect to postgres.
I will probably play around with this setup some more, but it does illustrate
a way to have a bunch of users with databases matching their usernames, but
also have other databases and some users that can access more than just
their own db.



view thread (6+ messages)

Message-ID: <20020822121957.GA31721@wolff.to>
Permalink:  ../20020822121957.GA31721@wolff.to/
Also on:    postgresql.org/message-id/20020822121957.GA31721@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, pgman@candle.pha.pa.us, vwebtest@webhart.deepnet.cx
  Subject: Re: DB Access Restrictions
  In-Reply-To: <20020822121957.GA31721@wolff.to>
  References: <3D5AD560.AEBD8AF8@webhart.deepnet.cx> <200208220205.g7M25oZ22546@candle.pha.pa.us> <20020822121957.GA31721@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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