X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C96D28B9CC2 for ; Tue, 22 Feb 2005 15:18:46 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96692-07 for ; Tue, 22 Feb 2005 15:18:37 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E5A2D8B9C50 for ; Tue, 22 Feb 2005 15:18:40 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1MFIcvw009544; Tue, 22 Feb 2005 10:18:38 -0500 (EST) To: Bruno Wolff III Cc: Dick Davies , PostgreSQL Admin Subject: Re: pg_hba.conf In-reply-to: <20050222144751.GD22550@wolff.to> References: <20050222115641.GR66519@eris.tenfour> <20050222144751.GD22550@wolff.to> Comments: In-reply-to Bruno Wolff III message dated "Tue, 22 Feb 2005 08:47:51 -0600" Date: Tue, 22 Feb 2005 10:18:38 -0500 Message-ID: <9543.1109085518@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/220 X-Sequence-Number: 16388 Bruno Wolff III writes: > The host entry is the one that applies. But the host entry will allow either > ssl or nonssl, so it doesn't do what you want without cooperation from the > connecting client. You can use hostnossl to match without allowing ssl. > You will also want to use a hostssl line with 'reject' authentication > to keep the later rule from matching. I am not sure if all of the normal > clients will fallback after trying ssl to not using ssl. That should be > pretty easy to test though. Perhaps easier would be to set "PGSSLMODE=allow" (or even "disable") in the client environment. This will work for libpq-based clients; there may be something equivalent if you are using other software. The important point here is that it's the client's choice whether to try an SSL connection first or not, and libpq defaults to trying SSL first. So unless you set up pg_hba.conf to actively reject SSL-based connections, that's what you're going to get. Also: why aren't you just using a Unix socket? We never do SSL over Unix sockets. regards, tom lane