-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
The DSN generator for databricks is producing very strange results (https://github.com/xo/dburl/blob/master/dsn.go#L223-L241)
When digging into the code:
s := fmt.Sprintf("token:%s@%s.databricks.com:%s/sql/1.0/endpoints/%s", user, pass, port, host)
- The username (
token) is being put into the password - The password is then being put into the URL (this immediately creates a leak of the password in logs)
- The port is correct π
- The host is then appended onto the end of the path
- Host like this also prevents other types of clusters from being used
Ideally this should be updated to the following:
s := fmt.Sprintf("token:%s@%s:%s%s", pass, host, port, path)
To get around this issue for the moment I am doing the following with the uri dburl.URL value:
sql.Open("databricks", fmt.Sprintf("%s@%s%s?%s", uri.User, uri.Host, uri.Path, uri.RawQuery))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels