Philip Warner writes:

> Is there any reason that a security model does not exist for psql that
> allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> but any user trying to log on as someone other than themselves has to
> provide a password?

Short of someone sitting down and making it happen I don't see any. You'd
only need to implement some sort of fall-through in `pg_hba.conf', which
in my estimate can't be exceedingly hard.


-- 
Peter Eisentraut                  Sernanders vï¿½g 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Fri, 4 Aug 2000 23:59:34 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: Security choices...
[ Charset ISO-8859-1 unsupported, converting... ]
> Philip Warner writes:
> 
> > Is there any reason that a security model does not exist for psql that
> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> > but any user trying to log on as someone other than themselves has to
> > provide a password?
> 
> Short of someone sitting down and making it happen I don't see any. You'd
> only need to implement some sort of fall-through in `pg_hba.conf', which
> in my estimate can't be exceedingly hard.

How do you know Fred is Fred without a password?

-- 
  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, Pennsylvania 19026

Fri, 4 Aug 2000 18:34:17 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Security choices...
At 18:34 4/08/00 -0400, Bruce Momjian wrote:
>[ Charset ISO-8859-1 unsupported, converting... ]
>> Philip Warner writes:
>> 
>> > Is there any reason that a security model does not exist for psql that
>> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
>> > but any user trying to log on as someone other than themselves has to
>> > provide a password?
>> 
>> Short of someone sitting down and making it happen I don't see any. You'd
>> only need to implement some sort of fall-through in `pg_hba.conf', which
>> in my estimate can't be exceedingly hard.
>
>How do you know Fred is Fred without a password?
>

The idea was to apply only on the matchine on which the postmaster runs;
then ideally you get the username of the client process. It's kind of like
IDENT, except it works only for local connections, and asks for passwords
for non-local connections.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

Sat, 05 Aug 2000 10:13:54 +1000
Philip Warner <pjw@rhyme.com.au>
Re: Security choices...
> At 18:34 4/08/00 -0400, Bruce Momjian wrote:
> >[ Charset ISO-8859-1 unsupported, converting... ]
> >> Philip Warner writes:
> >> 
> >> > Is there any reason that a security model does not exist for psql that
> >> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> >> > but any user trying to log on as someone other than themselves has to
> >> > provide a password?
> >> 
> >> Short of someone sitting down and making it happen I don't see any. You'd
> >> only need to implement some sort of fall-through in `pg_hba.conf', which
> >> in my estimate can't be exceedingly hard.
> >
> >How do you know Fred is Fred without a password?
> >
> 
> The idea was to apply only on the matchine on which the postmaster runs;
> then ideally you get the username of the client process. It's kind of like
> IDENT, except it works only for local connections, and asks for passwords
> for non-local connections.

I am not aware of any way to determine the PID at the other end of a
unix domain socket.

-- 
  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, Pennsylvania 19026

Fri, 4 Aug 2000 23:13:23 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Security choices...
On Fri, 4 Aug 2000, Bruce Momjian wrote:

> > At 18:34 4/08/00 -0400, Bruce Momjian wrote:
> > >[ Charset ISO-8859-1 unsupported, converting... ]
> > >> Philip Warner writes:
> > >> 
> > >> > Is there any reason that a security model does not exist for psql that
> > >> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> > >> > but any user trying to log on as someone other than themselves has to
> > >> > provide a password?
> > >> 
> > >> Short of someone sitting down and making it happen I don't see any. You'd
> > >> only need to implement some sort of fall-through in `pg_hba.conf', which
> > >> in my estimate can't be exceedingly hard.
> > >
> > >How do you know Fred is Fred without a password?
> > >
> > 
> > The idea was to apply only on the matchine on which the postmaster runs;
> > then ideally you get the username of the client process. It's kind of like
> > IDENT, except it works only for local connections, and asks for passwords
> > for non-local connections.
> 
> I am not aware of any way to determine the PID at the other end of a
> unix domain socket.

You actually don't need the PID on the other end, what you are interested
are the credentials of a process on the other end. 

Unfortunately, every OS implemented it in very different way. Linux has
SO_PEERCREDS option, solaris has doors, xBSD have SCM_CREDS or LOCAL_CREDS

see:

http://metalab.unc.edu/pub/Linux/docs/HOWTO/Secure-Programs-HOWTO
http://www.whitefang.com/sup/work.html
http://cr.yp.to/docs/secureipc.html


Fri, 4 Aug 2000 23:50:20 -0400 (EDT)
Alex Pilosov <alex@pilosoft.com>
Peer credentials (was Security choices...)
this kinda has a hole in it also.. our database server only has about 5
uesrs on it , all are employee acounts, not clients. 

jeff

On Sat, 5 Aug 2000, Philip Warner wrote:

> At 18:34 4/08/00 -0400, Bruce Momjian wrote:
> >[ Charset ISO-8859-1 unsupported, converting... ]
> >> Philip Warner writes:
> >> 
> >> > Is there any reason that a security model does not exist for psql that
> >> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> >> > but any user trying to log on as someone other than themselves has to
> >> > provide a password?
> >> 
> >> Short of someone sitting down and making it happen I don't see any. You'd
> >> only need to implement some sort of fall-through in `pg_hba.conf', which
> >> in my estimate can't be exceedingly hard.
> >
> >How do you know Fred is Fred without a password?
> >
> 
> The idea was to apply only on the matchine on which the postmaster runs;
> then ideally you get the username of the client process. It's kind of like
> IDENT, except it works only for local connections, and asks for passwords
> for non-local connections.
> 
> 
> ----------------------------------------------------------------
> Philip Warner                    |     __---_____
> Albatross Consulting Pty. Ltd.   |----/       -  \
> (A.C.N. 008 659 498)             |          /(@)   ______---_
> Tel: (+61) 0500 83 82 81         |                 _________  \
> Fax: (+61) 0500 83 82 82         |                 ___________ |
> Http://www.rhyme.com.au          |                /           \|
>                                  |    --________--
> PGP key available upon request,  |  /
> and from pgp5.ai.mit.edu:11371   |/
> 

Jeff MacDonald,

-----------------------------------------------------
PostgreSQL Inc		| Hub.Org Networking Services
jeff@pgsql.com		| jeff@hub.org
www.pgsql.com		| www.hub.org
1-902-542-0713		| 1-902-542-3657
-----------------------------------------------------
Fascimile : 1 902 542 5386
IRC Nick  : bignose


Tue, 15 Aug 2000 19:55:55 -0300 (ADT)
Jeff MacDonald <jeff@pgsql.com>
Re: Security choices...

where is the hole?  don't you trust your employees? *raised eyebrows*

On Tue, 15 Aug 2000, Jeff MacDonald wrote:

> this kinda has a hole in it also.. our database server only has about 5
> uesrs on it , all are employee acounts, not clients. 
> 
> jeff
> 
> On Sat, 5 Aug 2000, Philip Warner wrote:
> 
> > At 18:34 4/08/00 -0400, Bruce Momjian wrote:
> > >[ Charset ISO-8859-1 unsupported, converting... ]
> > >> Philip Warner writes:
> > >> 
> > >> > Is there any reason that a security model does not exist for psql that
> > >> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> > >> > but any user trying to log on as someone other than themselves has to
> > >> > provide a password?
> > >> 
> > >> Short of someone sitting down and making it happen I don't see any. You'd
> > >> only need to implement some sort of fall-through in `pg_hba.conf', which
> > >> in my estimate can't be exceedingly hard.
> > >
> > >How do you know Fred is Fred without a password?
> > >
> > 
> > The idea was to apply only on the matchine on which the postmaster runs;
> > then ideally you get the username of the client process. It's kind of like
> > IDENT, except it works only for local connections, and asks for passwords
> > for non-local connections.
> > 
> > 
> > ----------------------------------------------------------------
> > Philip Warner                    |     __---_____
> > Albatross Consulting Pty. Ltd.   |----/       -  \
> > (A.C.N. 008 659 498)             |          /(@)   ______---_
> > Tel: (+61) 0500 83 82 81         |                 _________  \
> > Fax: (+61) 0500 83 82 82         |                 ___________ |
> > Http://www.rhyme.com.au          |                /           \|
> >                                  |    --________--
> > PGP key available upon request,  |  /
> > and from pgp5.ai.mit.edu:11371   |/
> > 
> 
> Jeff MacDonald,
> 
> -----------------------------------------------------
> PostgreSQL Inc		| Hub.Org Networking Services
> jeff@pgsql.com		| jeff@hub.org
> www.pgsql.com		| www.hub.org
> 1-902-542-0713		| 1-902-542-3657
> -----------------------------------------------------
> Fascimile : 1 902 542 5386
> IRC Nick  : bignose
> 

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 


Tue, 15 Aug 2000 20:22:16 -0300 (ADT)
The Hermit Hacker <scrappy@hub.org>
Re: Security choices...
only those that 
	1 : are named after cartoon dogs
	2 : they are named after software developers who tend to stay alone..

rofl..


course ,  i didn't say "my employees" i said
employees.. :)

jeff

On Tue, 15 Aug 2000, The Hermit Hacker wrote:

> 
> where is the hole?  don't you trust your employees? *raised eyebrows*
> 
> On Tue, 15 Aug 2000, Jeff MacDonald wrote:
> 
> > this kinda has a hole in it also.. our database server only has about 5
> > uesrs on it , all are employee acounts, not clients. 
> > 
> > jeff
> > 
> > On Sat, 5 Aug 2000, Philip Warner wrote:
> > 
> > > At 18:34 4/08/00 -0400, Bruce Momjian wrote:
> > > >[ Charset ISO-8859-1 unsupported, converting... ]
> > > >> Philip Warner writes:
> > > >> 
> > > >> > Is there any reason that a security model does not exist for psql that
> > > >> > allows Unix user 'fred' to log in as PG user 'fred' with no password etc,
> > > >> > but any user trying to log on as someone other than themselves has to
> > > >> > provide a password?
> > > >> 
> > > >> Short of someone sitting down and making it happen I don't see any. You'd
> > > >> only need to implement some sort of fall-through in `pg_hba.conf', which
> > > >> in my estimate can't be exceedingly hard.
> > > >
> > > >How do you know Fred is Fred without a password?
> > > >
> > > 
> > > The idea was to apply only on the matchine on which the postmaster runs;
> > > then ideally you get the username of the client process. It's kind of like
> > > IDENT, except it works only for local connections, and asks for passwords
> > > for non-local connections.
> > > 
> > > 
> > > ----------------------------------------------------------------
> > > Philip Warner                    |     __---_____
> > > Albatross Consulting Pty. Ltd.   |----/       -  \
> > > (A.C.N. 008 659 498)             |          /(@)   ______---_
> > > Tel: (+61) 0500 83 82 81         |                 _________  \
> > > Fax: (+61) 0500 83 82 82         |                 ___________ |
> > > Http://www.rhyme.com.au          |                /           \|
> > >                                  |    --________--
> > > PGP key available upon request,  |  /
> > > and from pgp5.ai.mit.edu:11371   |/
> > > 
> > 
> > Jeff MacDonald,
> > 
> > -----------------------------------------------------
> > PostgreSQL Inc		| Hub.Org Networking Services
> > jeff@pgsql.com		| jeff@hub.org
> > www.pgsql.com		| www.hub.org
> > 1-902-542-0713		| 1-902-542-3657
> > -----------------------------------------------------
> > Fascimile : 1 902 542 5386
> > IRC Nick  : bignose
> > 
> 
> Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
> Systems Administrator @ hub.org 
> primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 
> 

Jeff MacDonald,

-----------------------------------------------------
PostgreSQL Inc		| Hub.Org Networking Services
jeff@pgsql.com		| jeff@hub.org
www.pgsql.com		| www.hub.org
1-902-542-0713		| 1-902-542-3657
-----------------------------------------------------
Fascimile : 1 902 542 5386
IRC Nick  : bignose


Tue, 15 Aug 2000 23:46:20 -0300 (ADT)
Jeff MacDonald <jeff@pgsql.com>
Re: Security choices...
At 23:46 15/08/00 -0300, Jeff MacDonald wrote:
>
>course ,  i didn't say "my employees" i said
>employees.. :)
>

As distinct from the unemployed?


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

Wed, 16 Aug 2000 14:35:04 +1000
Philip Warner <pjw@rhyme.com.au>
Re: Security choices...
that's right, if you don't have a job..
you don't get an account... we're elitists :)

JOKING..

ok, this thread is dead.. i replied to a 10 day
old message anyway.

ciao.


On Wed, 16 Aug 2000, Philip Warner wrote:

> At 23:46 15/08/00 -0300, Jeff MacDonald wrote:
> >
> >course ,  i didn't say "my employees" i said
> >employees.. :)
> >
> 
> As distinct from the unemployed?
> 
> 
> ----------------------------------------------------------------
> Philip Warner                    |     __---_____
> Albatross Consulting Pty. Ltd.   |----/       -  \
> (A.B.N. 75 008 659 498)          |          /(@)   ______---_
> Tel: (+61) 0500 83 82 81         |                 _________  \
> Fax: (+61) 0500 83 82 82         |                 ___________ |
> Http://www.rhyme.com.au          |                /           \|
>                                  |    --________--
> PGP key available upon request,  |  /
> and from pgp5.ai.mit.edu:11371   |/
> 

Jeff MacDonald,

-----------------------------------------------------
PostgreSQL Inc		| Hub.Org Networking Services
jeff@pgsql.com		| jeff@hub.org
www.pgsql.com		| www.hub.org
1-902-542-0713		| 1-902-542-3657
-----------------------------------------------------
Fascimile : 1 902 542 5386
IRC Nick  : bignose


Wed, 16 Aug 2000 09:37:21 -0300 (ADT)
Jeff MacDonald <jeff@pgsql.com>
Re: Security choices...