Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6PBV-0001XU-8i for pgsql-admin@arkaria.postgresql.org; Mon, 14 Nov 2016 21:53:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c6PBU-00070v-Ie for pgsql-admin@arkaria.postgresql.org; Mon, 14 Nov 2016 21:53:00 +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.84_2) (envelope-from ) id 1c6PBT-00070o-Pm for pgsql-admin@postgresql.org; Mon, 14 Nov 2016 21:52:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c6PBR-00018T-GT for pgsql-admin@postgresql.org; Mon, 14 Nov 2016 21:52:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uAELqt3p013379; Mon, 14 Nov 2016 16:52:55 -0500 From: Tom Lane To: John Scalia cc: Venkata B Nagothi , pgsql-admin Subject: Re: hostnossl in pg_hba.conf demands a password In-reply-to: <5878107F-B5AB-4AEB-8B52-987AF3DB1739@gmail.com> References: <5878107F-B5AB-4AEB-8B52-987AF3DB1739@gmail.com> Comments: In-reply-to John Scalia message dated "Mon, 14 Nov 2016 16:23:05 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13377.1479160375.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Nov 2016 16:52:55 -0500 Message-ID: <13378.1479160375@sss.pgh.pa.us> X-Pg-Spam-Score: -4.7 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org John Scalia writes: > The only entries are a local connection line with md5 authentication spec= ified and a line for local replication with a trust authentication. Both of= these entries do seem to be working properly. So the client is trying an SSL connection first (which would be the default behavior for libpq at least), and that falls through the hostnossl line and is captured by the md5 line. Hence you get a password prompt. The client has no way to know that a non-SSL connection would have gotten a different response. You could change the md5 line to hostssl, perhaps. Or configure the client to try non-SSL first (see sslprefer). regards, tom lane --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin