X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 78C6D9FB1F2 for ; Thu, 14 Sep 2006 12:02:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 98158-03 for ; Thu, 14 Sep 2006 15:02:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id B50C69FB1BC for ; Thu, 14 Sep 2006 12:02:06 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id k8EF1wps064804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Sep 2006 09:02:01 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id k8EF1wY0096172; Thu, 14 Sep 2006 09:01:58 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id k8EF1wfV096171; Thu, 14 Sep 2006 09:01:58 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 14 Sep 2006 09:01:57 -0600 From: Michael Fuhr To: Jeanna Geier Cc: pgsql-admin@postgresql.org Subject: Re: Beginning SSL Questions Message-ID: <20060914150157.GA76098@winnie.fuhr.org> References: <009801c6d808$7200a260$6700a8c0@geier> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <009801c6d808$7200a260$6700a8c0@geier> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200609/135 X-Sequence-Number: 23049 On Thu, Sep 14, 2006 at 09:17:00AM -0500, Jeanna Geier wrote: > - In the docs, it says that when using SSL in Postgres "This requires > that OpenSSL is installed on both client and server systems and > that support in PostgreSQL is enabled at build time" - is this > correct? PostgreSQL must have been built with the --with-openssl configure option and the server needs "ssl = on" in postgresql.conf. > Or can we use the certificates and keystore file we generated using > the Jave keytool implementing SSL with Tomcat? You can use the same certificate and key but you'll need to copy them to your $PGDATA directory as server.crt and server.key (whether using the same certificate and key is a good idea is an administrative and/or security matter, but from a technical standpoint it should work). If you want to require SSL client authentication then also install the CA certificate(s) as root.crt. I'd suggest getting non-authenticated SSL working first and only then set up client authentication if you need it. If you want to require SSL connections (authenticated or not) then use "hostssl" in pg_hba.conf and make sure no other entry will match a non-SSL connection. > - In perusing the mailing list, it appears that this is not going > to be a 'simple' task...any pointers that anyone can give to me > before we start? If possible, I'd like to avoid another hair-pulling > three week task! =o) Setting up SSL is simple. Read "Secure TCP/IP Connections with SSL," "SSL Support," and "Client Authentication" in the documentation and follow the instructions therein. http://www.postgresql.org/docs/8.1/interactive/ssl-tcp.html http://www.postgresql.org/docs/8.1/interactive/libpq-ssl.html http://www.postgresql.org/docs/8.1/interactive/client-authentication.html If you have trouble then please report what you did, what you expected to happen, and what did happen (including client and server error messages). -- Michael Fuhr