Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 6F3C29FA220 for ; Fri, 17 Nov 2006 07:04:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 84907-06-2 for ; Fri, 17 Nov 2006 07:04:40 -0400 (AST) X-Greylist: delayed 00:26:43.614442 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 9C7049FA158 for ; Fri, 17 Nov 2006 07:04:37 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.info3.com (smtp.info3.com [213.60.34.74]) by svr4.postgresql.org (Postfix) with ESMTP id 988ED5AF041 for ; Fri, 17 Nov 2006 10:37:51 +0000 (GMT) Received: by mail.info3.com (Postfix, from userid 102) id F0493130086; Fri, 17 Nov 2006 11:37:13 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.info3.com Received: from pcsergio.info3.net (unknown [192.168.0.24]) by mail.info3.com (Postfix) with ESMTP id 74253130081 for ; Fri, 17 Nov 2006 11:37:04 +0100 (CET) Date: Fri, 17 Nov 2006 11:37:37 +0100 From: "sergio.cinos@info3.com (IMAP)" X-Mailer: The Bat! (v3.80.06) Professional Reply-To: "sergio.cinos@info3.com (IMAP)" Organization: =?utf-8?Q?Info3_Servicios_Inform=C3=A1ticos?= X-Priority: 3 (Normal) Message-ID: <298705741.20061117113737@info3.com> To: pgsql-admin@postgresql.org Subject: Client SSL validation using root.crt MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/170 X-Sequence-Number: 23697 Dear list members, I see a strange behaviour using root.crt. PostgreSQL always waits a client certificate to check agains root.crt. But I set up a 'hostnossl' auth line un pg_hba.conf, PostgreSQL still wants a client certificate. Also fails if line is a 'host'. Better with an example: ---pg_hba.conf--- hostssl all all 192.168.0.1/32 md5 hostnossl all all 192.168.0.2/32 md5 ----------------- If I connect to PostgresSQL from 192.168.0.1, it fails if I don't provide a client certificate, it is ok. But if I connect from 192.168.0.2, it also fails becouse I don't send a certificate. But I declared a non-ssl connection from 192.168.0.2, it should let me connect to databases, isn'it? Removing root.crt works as expected. Client in 192.168.0.1 connect using a SSL connection, and client in 192.168.0.2 connect using a single connection. It this behaviour ok? I think not. I want to allow clients on my LAN access PostgreSQL server without a SSL connection , and require a client certificate and a SSL connection to clients from outside my LAN. I think it is not a strange configuration. So the configuration is: ---pg_hba.conf--- hostnossl all all md5 hostssl 0.0.0.0/0 md5 ----------------- This fails, because PostgreSQL expect that all clients provide a client certificate. Is there any config option to solve this? Is there any page or manual about PostgreSQL with SSL (more in-deep that http://www.postgresql.org/docs/8.0/interactive/ssl-tcp.html) ? Oh, I'm using PostgreSQL 8.0.8 on a Gentoo box. Maybe I have to upgrade to another version? Thans you in advance. --=20 Sergio Cinos Info3 Servicios Inform=C3=A1ticos S.L. sergio.cinos@info3.com - www.info3.com=20