X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 763AA329EB3 for ; Wed, 15 Sep 2004 23:54:04 +0100 (BST) 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 40902-03 for ; Wed, 15 Sep 2004 22:53:57 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id E2FB1329C7B for ; Wed, 15 Sep 2004 23:53:59 +0100 (BST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1C7idP-00030B-00; Thu, 16 Sep 2004 10:52:19 +1200 Message-ID: <4148C7A0.2030103@opencloud.com> Date: Thu, 16 Sep 2004 10:52:16 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: chinmoy , pgsql-jdbc@postgresql.org Subject: Re: Customizing SSL with jdbc References: <413E0480.8010306@avaya.com> <4145B31C.3000201@avaya.com> <1095206324.1000.25.camel@doug.ejurka.com> <4148BEB1.3010707@opencloud.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/76 X-Sequence-Number: 10966 Kris Jurka wrote: > > On Thu, 16 Sep 2004, Oliver Jowett wrote: > > >>I'm not sure how that extra level of indirection gives you anything. >>Haven't you just gone from "how do I configure my new SSLSocketFactory >>instance without context?" to "how do I configure my new >>SSLSocketFactoryFactory instance without context?" ? > > > The class itself is the context. That is, if you need to say have a number > of keystore locations each one gets its own wrapper factory class. I still don't see why this requires an extra interface; you can do this using only SSLSocketFactory itself. > Its > definitely ugly, Hideously ugly, in fact.. > but so is programmatically setting things on the > org.postgresql.Driver class. That approach also requires you getting in > there to touch the Driver class before a connection is established, which > is unclear to me how to accomplish in an application server environment > where a pool is setup for you. You'd do it on the DataSource as part of configuring the appserver's pool. I wonder how we can do this generically though -- I will need to dig through the javabean spec for details of what sort of accessors you can use for setting something like a SSLSocketFactory subclass. Ideally the appserver should let the administrator instantiate a (javabean-accessor-implementing) SSLSocketFactory subclass by class name (& presumably classpath), configure it, then set it onto the DataSource.. and the whole lot gets serialized into JNDI, etc. (note that in this scenario the appserver doesn't need to know anything postgresql-driver-specific) -O