pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndquadrant.com>
To: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: [PATCH] Native SSPI support for Windows single-sign-on
Date: Thu, 13 Nov 2014 12:47:29 +0800
Message-ID: <546437E1.3050508@2ndquadrant.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hi all

I've published a patch that adds native SSPI support for Windows to PgJDBC.

It's a bit bigger than my usual, and it's somewhat intrusive in the
build system, so I'd appreciate comments and review before merging.

https://github.com/pgjdbc/pgjdbc/pull/212

Comments on the core change are on the primary commit that adds SSPI
support:

https://github.com/ringerc/pgjdbc/commit/f9e8f7191e50e1988764e925d99f8b176219c394


The build system changes are non-trivial, and introduce greater use of
maven-ant-tasks.

I haven't been able to test the maven snapshot upload code - I can't
build the docs, and there's no documentation on how the docs are built,
what environment setup is required, etc. Dave, if you can explain what's
needed to build the docs I'll test that part out.


The build process now:

* Downloads and imports the Waffle-JNA POM so it can determine the
versions of JNA and slf4j that Waffle uses

* Generates a POM and populates it with dependency declarations for
Waffle-JNA, JUnit, etc

* Downloads the declared dependencies

* Extracts dependency subsets from the PgJDBC POM for 'compile',
'runtime' and 'test' scopes as Ant filesets

* Copies the dependency jars into lib/ for use by IDEs and tools (the
build doesn't use them from there)

* Generates build/pom/pom.xml directly from the declarations in
build.xml and build.properties, obsoleting src/pom/pom.xml (which is
removed).

* Adds dependency jars via the extracted filesets to javac tasks where
appropriate

* Via the new "ant dist" target, adds a new "ant dist" target that
creates a zip file of the driver jar, dependency jars,
README/license/etc, and sources, suitable for standalone distribution.



Outstanding issues:

- Some more testing needed, especially with combos of platform / JNA
missing vs present / Waffle-JNA missing vs present / GSSAPI vs SSPI
requested by server . (It's a pity that Travis-CI doesn't speak Windows).

- Can't test docs compilation yet, so can't test Maven snapshot upload
or fix the "dist" target to bundle the docs

- "dist" target creates source fileset separately from how maven source
jar target does. I should unify them before committing.

... but overall, it seems to work really well, and it's in live use at a
customer site now.

-- 
 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



Message-ID: <546437E1.3050508@2ndquadrant.com>
Permalink:  ../546437E1.3050508@2ndquadrant.com/
Also on:    postgresql.org/message-id/546437E1.3050508@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
  Subject: Re: [PATCH] Native SSPI support for Windows single-sign-on
  In-Reply-To: <546437E1.3050508@2ndquadrant.com>
  References: <546437E1.3050508@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