ClickHouse / clickhouse-tableau-connector-jdbc

Tableau connector to ClickHouse using JDBC driver
Apache License 2.0
58 stars 11 forks source link

Adding Cert for SSL access #60

Open vgcrld opened 1 year ago

vgcrld commented 1 year ago

I am unsure how to add the cert for the plugin/tableau connector. Checking ssl and putting port 443 I get this:

An error occurred while communicating with the ClickHouse JDBC by ANALYTIKA PLUS data source 'Untitled Data Source'
Bad Connection: Tableau could not connect to the data source.
Error Code: FAB9A2C5
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, server ClickHouseNode(addr=http:core-clickhouse-default-1.core.xxx.com:443, db=tableau_api_demo)@214994003
Unable to connect to the ClickHouse JDBC by ANALYTIKA PLUS server "core-clickhouse-default-1.core.xxx.com". Check that the server is running and that you have access privileges to the requested database.
Connector Class: clickhouse_jdbc, Version: 0.2.6

So i. know I need my cert.

The cert is added to my local workstation and I have verified this by connecting to clickhouse with chrome.

What is the proper method for adding the same cert to the JDBC/JDK. I've added it using system preferences for java but that still didn't help.

vgcrld commented 1 year ago

Never mind, I tried this yesterday and it didn't work but I must have done something improper. Today I added the following to the JDBC Driver URL Parameters and it connected without issue: sslrootcert=/path/to/cert/file/mycertfile.crt

Sushil2468 commented 6 months ago

Hi for this it works on local but failing after publishing on server. Is there any way around?