[PATCH] Native SSPI support for Windows single-sign-on - Mailing list pgsql-jdbc

From Craig Ringer
Subject [PATCH] Native SSPI support for Windows single-sign-on
Date
Msg-id 546437E1.3050508@2ndquadrant.com
Whole thread Raw
List pgsql-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


pgsql-jdbc by date:

Previous
From: Steven Schlansker
Date:
Subject: Re: New significance of holdable result sets in Java 8
Next
From: Marko Topolnik
Date:
Subject: Re: New significance of holdable result sets in Java 8