databricks / databricks-sql-go

Golang database/sql driver for Databricks SQL.
Apache License 2.0
34 stars 37 forks source link

[Feature Request] Add an connOption to skipVerifyHost on NewConnector #223

Open madisonchamberlain opened 1 month ago

madisonchamberlain commented 1 month ago

When opening a new connection, I am looking for the ability to allow the driver to skip verifying the host. When we call NewConnector I was hoping to have a new connOption which allows the caller to specify that they want to skip verifying the host, but still use TLS encryption when passing data over the wire. The reason I am seeking this is because when we make a connection via private link, we want to avoid using the domain *.[cloud.databricks.com](http://cloud.databricks.com/), because it would confuse our normal databrick connections; rather we want to use <customer-id>.[privatelink.cloud.databricks.com](http://privatelink.cloud.databricks.com/) and then on our end since we recognize the host, we dont need you to verify it on your end. The go driver cannot verify privatelink.cloud.databricks.com based on the certs it receives.

There are a few thread about this in a channel shared between databricks and sigma, which may contain more relevant information. Thread 1 Thread 2 (channel is #sigma-databricks)

madisonchamberlain commented 1 month ago

I was asked to propose a solution so I am proposing this https://github.com/databricks/databricks-sql-go/pull/224