Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krQAG-0000Ey-S1 for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Dec 2020 18:44:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1krQAF-0002Yd-IF for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Dec 2020 18:44:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krQAF-0002YV-BH for pgsql-hackers@lists.postgresql.org; Mon, 21 Dec 2020 18:44:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krQA8-0006sW-W3 for pgsql-hackers@postgresql.org; Mon, 21 Dec 2020 18:44:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0BLIi2e3544465; Mon, 21 Dec 2020 13:44:02 -0500 From: Tom Lane To: Stephen Frost cc: Jeff Janes , Magnus Hagander , Thomas Munro , k.yudhveer@gmail.com, pgsql-hackers Subject: Re: BUG #16079: Question Regarding the BUG #16064 In-reply-to: <20201221183511.GI27507@tamriel.snowman.net> References: <16079-29e9c038e1463751@postgresql.org> <20191028154754.GS6962@tamriel.snowman.net> <20201221005825.GQ16415@tamriel.snowman.net> <543836.1608575492@sss.pgh.pa.us> <20201221183511.GI27507@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Mon, 21 Dec 2020 13:35:11 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <544463.1608576242.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 21 Dec 2020 13:44:02 -0500 Message-ID: <544464.1608576242@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> Jeff Janes writes: >>> I would suggest going further. I would make the change on the client = side, >>> and have libpq refuse to send unhashed passwords without having an >>> environment variable set which allows it. >> As noted, that would break LDAP and RADIUS auth methods; likely also PA= M. > Which would be an altogether good thing as all of those end up exposing > sensitive information should the server be compromised and a user uses > one of them to log in. Hm. I'm less concerned about that scenario than about somebody snooping the on-the-wire traffic. If we're going to invent a connection setting for this, I'd say that in addition to "ok to send cleartext password" and "never ok to send cleartext password", there should be a setting for "send cleartext password only if connection is encrypted". Possibly that should even be the default. (I guess Unix-socket connections would be an exception, since we never encrypt those.) BTW, do we have a client-side setting to insist that passwords not be sent in MD5 hashing either? A person who is paranoid about this would likely want to disable that code path as well. regards, tom lane