ClickHouse / ClickHouse/clickhouse-odbc

Driver does not set SSL certificate authentication header

Open
#554 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
285
Forks
105
Avg merge
3h 56m
Merged PRs (30d)
3

Description

### Describe the bug

It should be possible to use SSL certificate authentication with ClickHouse via the odbc driver. If the PrivateKeyFile and CertificateFile parameters (or just the PrivateKey field on Windows) are set (and/or some new parameter SSLAuth is set), then the driver should signal to ClickHouse that SSL certificate authentication is desired.

The ClickHouse HTTP server interface [requires](https://github.com/ClickHouse/ClickHouse/blob/53779390caa67a65a2368cdbb7533ed925608ba9/src/Server/HTTP/authenticateUserByHTTP.cpp#L72) X-ClickHouse-SSL-Certificate-Auth to be set for certificate authentication to be enabled.

### Steps to reproduce
1. Create an ODBC DSN with PrivateKeyFile (and CertificateFile) parameters set
2. Attempt a connection
3. Get the error `Authentication failed: password is incorrect, or there is no user with such name. (AUTHENTICATION_FAILED)` or similar because the ClickHouse server did not attempt certificate authentication.

### Expected behaviour

Certificate authentication is performed.

### Configuration
#### Environment
* Driver version: 1.5.0
* OS: Windows
* ODBC Driver manager: ODBC Administrator

#### ClickHouse server
* ClickHouse Server version: 26.1.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.