From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Dick Davies <rasputnik@hellooperator.net>
Cc: PostgreSQL Admin <pgsql-admin@postgresql.org>
Subject: Re: pg_hba.conf
Date: Tue, 22 Feb 2005 10:18:38 -0500
Message-ID: <9543.1109085518@sss.pgh.pa.us> (raw)
In-Reply-To: <20050222144751.GD22550@wolff.to>
References: <20050222115641.GR66519@eris.tenfour>
<20050222144751.GD22550@wolff.to>
Bruno Wolff III <bruno@wolff.to> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, bruno@wolff.to, rasputnik@hellooperator.net
Subject: Re: pg_hba.conf
In-Reply-To: <9543.1109085518@sss.pgh.pa.us>
References: <20050222115641.GR66519@eris.tenfour> <20050222144751.GD22550@wolff.to> <9543.1109085518@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox