Re: initdb recommendations

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: initdb recommendations
Date: 2019-05-24 00:13:54
Message-ID: 9f46f065-ca80-f637-8c5d-a9877bcd5eab@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On 5/23/19 6:47 PM, Jonathan S. Katz wrote:
> On 5/23/19 12:54 PM, Peter Eisentraut wrote:
>> On 2019-04-06 20:08, Noah Misch wrote:
>>>>> I think we should just change the defaults. There is a risk of warning
>>>>> fatigue. initdb does warn about this, so anyone who cared could have
>>>>> gotten the information.
>>>>>
>>>>
>>>> I've been suggesting that for years, so definite strong +1 for doing that.
>>>
>>> +1
>>
>> To recap, the idea here was to change the default authentication methods
>> that initdb sets up, in place of "trust".
>>
>> I think the ideal scenario would be to use "peer" for local and some
>> appropriate password method (being discussed elsewhere) for host.
>
> +1.
>
>> Looking through the buildfarm, I gather that the only platforms that
>> don't support peer are Windows, AIX, and HP-UX. I think we can probably
>> figure out some fallback or alternative default for the latter two
>> platforms without anyone noticing. But what should the defaults be on
>> Windows? It doesn't have local sockets, so the lack of peer wouldn't
>> matter. But is it OK to default to a password method, or would that
>> upset people particularly?
>
> +1 for password method. Definitely better than trust :)

Attached is v2 of the patch.

For now I have left in the password based method to be scram-sha-256 as
I am optimistic about the support across client drivers[1] (and FWIW I
have an implementation for crystal-pg ~60% done).

However, this probably means we would need to set the default password
encryption guc to "scram-sha-256" which we're not ready to do yet, so it
may be moot to leave it in.

So, thinking out loud about that, we should probably use "md5" and once
we decide to make the encryption method "scram-sha-256" by default, then
we update the recommendation?

Thanks,

Jonathan

Attachment Content-Type Size
0001-Add-a-warning-about-the-client-authentication-v2.patch text/plain 3.6 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2019-05-24 02:28:27 Re: initdb recommendations
Previous Message Jonathan S. Katz 2019-05-23 22:47:04 Re: initdb recommendations

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-05-24 00:24:36 Re: nitpick about poor style in MergeAttributes
Previous Message Thomas Munro 2019-05-24 00:07:17 Re: Minor typos and copyright year slippage