[Geoserver-users] PostgreSQL datastore with SSL

Hello,

I am using GeoServer 1.4.0-RC3 and need to use a PostgreSQL database as a datastore. Unfortunately it seems not to be possible to access the database from GeoServer using SSL. As this is a requirement for production databases in our organization, I am hoping that anybody in this list knows some way to achieve this goal.

Best Regards,
Gerhard
--
Gerhard Sommer
Magistrat Wien (MA 14-ADV), Rathausstraße 1, 1082 Wien, Austria
E-Mail: som@anonymised.com
Tel: +43 (1) 4000 91326
Fax: +43 (1) 4000 99 91326

Sommer Gerhard ha scritto:

Hello,

I am using GeoServer 1.4.0-RC3 and need to use a PostgreSQL database
as a datastore. Unfortunately it seems not to be possible to access
the database from GeoServer using SSL. As this is a requirement for
production databases in our organization, I am hoping that anybody in
this list knows some way to achieve this goal.

I have both bad and good news.
Bad news: there's no explicit support for SSL in the postgis data store,
so there's no clean way to do it.

Good news: there may be a way to circumvent the obstacle. The postgis
connection factory object builds URLS as:

connPath = DRIVER_PATH + "://" + host + ":" + port + "/" + dbName;

From the postgres jdbc driver docs (http://jdbc.postgresql.org/documentation/81/connect.html)
I see:

String url = "jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true";
Connection conn = DriverManager.getConnection(url);

So, it seems you can put whatever parameter you want in dbName and it
should work. Let me know if it works for good, I don't have an SSL
enabled postgres around.

Cheers
Andrea Aime

Andrea Aime ha scritto:

Sommer Gerhard ha scritto:

...

I have both bad and good news.
Bad news: there's no explicit support for SSL in the postgis data store,
so there's no clean way to do it.

I've create an issue so that we don't forget about this, but for sure it won't make geoserver 1.4.0 because I'm releasing gt2 2.2.2 now.
http://jira.codehaus.org/browse/GEOT-1057

Cheers
Andrea Aime