Using both ident and password in pg_hba.conf - Mailing list pgsql-general

From D'Arcy J.M. Cain
Subject Using both ident and password in pg_hba.conf
Date
Msg-id 20160509154428.0ab363bf@imp
Whole thread Raw
Responses Re: Using both ident and password in pg_hba.conf  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Using both ident and password in pg_hba.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Here's my situation.  I have a mix of users.  Some are running PHP
sites and some are not.  PHP runs as the web server owner, "nobody."
Everyone else runs as their own user.

Since the PHP sites run as nobody I want to require password but accept
ident (from the server I control) for the rest.  There does not appear
to be a way to specif that.  Here was one attempt:

host    all       nobody   192.168.151.75/32       password
host    all       all      192.168.151.75/32       ident

But that doesn't work.  The actual user according to ident is nobody
but the request is for a specific user.  As a result it isn't
recognized by the first line so it tries ident anyway and fails.

Is there any way to accomplish what I want?  Any help appreciated.

Cheers.

--
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 788 2246     (DoD#0082)    (eNTP)   |  what's for dinner.
IM: darcy@Vex.Net, VoIP: sip:darcy@druid.net


pgsql-general by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Ubuntu/Debian PGDP
Next
From: Adrian Klaver
Date:
Subject: Re: Using both ident and password in pg_hba.conf