Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XJYXr-0003W1-JE for pgsql-jdbc@arkaria.postgresql.org; Tue, 19 Aug 2014 01:49:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XJYXr-00026W-0L for pgsql-jdbc@arkaria.postgresql.org; Tue, 19 Aug 2014 01:49:07 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XJYXq-00024M-31 for pgsql-jdbc@postgresql.org; Tue, 19 Aug 2014 01:49:06 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XJYXm-0001Fd-ML for pgsql-jdbc@postgresql.org; Tue, 19 Aug 2014 01:49:04 +0000 Received: from ayaki.localdomain (58-7-167-251.dyn.iinet.net.au [58.7.167.251]) by mrelayeu.kundenserver.de (node=mreue005) with ESMTP (Nemesis) id 0MK5kP-1XKvS536fN-001SI9; Tue, 19 Aug 2014 03:48:54 +0200 Message-ID: <53F2AD00.7050209@2ndquadrant.com> Date: Tue, 19 Aug 2014 09:48:48 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Sehrope Sarkuni , John Neal CC: "pgsql-jdbc@postgresql.org" Subject: Re: JBDC LDAP support for connection parameters References: <77E6F1BFB524D44E97EAD7836AC9ECDB4376A0B0@PWN60112.corp.ds.fedex.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:YsdYU5OOPEpyzqXc7tII6k9DRwfhrkYacjvgRaR4p1Y C7ha3EcCyYRwwdBwb1DcFGKkS1yJGuIaIpyoYvbFpA76ABzg2S mCdtJ14RRwVrpnI6LfDxlp1Z/6Ru11S82uwY0HNnpVCDPglDaf aYXugLCYYEe0LBSQmkq4YZ74donqguX45YrB9ZL+MkeA+WCbzZ Ufqzzw6rZK7FKiqUnd4//GWLVYIPAMYe5PUGv2oW/DE2s2x6r6 M23xD0b5zAkeB+bfY6YL8BDaSOmE81V/wLKPXBCyCq6xTOznp2 QhDbMRIkZXOZQvvUeA2IrGnjk6kZn4a5ecYKj0FMm0I0JB/s3l j9xKwoaLmO9mEmok6WNloRsqlTzTqx/Q8dLflecz/ X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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