Re: Test mail for pgsql-general - Mailing list pgsql-general

From David G. Johnston
Subject Re: Test mail for pgsql-general
Date
Msg-id CAKFQuwbpdwCxDgY5cjDh-8uneNA010BLfd8TEGF5BJOksxRtbg@mail.gmail.com
Whole thread Raw
In response to Re: Test mail for pgsql-general  (Chris Miller <cjm@tryx.org>)
Responses Re: Test mail for pgsql-general
List pgsql-general
On Tuesday, September 10, 2024, Chris Miller <cjm@tryx.org> wrote:
Hi Folks,

I am confused about authentication. I understand that in the local connection case, I have choices of “peer”, and “md5” (password).


In pg_hba.conf, I have the lines:


local all all peer

local all all md5


The second line is pointless, the first three columns are compared against the incoming connection host/user/dbname to find out how authentication should be handled.  The first match wins.  So for every local connection peer, and only peer, is going to be used since everything matches all/all.

There is no way to give a user a choice of how to authenticate.  There will be one accepted option for a given set of connection values.

David J.
 

pgsql-general by date:

Previous
From: Chris Miller
Date:
Subject: Re: Test mail for pgsql-general
Next
From: Adrian Klaver
Date:
Subject: Re: Test mail for pgsql-general