Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etatB-0001lf-WC for pgsql-general@arkaria.postgresql.org; Wed, 07 Mar 2018 15:21:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etatA-0002L6-O1 for pgsql-general@arkaria.postgresql.org; Wed, 07 Mar 2018 15:21:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etaqy-0002Yt-JO for pgsql-general@lists.postgresql.org; Wed, 07 Mar 2018 15:19:40 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etaqu-0000up-6n for pgsql-general@lists.postgresql.org; Wed, 07 Mar 2018 15:19:38 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 2CABF5F79C; Wed, 7 Mar 2018 10:19:35 -0500 (EST) Date: Wed, 7 Mar 2018 10:19:35 -0500 From: Stephen Frost To: =?iso-8859-1?Q?Bj=F8rn?= T Johansen Cc: "pgsql-general@lists.postgresql.org" Subject: Re: Authentication? Message-ID: <20180307151934.GH2416@tamriel.snowman.net> References: <20180307141339.37622a41@pennywise-btj.brreg.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20180307141339.37622a41@pennywise-btj.brreg.no> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Greetings, * Bj=F8rn T Johansen (btj@havleik.no) wrote: > Is it possible to use one authentication method as default, like LDAP, an= d if the user is not found, then try to authenticate using > md5/scram-sha-256 ? Not directly in pg_hba.conf. You might be able to construct a system which works like this using PAM though, but it wouldn't be much fun. LDAP use really should be discouraged as it involves sending the password to the PG server. If you are operating in an active directory environment then you should be using GSSAPI/Kerberos. SCRAM is a good alternative as it doesn't send the password to the server either, though that is only available in PG10, of course. Thanks! Stephen