Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SSL connections #70

Open
bstroebl opened this issue Dec 5, 2018 · 6 comments
Open

Support SSL connections #70

bstroebl opened this issue Dec 5, 2018 · 6 comments

Comments

@bstroebl
Copy link

bstroebl commented Dec 5, 2018

My PostGIS database uses ssl for any connection, the importer tries to connect with SSL off and I did not find a setting to configure ssl.
I am using Importer/Exporter version 4.0.0

@FxKu
Copy link
Member

FxKu commented Dec 5, 2018

Sounds like a good idea to add this feature. But, it's hard for me to estimate how much time it takes to implement it. Do you have some experience with SSL and JDBC clients?

For Postgres, I've found this wiki page
For Oracle it probably works with this.

@bstroebl
Copy link
Author

bstroebl commented Dec 6, 2018

Hallo Felix,
not really, all I know is that this JDBC string connects with my PostgreSQL instance via SSL:
java.sql.DriverManager.getConnection("jdbc:postgresql://myserver:5432/mydb?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory", "myuser", "mypassword")
Regarding Postgres the parameter sslmode might be interesting to offer as a choice to the user.

@clausnagel
Copy link
Member

clausnagel commented Dec 6, 2018

Agree that support for SSL connections sounds like a very useful thing to have. Well, I also lack experience with SSL support in the current PostgreSQL and Oracle JDBC drivers.

Below you find SSL options offered by pgAdmin (anything besides SSL mode is optional). Maybe this is a good starting point. However, SSL compression seems to require a specific implementation of a SSLSocketFactory. Not sure whether this is available in the default JDBC driver.

Well, anyways, contribution is very welcome :-)

pgadmin-ssl

@chenkianwee
Copy link

Hi I am wondering if there is any update or workaround about this issue? I am trying to use 3Dcitydb and setting it up on a homeserver with docker. However I would like to be able to update my database on a client computer using the import/export tool. However, I am unable to connect to my server through ssl. Thanks.

@clausnagel
Copy link
Member

Hi @chenkianwee, unfortunately we have not found the time to work on this so far, sorry. Still hoping for contribution.

What you could try is to hardcode your SSL settings into the JDBC connection string of the Importer/Exporter. For PostgreSQL/PostGIS, this connection string is returned by the method getJDBCUrl of the class PostGISAdapter (see here). So maybe adding the connection parameters from your above post helps to connect to your database. After changing the code, you can easily build the Importer/Exporter using this guideline.

Not a perfect solution, I know. But maybe a workaround.

@chenkianwee
Copy link

Hi Thanks, will try it and see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants