pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndquadrant.com>
To: Sehrope Sarkuni <sehrope@jackdb.com>
To: John Neal <john.neal@fedex.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: JBDC LDAP support for connection parameters
Date: Tue, 19 Aug 2014 09:48:48 +0800
Message-ID: <53F2AD00.7050209@2ndquadrant.com> (raw)
In-Reply-To: <CAH7T-ap2MWsHxzi=j+BmspP5-W86Y78GtNK3Y3rnr6ViD9Yasg@mail.gmail.com>
References: <77E6F1BFB524D44E97EAD7836AC9ECDB4376A0B0@PWN60112.corp.ds.fedex.com>
	<CAH7T-ap2MWsHxzi=j+BmspP5-W86Y78GtNK3Y3rnr6ViD9Yasg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

On 07/24/2014 04:17 AM, Sehrope Sarkuni wrote:
> John,
> 
> No, the JDBC driver does not support loading data source configuration
> from LDAP or using pg_service.conf. You'll need to specify the
> database host/port/user as part of the JDBC connection string.
> 
> If this custom application code where you can dynamically generate the
> JDBC URL then you could probably write it yourself (ie. query LDAP for
> the server details and build the connection string from it).
> 
> If it's meant to be injected into an app server where you don't have
> full control (ex: adding it as a JNDI resource to a JEE server)
> though, I'm not sure of any workaround short of writing a wrapper JDBC
> driver that transparently does the LDAP lookup for you and then
> internally creates a PG JDBC connection from it.

It would make a great deal more sense to simply patch PgJDBC with the
desired LDAP support.

Patches like that are generally welcome if submitted upstream,
especially if they increase compatibility with and consistency wit libpq.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (4+ messages)

Message-ID: <53F2AD00.7050209@2ndquadrant.com>
Permalink:  ../53F2AD00.7050209@2ndquadrant.com/
Also on:    postgresql.org/message-id/53F2AD00.7050209@2ndquadrant.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: craig@2ndquadrant.com, sehrope@jackdb.com, john.neal@fedex.com
  Subject: Re: JBDC LDAP support for connection parameters
  In-Reply-To: <53F2AD00.7050209@2ndquadrant.com>
  References: <77E6F1BFB524D44E97EAD7836AC9ECDB4376A0B0@PWN60112.corp.ds.fedex.com> <CAH7T-ap2MWsHxzi=j+BmspP5-W86Y78GtNK3Y3rnr6ViD9Yasg@mail.gmail.com> <53F2AD00.7050209@2ndquadrant.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