pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Kris Deugau <vwebtest@webhart.deepnet.cx>
Cc: pgsql-admin@postgresql.org
Subject: Re: DB Access Restrictions
Date: Wed, 21 Aug 2002 22:05:49 -0400 (EDT)
Message-ID: <200208220205.g7M25oZ22546@candle.pha.pa.us> (raw)
In-Reply-To: <3D5AD560.AEBD8AF8@webhart.deepnet.cx>

Kris Deugau wrote:
> I'm finalizing the setup to be used to host customer DBs for a domain
> hosting service, and I'd like to make sure I've got the access controls
> straight:
> 
> In pg_hba.conf, I've seen and managed to figure out *most* of how access
> to the various DBs can be controlled.  I'll be using the "password"

If your network is not secure, I recommend MD5.  In fact, we recommend
MD5 with encrypted_passwords enabled in postgresql.conf in almost all
cases.  Encrypted passwords will be the default in 7.3.

> authentication, most likely with either sameuser or all:
>   -> db of "sameuser" *REQUIRES* that the connecting user have the same
>      name as the database they're trying to connect to - for ANYONE
>      using this access method
>   -> db of "all" lets the access control slip down a level to whether a
>      user has provided the proper password.
> 
> Is there any way to simply specify a list of users for each db?  I

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.

> haven't been able to figure out if that's possible or not with
> "password" authentication.  (ident is useless;  all DB access except
> limited administrative control on my part will be via PHP across the
> local UNIX socket- and ident will return "apache" if it returns anything
> useful at all.)

In 7.2.X and earlier, the only way is to specify a secondary password
file, and list user names in there.  You don't actually need the
passwords in the file, just the usernames, but again, that only works
with 'password', I think.



-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (6+ messages)  latest in thread

Message-ID: <200208220205.g7M25oZ22546@candle.pha.pa.us>
Permalink:  ../200208220205.g7M25oZ22546@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200208220205.g7M25oZ22546@candle.pha.pa.us

 · 

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: pgman@candle.pha.pa.us, vwebtest@webhart.deepnet.cx
  Subject: Re: DB Access Restrictions
  In-Reply-To: <200208220205.g7M25oZ22546@candle.pha.pa.us>
  References: <3D5AD560.AEBD8AF8@webhart.deepnet.cx> <200208220205.g7M25oZ22546@candle.pha.pa.us>

* 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