X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6C776D1C511 for ; Thu, 24 Jul 2003 20:44:59 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 73908-01 for ; Thu, 24 Jul 2003 17:44:16 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id E25F7D1C50D for ; Thu, 24 Jul 2003 17:44:55 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h6OKim627411; Thu, 24 Jul 2003 16:44:48 -0400 (EDT) From: Bruce Momjian Message-Id: <200307242044.h6OKim627411@candle.pha.pa.us> Subject: Re: using ssl some of the time In-Reply-To: <3F2022F0.2000106@hss.caltech.edu> To: Charles Hornberger Date: Thu, 24 Jul 2003 16:44:48 -0400 (EDT) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/253 X-Sequence-Number: 9593 Charles Hornberger wrote: > Bruce Momjian wrote: > > Charles Hornberger wrote: > > > >>On Wed, 23 Jul 2003, Bruce Momjian wrote: > >> > >>>Charles Hornberger wrote: > >>> > >>>>Am I right in interpreting this to mean that I either have to use SSL > >>>>all the time or none of the time? I'm especially tempted to believe > >>>>this might be the case after seeing this item in the "Clients" section > >>>>of http://developer.postgresql.org/todo.php: > >>>> > >>>> - Allow SSL-enabled clients to turn off SSL transfers > >>>> > >>>>Does that mean that, if SSL is enabled for the postmaster, the client > >>>>will always be forced to use SSL? Or is there something I need to do to > >>>>force the client to NOT use SSL? > >>> > >>>Right, it will use SSL if possible, so if both client and server are SSL > >>>enabled, SSL will be used. 7.4 will allow you to control that. > > > I have one more question about the plans for 7.4. How will users of > clients based on libpq use this? Will there be a new optional connection > parameter ('ssl=true') or something? Yes, exactly. > Just a quick follow-up to share one (!) data point, which looks to me > like it indicates that SSL encryption/decryption is pretty expensive on > one of our Sun Ultra 5 boxes. The following query ("select * from wp") > generates ~270K of output. When executed via a psql client that's > connected over a non-encrypted link, it takes 0.7 seconds; over an > encrypted link, it takes more than 10 times that long. > > # time psql -qAt -c 'select * from wp' eclatch > /dev/null > real 0m0.718s > user 0m0.120s > sys 0m0.080s > # time psql -h localhost -qAt -c 'select * from wp' eclatch > /dev/null > real 0m8.081s > user 0m3.930s > sys 0m0.410s > # psql -qAt -c 'select * from wp' eclatch | wc > 2057 30717 276549 > # psql -c "select version()" template1 Wow. I wonder if we should be using SSL by default in our connections. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073