pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Kris Jurka <books@ejurka.com>
Cc: chinmoy <chinmoy@avaya.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Customizing SSL with jdbc
Date: Thu, 16 Sep 2004 10:52:16 +1200
Message-ID: <4148C7A0.2030103@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0409151722100.5001@leary.csoft.net>
References: <413E0480.8010306@avaya.com>
	<Pine.BSO.4.56.0409130237370.2396@leary.csoft.net>
	<4145B31C.3000201@avaya.com>
	<1095206324.1000.25.camel@doug.ejurka.com>
	<4148BEB1.3010707@opencloud.com>
	<Pine.BSO.4.56.0409151722100.5001@leary.csoft.net>

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



view thread (8+ messages)

Message-ID: <4148C7A0.2030103@opencloud.com>
Permalink:  ../4148C7A0.2030103@opencloud.com/
Also on:    postgresql.org/message-id/4148C7A0.2030103@opencloud.com

 · 

reply

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-jdbc@postgresql.org
  Cc: oliver@opencloud.com, books@ejurka.com, chinmoy@avaya.com
  Subject: Re: Customizing SSL with jdbc
  In-Reply-To: <4148C7A0.2030103@opencloud.com>
  References: <413E0480.8010306@avaya.com> <Pine.BSO.4.56.0409130237370.2396@leary.csoft.net> <4145B31C.3000201@avaya.com> <1095206324.1000.25.camel@doug.ejurka.com> <4148BEB1.3010707@opencloud.com> <Pine.BSO.4.56.0409151722100.5001@leary.csoft.net> <4148C7A0.2030103@opencloud.com>

* 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