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

From Robert Haas
Subject Re: [HACKERS] scram and \password
Date
Msg-id CA+Tgmob3oL+xLxMgD6zmhhDab62yr67W4bbALT3G_swkG6NmPg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] scram and \password  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: [HACKERS] scram and \password  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Apr 26, 2017 at 6:22 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> On 04/25/2017 06:26 PM, Heikki Linnakangas wrote:
>> Thoughts? Unless someone has better ideas or objections, I'll go
>> implement that.
> This is what I came up with in the end. Some highlights and differences vs
> the plan I posted earlier:
>
> * If algorithm is not given explicitly, PQencryptPasswordConn() queries
> "SHOW password_encryption", and uses that. That is documented, and it is
> also documented that it will *not* issue queries, and hence will not block,
> if the algorithm is given explicitly. That's an important property for some
> applications. If you want the default behavior without blocking, query "SHOW
> password_encryption" yourself, and pass the result as the 'algorithm'.

TBH, I'd just require the user to specify the algorithm explicitly.
Having it run SHOW on the server seems wonky.  It introduces a bunch
of failure modes for ... no real benefit, I think.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [HACKERS] some review comments on logical rep code
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables