pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Authentication
13+ messages / 9 participants
[nested] [flat]

* Authentication
@ 2000-08-11 22:20  Tressens Lionel <tressens@etud.insa-tlse.fr>
  0 siblings, 0 replies; 13+ messages in thread

From: Tressens Lionel @ 2000-08-11 22:20 UTC (permalink / raw)
  To: pgsql-general

Hi,

Currently, I authenticate the users connecting to my database with a login
and a password.
But I would also like to add authentication based on identd.
I want that a user whose login is 'john' to be first identified by identd
daemon and then asked for password corresponding to 'john' in pg_passwd or
a flat password file. (i.e. I want to disable any attempt of login faking)


Another problem :
If I store a passwd for a user in a flat password file, and configure
pg_hba.conf like this :
host	zzz.yyy.xxx.0   255.255.255.0   password myfile
it works...

but if I store passwords in pg_passwd, and change pg_hba.conf line to :
host   zzz.yyy.xxx.0    255.255.255.0   password
or
host   zzz.yyy.xxx.0    255.255.255.0   crypt

it doesn't work... why ?
How has password to be stored in pg_passwd ? clear or DES cyphered ? (I
store it DES cyphered)


Thanks in advance,

Lionel






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

* Authentication
@ 2000-09-15 18:43  Matt Barringer <matt@wirex.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Matt Barringer @ 2000-09-15 18:43 UTC (permalink / raw)
  To: pgsql-general

Where, in the backend code, is the authentication handled?  And at what
stage is it handled?

Thanks.

-- 
Matt Barringer
Adversary
WireX, Inc.





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

* Authentication
@ 2001-05-14 14:26  Christine Kluka <klukac@c4.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Christine Kluka @ 2001-05-14 14:26 UTC (permalink / raw)
  To: pgsql-general

I am trying to connect to postgres from a cgi script.  In order for it to connect to postgres,
I need to create a new postgres user that matches the Unix owner of my Web files.  I don't get an error on create user, but I cannot find a pg_shadow file.  Is the pg_shadow file supposed to be in my pgsql directory or is it generated by a command somewhere?

I'm using my backup mail account to send this, hope it'll work...

--------------------------------------------------
Totally Amazing Search Results - Just C4 Yourself!
http://www.C4.com - Total Search Technology



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

* Re: Authentication
@ 2001-05-16 05:27  will trillich <will@serensoft.com>
  parent: Christine Kluka <klukac@c4.com>
  0 siblings, 0 replies; 13+ messages in thread

From: will trillich @ 2001-05-16 05:27 UTC (permalink / raw)
  To: pgsql-general

On Mon, May 14, 2001 at 02:26:46PM -0000, Christine Kluka wrote:
> I am trying to connect to postgres from a cgi script.  In
> order for it to connect to postgres, I need to create a new
> postgres user that matches the Unix owner of my Web files.  I
> don't get an error on create user, but I cannot find a
> pg_shadow file.  Is the pg_shadow file supposed to be in my
> pgsql directory or is it generated by a command somewhere?

pg_shadow is one of the postgres database files.

	% psql
	> \dS

also try

	> \d pg_user

it's neat to discover how they hide those passwords.

-- 
What do I need manners for? I already got me a wife.
	-- Adam Pontipee, "Seven Brides for Seven Brothers"

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



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

* Re: Re: Authentication
@ 2001-06-22 15:30  Lamar Owen <lamar.owen@wgcr.org>
  0 siblings, 0 replies; 13+ messages in thread

From: Lamar Owen @ 2001-06-22 15:30 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Andreas Tille <tillea@rki.de>; +Cc: Debian PostgreSQL Liste <debian-postgresql@cochrane.atnet.at>; pgsql-general

On Friday 22 June 2001 09:44, Tom Lane wrote:
> Where did that come from?  There is certainly no such thing in any
> official Postgres release.  Is Debian shipping locally-modified
> Postgres?  If so I think they need to label it as such.

Please see 
http://non-us.debian.org/debian-non-US/pool/non-US/main/p/postgresql/postgresql_7.1.2-1.diff.gz
for details.

It's fascinating.

For the record, the RPM patches don't go this far.  Just enough patching to 
build and run to FHS standards is all I have done. (see 
http://www.postgresql.org/ftpsite/binary/v7.1.2/RPMS/rpm-pgsql-7.1.patch)
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11



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

* Authentication?
@ 2018-03-07 13:13  Bjørn T Johansen <btj@havleik.no>
  0 siblings, 2 replies; 13+ messages in thread

From: Bjørn T Johansen @ 2018-03-07 13:13 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi.

Is it possible to use one authentication method as default, like LDAP, and if the user is not found, then try to authenticate using
md5/scram-sha-256 ?


Regards,

BTJ

-- 
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------




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

* Re: Authentication?
@ 2018-03-07 14:14  David G. Johnston <david.g.johnston@gmail.com>
  parent: Bjørn T Johansen <btj@havleik.no>
  1 sibling, 1 reply; 13+ messages in thread

From: David G. Johnston @ 2018-03-07 14:14 UTC (permalink / raw)
  To: Bjørn T Johansen <btj@havleik.no>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Wed, Mar 7, 2018 at 6:13 AM, Bjørn T Johansen <btj@havleik.no> wrote:

> Hi.
>
> Is it possible to use one authentication method as default, like LDAP, and
> if the user is not found, then try to authenticate using
> md5/scram-sha-256 ?
>

​In the "Client Authentication" Chapter:​

​https://www.postgresql.org/docs/10/static/auth-pg-hba-conf.html​

​"""
​The first record with a matching connection type, client address,
requested database, and user name is used to perform authentication. There
is no “fall-through” or “backup”: if one record is chosen and the
authentication fails, subsequent records are not considered. If no record
matches, access is denied.
"""

David J.

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

* Re: Authentication?
@ 2018-03-07 15:14  Bjørn T Johansen <btj@havleik.no>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Bjørn T Johansen @ 2018-03-07 15:14 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Wed, 7 Mar 2018 07:14:55 -0700
"David G. Johnston" <david.g.johnston@gmail.com> wrote:

> On Wed, Mar 7, 2018 at 6:13 AM, Bjørn T Johansen <btj@havleik.no> wrote:
> 
> > Hi.
> >
> > Is it possible to use one authentication method as default, like LDAP, and
> > if the user is not found, then try to authenticate using
> > md5/scram-sha-256 ?
> >  
> 
> ​In the "Client Authentication" Chapter:​
> 
> ​https://www.postgresql.org/docs/10/static/auth-pg-hba-conf.html​
> 
> ​"""
> ​The first record with a matching connection type, client address,
> requested database, and user name is used to perform authentication. There
> is no “fall-through” or “backup”: if one record is chosen and the
> authentication fails, subsequent records are not considered. If no record
> matches, access is denied.
> """
> 
> David J.

I was hoping I had misunderstood but ok.. :)

BTJ




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

* Re: Authentication?
@ 2018-03-07 15:19  David G. Johnston <david.g.johnston@gmail.com>
  parent: Bjørn T Johansen <btj@havleik.no>
  0 siblings, 0 replies; 13+ messages in thread

From: David G. Johnston @ 2018-03-07 15:19 UTC (permalink / raw)
  To: Bjørn T Johansen <btj@havleik.no>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Wed, Mar 7, 2018 at 8:14 AM, Bjørn T Johansen <btj@havleik.no> wrote:

> On Wed, 7 Mar 2018 07:14:55 -0700
> "David G. Johnston" <david.g.johnston@gmail.com> wrote:
>
> > On Wed, Mar 7, 2018 at 6:13 AM, Bjørn T Johansen <btj@havleik.no> wrote:
> >
> > > Hi.
> > >
> > > Is it possible to use one authentication method as default, like LDAP,
> and
> > > if the user is not found, then try to authenticate using
> > > md5/scram-sha-256 ?
> > >
> >
> > ​In the "Client Authentication" Chapter:​
> >
> > ​https://www.postgresql.org/docs/10/static/auth-pg-hba-conf.html​
> >
> > ​"""
> > ​The first record with a matching connection type, client address,
> > requested database, and user name is used to perform authentication.
> There
> > is no “fall-through” or “backup”: if one record is chosen and the
> > authentication fails, subsequent records are not considered. If no record
> > matches, access is denied.
> > """
> >
>
> I was hoping I had misunderstood but ok.. :)
>

​In the specific case you describe here you could have the server poll the
LDAP server periodically and cache the user names recognized and the
leverage:

"​Multiple user names can be supplied by separating them with commas. A
separate file containing user names can be specified by preceding the file
name with @."

In short, you have to pre-compute which method each user is allowed to
access externally then provide that knowledge to PostgreSQL.

David J.

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

* Re: Authentication?
@ 2018-03-07 15:19  Stephen Frost <sfrost@snowman.net>
  parent: Bjørn T Johansen <btj@havleik.no>
  1 sibling, 2 replies; 13+ messages in thread

From: Stephen Frost @ 2018-03-07 15:19 UTC (permalink / raw)
  To: Bjørn T Johansen <btj@havleik.no>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Greetings,

* Bjørn T Johansen (btj@havleik.no) wrote:
> Is it possible to use one authentication method as default, like LDAP, and if the user is not found, then try to authenticate using
> md5/scram-sha-256 ?

Not directly in pg_hba.conf.  You might be able to construct a system
which works like this using PAM though, but it wouldn't be much fun.

LDAP use really should be discouraged as it involves sending the
password to the PG server.  If you are operating in an active directory
environment then you should be using GSSAPI/Kerberos.

SCRAM is a good alternative as it doesn't send the password to the
server either, though that is only available in PG10, of course.

Thanks!

Stephen




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

* Re: Authentication?
@ 2018-03-07 15:36  Benedict Holland <benedict.m.holland@gmail.com>
  parent: Stephen Frost <sfrost@snowman.net>
  1 sibling, 1 reply; 13+ messages in thread

From: Benedict Holland @ 2018-03-07 15:36 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: Bjørn T Johansen <btj@havleik.no>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Not to get off topic, can you authenticate database users via Kerberos?

Thanks,
~Ben

On Wed, Mar 7, 2018 at 10:19 AM, Stephen Frost <sfrost@snowman.net> wrote:

> Greetings,
>
> * Bjørn T Johansen (btj@havleik.no) wrote:
> > Is it possible to use one authentication method as default, like LDAP,
> and if the user is not found, then try to authenticate using
> > md5/scram-sha-256 ?
>
> Not directly in pg_hba.conf.  You might be able to construct a system
> which works like this using PAM though, but it wouldn't be much fun.
>
> LDAP use really should be discouraged as it involves sending the
> password to the PG server.  If you are operating in an active directory
> environment then you should be using GSSAPI/Kerberos.
>
> SCRAM is a good alternative as it doesn't send the password to the
> server either, though that is only available in PG10, of course.
>
> Thanks!
>
> Stephen
>
>

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

* Re: Authentication?
@ 2018-03-07 15:40  Stephen Frost <sfrost@snowman.net>
  parent: Benedict Holland <benedict.m.holland@gmail.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Stephen Frost @ 2018-03-07 15:40 UTC (permalink / raw)
  To: Benedict Holland <benedict.m.holland@gmail.com>; +Cc: Bjørn T Johansen <btj@havleik.no>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Greetings,

* Benedict Holland (benedict.m.holland@gmail.com) wrote:
> Not to get off topic, can you authenticate database users via Kerberos?

Absolutely.  GSSAPI is the auth method to use for Kerberos.

Thanks!

Stephen




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

* Re: Authentication?
@ 2018-03-09 08:25  Bjørn T Johansen <btj@havleik.no>
  parent: Stephen Frost <sfrost@snowman.net>
  1 sibling, 0 replies; 13+ messages in thread

From: Bjørn T Johansen @ 2018-03-09 08:25 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Wed, 7 Mar 2018 10:19:35 -0500
Stephen Frost <sfrost@snowman.net> wrote:

> Greetings,
> 
> * Bjørn T Johansen (btj@havleik.no) wrote:
> > Is it possible to use one authentication method as default, like LDAP, and if the user is not found, then try to authenticate using
> > md5/scram-sha-256 ?  
> 
> Not directly in pg_hba.conf.  You might be able to construct a system
> which works like this using PAM though, but it wouldn't be much fun.
> 
> LDAP use really should be discouraged as it involves sending the
> password to the PG server.  If you are operating in an active directory
> environment then you should be using GSSAPI/Kerberos.
> 
> SCRAM is a good alternative as it doesn't send the password to the
> server either, though that is only available in PG10, of course.
> 
> Thanks!
> 
> Stephen

Ok, thx... Will check out GSSAPI/Kerberos instead... :)

BTJ




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


end of thread, other threads:[~2018-03-09 08:25 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-08-11 22:20 Authentication Tressens Lionel <tressens@etud.insa-tlse.fr>
2000-09-15 18:43 Authentication Matt Barringer <matt@wirex.com>
2001-05-14 14:26 Authentication Christine Kluka <klukac@c4.com>
2001-05-16 05:27 ` will trillich <will@serensoft.com>
2001-06-22 15:30 Re: Re: Authentication Lamar Owen <lamar.owen@wgcr.org>
2018-03-07 13:13 Authentication? Bjørn T Johansen <btj@havleik.no>
2018-03-07 14:14 ` Re: Authentication? David G. Johnston <david.g.johnston@gmail.com>
2018-03-07 15:14   ` Re: Authentication? Bjørn T Johansen <btj@havleik.no>
2018-03-07 15:19     ` Re: Authentication? David G. Johnston <david.g.johnston@gmail.com>
2018-03-07 15:19 ` Re: Authentication? Stephen Frost <sfrost@snowman.net>
2018-03-07 15:36   ` Re: Authentication? Benedict Holland <benedict.m.holland@gmail.com>
2018-03-07 15:40     ` Re: Authentication? Stephen Frost <sfrost@snowman.net>
2018-03-09 08:25   ` Re: Authentication? Bjørn T Johansen <btj@havleik.no>

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