pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Ulrich Meis <kenobi@halifax.rwth-aachen.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: A solution to the SSL customizing problem
Date: Tue, 12 Oct 2004 17:34:04 +1300
Message-ID: <416B5EBC.6060507@opencloud.com> (raw)
In-Reply-To: <200410120620.04002.kenobi@halifax.rwth-aachen.de>
References: <200410111752.33375.kenobi@halifax.rwth-aachen.de>
	<200410120432.20158.kenobi@halifax.rwth-aachen.de>
	<416B4820.8040601@opencloud.com>
	<200410120620.04002.kenobi@halifax.rwth-aachen.de>

Ulrich Meis wrote:
> On Tuesday 12 October 2004 04:57, Oliver Jowett wrote:
> 
> 
>>So I suggest you look at solving the "how do I give the driver an
>>appropriate SSLSocketFactory" problem first. Once that is solved, the
>>particular configurable behaviour you want can be easily implemented.
> 
> 
> How about my suggestions with the abstract handler class?
> I know it was a long post ;-)

Namely:

> In the Driver class you offer a method(make it empty if compiled without SSL):
> 
> setPGSSLHandler(PGSSLHandler handler) {
>  pgsslhandler=handler;}
> 

> abstract class PGSSLHandler {
> 
> public static final int STANDARD=0;
> public static final int CUSTOMFACTORY=1;
> public static final int CUSTOMSTORE=2;
> 
> abstract public int getHandleType(int conid);
> abstract public boolean getTrustAndSave(int conid);
> 
> abstract public KeyStore getKeyStore(int conid);
> abstract public SSLSocketFactory getSSLSocketFactory(int conid);
> 
> }

How do you arrange for setPGSSLHandler to be called if you are in a 
managed environment that does not know anything about the postgresql 
driver beyond the standard JDBC interfaces?

The "conid" stuff looks really grotty. How do you coordinate the 
URL-level configuration with the PGSSLHandler implementation?

Why is anything but getSSLSocketFactory() needed? You can implement 
whatever keystore/truststore policy you want via a SSLSocketFactory.

The only new thing there is really the conid stuff, and I'd rather deal 
with classloader issues (specify the class by name, loaded by the 
driver) than have to deal with managing magic opaque unique 
configuration keys and a postgresql-specific interface.

-O



view thread (31+ messages)  latest in thread

Message-ID: <416B5EBC.6060507@opencloud.com>
Permalink:  ../416B5EBC.6060507@opencloud.com/
Also on:    postgresql.org/message-id/416B5EBC.6060507@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, kenobi@halifax.rwth-aachen.de
  Subject: Re: A solution to the SSL customizing problem
  In-Reply-To: <416B5EBC.6060507@opencloud.com>
  References: <200410111752.33375.kenobi@halifax.rwth-aachen.de> <200410120432.20158.kenobi@halifax.rwth-aachen.de> <416B4820.8040601@opencloud.com> <200410120620.04002.kenobi@halifax.rwth-aachen.de> <416B5EBC.6060507@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