Re: Allow cluster owner to bypass authentication

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow cluster owner to bypass authentication
Date: 2019-12-27 17:20:13
Message-ID: 7c711365-ee45-e461-4fce-2222e3c755f3@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-12-18 15:09, Robert Haas wrote:
> I feel like this is taking a policy decision that properly belongs in
> pg_hba.conf and making it into a GUC. If you're introducing a GUC
> because it's not possible to configure the behavior that you want in
> pg_hba.conf, then I think the solution to that is to enhance
> pg_hba.conf so that it can support the behavior you want to configure.

Yeah, I was not really happy with that either. So I tried a new
approach: Introduce a new pg_hba.conf line type "localowner" that
matches on Unix-domain socket connections if the user at the client end
matches the owner of the postgres process. Then the behavior I'm after
can be expressed with a pg_hba.conf entry like

localowner all all trust

or similar, as one chooses.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-localowner-authentication.patch text/plain 8.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-12-27 17:32:29 Re: Allow cluster owner to bypass authentication
Previous Message Teodor Sigaev 2019-12-27 17:13:26 aggregate crash