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 1nNPiC-0000at-EC for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 01:48:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nNPiB-0006sB-95 for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 01:47:59 +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 1nNPiA-0006rw-V8 for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 01:47:58 +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 1nNPi8-0005tf-Ex for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 01:47:57 +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 21P1lsQw1737575; Thu, 24 Feb 2022 20:47:54 -0500 From: Tom Lane To: Jeff Davis cc: samay sharma , pgsql-hackers@lists.postgresql.org Subject: Re: Proposal: Support custom authentication methods using hooks In-reply-to: References: Comments: In-reply-to Jeff Davis message dated "Thu, 24 Feb 2022 17:02:45 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1737573.1645753674.1@sss.pgh.pa.us> Date: Thu, 24 Feb 2022 20:47:54 -0500 Message-ID: <1737574.1645753674@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > On Thu, 2022-02-17 at 11:25 -0800, samay sharma wrote: >> To enable this, I've proposed adding a new authentication method >> "custom" which can be specified in pg_hba.conf and takes a mandatory >> argument "provider" specifying which authentication provider to use. > One caveat is that this only works given information available from > existing authentication methods, because that's all the client > supports. In practice, it seems to only be useful with plaintext > password authentication over an SSL connection. ... and, since we can't readily enforce that the client only sends those cleartext passwords over suitably-encrypted connections, this could easily be a net negative for security. Not sure that I think it's a good idea. regards, tom lane