Re: [HACKERS] scram and \password - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] scram and \password
Date
Msg-id CAB7nPqTUBYwPfr4o5z+petZ+94ymGRjev1U7x0xdA8zruqtRXg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] scram and \password  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] scram and \password  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Mar 14, 2017 at 11:47 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I'm not talking about changing the default, just having it be possible
>> to use \password with the new system as it was with the old, whatever
>> exactly we think that means.

I think that this means looking at password_encryption within
PQencryptPassword(), something that could silently break some
applications. That's why with Joe we are mentioning upthread to extend
PQencryptPassword() with a hashing method, and have a function to
allow retrieval of the password type for a given user.

> Seems to me the intended behavior of \password is to use the best
> available practice.  So my guess is that it ought to use SCRAM when
> talking to a >= 10.0 server.  What the previous password was ought
> to be irrelevant, even if it could find that out which it shouldn't
> be able to IMO.

And in a release or two? SCRAM being a fresh feature, switching the
hashing now is not much a conservative approach.
-- 
Michael



pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: [HACKERS] Unacccented Fractions
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] scram and \password