Re: Using both ident and password in pg_hba.conf

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Using both ident and password in pg_hba.conf
Дата
Msg-id 24e11d94-ddb9-9606-8fed-229fce163fe4@hogranch.com
обсуждение исходный текст
Ответ на Re: Using both ident and password in pg_hba.conf  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Ответы Re: Using both ident and password in pg_hba.conf  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Список pgsql-general
On 5/9/2016 2:42 PM, D'Arcy J.M. Cain wrote:
I had an idea that that wouldn't be so easy else we would have had it
by now.  However, I am not sure that that is what is needed.  I was
thinking of something like this:

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

The "all@nobody" field is meant to specify that the remote user is
nobody but that they are connecting as user joe.  You would be able to
use "all" as well.  You don't even need to do an ident check unless the
auth method is "trust" which would be silly anyway.  In fact "password"
is the only method that even makes any sense at all.


over a tcp socket, there's no way of knowing *WHAT* the system user is short of querying the unreliable service 'authd' (113/tcp) and hoping that it A) exists and B) returns something meaningful.   authd/ident services can return virtually anything they want to.


when pg_hba.conf is searched, all thats known is the socket type (host or local), the database name, the requested(!) username, and if its 'host', the source IP address.   this is used to select the desired authentication method for that combination.



-- 
john r pierce, recycling bits in santa cruz

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Mead
Дата:
Сообщение: Re: Using both ident and password in pg_hba.conf
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Using both ident and password in pg_hba.conf