pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedProblems with user-level security
7+ messages / 6 participants
[nested] [flat]
* Problems with user-level security
@ 2001-11-07 02:19 Nick Sayer <nsayer@quack.kfu.com>
2001-11-07 14:56 ` Re: Problems with user-level security Sean K. Sell <sean@nist.gov>
2001-11-07 15:25 ` Re: Problems with user-level security Chad R. Larson <chad@eldocomp.com>
2001-11-07 17:03 ` Re: Problems with user-level security Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-11-07 18:21 ` Re: Problems with user-level security Tom Lane <tgl@sss.pgh.pa.us>
2001-11-08 00:26 ` Re: Problems with user-level security Peter Eisentraut <peter_e@gmx.net>
0 siblings, 5 replies; 7+ messages in thread
From: Nick Sayer @ 2001-11-07 02:19 UTC (permalink / raw)
To: pgsql-admin
Maybe it's just me, but I think pg_hba.conf needs a user column in it.
On the one hand, I need
local sameuser password
because I have untrusted users who should only have access to their own
databases.
On the other hand, I do a nightly pg_dumpall as part of the backups so that
I don't have to dump the actual database working areas. For that to work, I
need to say
local all password
so that my backup script will work.
What I *really* want is for an extra column to be added to pg_hba.conf to
specify the user of interest. Like this:
all local sameuser password
backups local all password
pgsql local all password
Does this make any sense? Is there some way to achieve this I am missing?
The only way I can do backups at the moment is introduce a race condition
so that anyone can connect to any database they like at certain times of
day. Not good.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Problems with user-level security
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
@ 2001-11-07 14:56 ` Sean K. Sell <sean@nist.gov>
4 siblings, 0 replies; 7+ messages in thread
From: Sean K. Sell @ 2001-11-07 14:56 UTC (permalink / raw)
To: pgsql-admin
I agree a user column would VERY nice especially when you have several machines doing replication
or users that are connecting with ODBC and have to use password instead of crypt authentication.
Nick Sayer wrote:
> Maybe it's just me, but I think pg_hba.conf needs a user column in it.
>
> On the one hand, I need
>
> local sameuser password
>
> because I have untrusted users who should only have access to their own
> databases.
>
> On the other hand, I do a nightly pg_dumpall as part of the backups so that
> I don't have to dump the actual database working areas. For that to work, I
> need to say
>
> local all password
>
> so that my backup script will work.
>
> What I *really* want is for an extra column to be added to pg_hba.conf to
> specify the user of interest. Like this:
>
> all local sameuser password
> backups local all password
> pgsql local all password
>
> Does this make any sense? Is there some way to achieve this I am missing?
> The only way I can do backups at the moment is introduce a race condition
> so that anyone can connect to any database they like at certain times of
> day. Not good.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Problems with user-level security
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
@ 2001-11-07 15:25 ` Chad R. Larson <chad@eldocomp.com>
4 siblings, 0 replies; 7+ messages in thread
From: Chad R. Larson @ 2001-11-07 15:25 UTC (permalink / raw)
To: Nick Sayer <nsayer@quack.kfu.com>; pgsql-admin
At 06:19 PM 11/6/01 -0800, Nick Sayer wrote:
>On the other hand, I do a nightly pg_dumpall as part of the backups so that
>I don't have to dump the actual database working areas. For that to work, I
>need to say
>
>local all password
>
>so that my backup script will work.
I started an IDENT server on my machines and then added a rule that said if
"ident" said the user was postgres, it had access to anything.
I don't know if that's secure enough for you, but it works for us on our
production network inside our firewall.
-crl
--
Chad R. Larson (CRL22) chad@eldocomp.com
Eldorado Computing, Inc. 602-604-3100
5353 North 16th Street, Suite 400
Phoenix, Arizona 85016-3228
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Problems with user-level security
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
@ 2001-11-07 17:03 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-11-07 17:50 ` Re: Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
4 siblings, 1 reply; 7+ messages in thread
From: Stephan Szabo @ 2001-11-07 17:03 UTC (permalink / raw)
To: Nick Sayer <nsayer@quack.kfu.com>; +Cc: pgsql-admin
On Tue, 6 Nov 2001, Nick Sayer wrote:
> Maybe it's just me, but I think pg_hba.conf needs a user column in it.
>
> On the one hand, I need
>
> local sameuser password
>
> because I have untrusted users who should only have access to their own
> databases.
>
> On the other hand, I do a nightly pg_dumpall as part of the backups so that
> I don't have to dump the actual database working areas. For that to work, I
> need to say
>
> local all password
>
> so that my backup script will work.
>
> What I *really* want is for an extra column to be added to pg_hba.conf to
> specify the user of interest. Like this:
>
> all local sameuser password
> backups local all password
> pgsql local all password
>
> Does this make any sense? Is there some way to achieve this I am missing?
> The only way I can do backups at the moment is introduce a race condition
> so that anyone can connect to any database they like at certain times of
> day. Not good.
If you're using password, couldn't you do this by specifying the file
to look up the passwords in (the optional last parameter) on the local
all line and then only put the backups/pgsql password in it.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Problems with user-level security
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
2001-11-07 17:03 ` Re: Problems with user-level security Stephan Szabo <sszabo@megazone23.bigpanda.com>
@ 2001-11-07 17:50 ` Nick Sayer <nsayer@quack.kfu.com>
0 siblings, 0 replies; 7+ messages in thread
From: Nick Sayer @ 2001-11-07 17:50 UTC (permalink / raw)
To: sszabo@megazone23.bigpanda.com; +Cc: nsayer@quack.kfu.com; pgsql-admin
Stephan Szabo wrote:
> On Tue, 6 Nov 2001, Nick Sayer wrote:
[...]
>> What I *really* want is for an extra column to be added to pg_hba.conf
>> to specify the user of interest. Like this:
>>
>> all local sameuser password
>> backups local all password
>> pgsql local all password
>>
>> Does this make any sense? Is there some way to achieve this I am
>> missing? The only way I can do backups at the moment is introduce a
>> race condition so that anyone can connect to any database they like at
>> certain times of day. Not good.
>
> If you're using password, couldn't you do this by specifying the file
> to look up the passwords in (the optional last parameter) on the local
> all line and then only put the backups/pgsql password in it.
That solution works perfectly. I now have
local sameuser password
local all password pg_superusers
and have added the backup user to pg_superusers using pg_passwd. I am a
happy camper! Especially nice is that I can empty out the pg_shadow
password for the superusers.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Problems with user-level security
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
@ 2001-11-07 18:21 ` Tom Lane <tgl@sss.pgh.pa.us>
4 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2001-11-07 18:21 UTC (permalink / raw)
To: Nick Sayer <nsayer@quack.kfu.com>; +Cc: pgsql-admin
Nick Sayer <nsayer@quack.kfu.com> writes:
> Is there some way to achieve this I am missing?
For password-style authentication, you can use a secondary auth file to
get that effect:
local sameuser password
local all password crossauth
where $PGDATA/crossauth lists the users who should be allowed to connect
to databases other than their own:
backups
pgsql
The map file can serve a similar purpose for ident-based auth. AFAIK
there's no similar capability for Kerberos or PAM auth methods :-(
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Problems with user-level security
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
@ 2001-11-08 00:26 ` Peter Eisentraut <peter_e@gmx.net>
4 siblings, 0 replies; 7+ messages in thread
From: Peter Eisentraut @ 2001-11-08 00:26 UTC (permalink / raw)
To: Nick Sayer <nsayer@quack.kfu.com>; +Cc: pgsql-admin
Nick Sayer writes:
> On the one hand, I need
>
> local sameuser password
>
> because I have untrusted users who should only have access to their own
> databases.
>
> On the other hand, I do a nightly pg_dumpall as part of the backups so that
> I don't have to dump the actual database working areas. For that to work, I
> need to say
>
> local all password
>
> so that my backup script will work.
If you are only concerned about local access then you should consider
using 'ident' authentication. In 7.1 this only works for TCP/IP
connections (so you have to go through 'localhost'), but in 7.2 it will
also work with local connections. Another possibility is to use 'local
sameuser trust' and set a filesystem permission on the socket. (See
unix_socket_* parameters in postgresql.conf.) In 7.2 we'll also have PAM,
so you'll be able to do whatever you want.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2001-11-08 00:26 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-07 02:19 Problems with user-level security Nick Sayer <nsayer@quack.kfu.com>
2001-11-07 14:56 ` Sean K. Sell <sean@nist.gov>
2001-11-07 15:25 ` Chad R. Larson <chad@eldocomp.com>
2001-11-07 17:03 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-11-07 17:50 ` Nick Sayer <nsayer@quack.kfu.com>
2001-11-07 18:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-11-08 00:26 ` Peter Eisentraut <peter_e@gmx.net>
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