Skip to content

Conversation

@azat
Copy link

@azat azat commented Apr 18, 2025

mTLS (Mutual TLS, or mTLS for short, is a method for mutual authentication) allows you to authenticate on the server with client certificate.

Now clickhouse-rs supports it, for this you need to pass the following arguments for connection url:

  • ca_certificate
  • client_certificate
  • client_private_key

Some other things:

  • Support specifying TLS certificate via ca_certificate parameter in URL
  • Add missing TLS fields for Debug trait
  • Update section about TLS features in README
  • Extend CI coverage for TLS

Refs: azat/chdig#85
Upstream: suharev7#227

@azat azat force-pushed the mTLS branch 7 times, most recently from 6a9ec22 to 6e4a58a Compare April 18, 2025 15:09
@azat azat force-pushed the mTLS branch 5 times, most recently from 631210e to f88e93e Compare April 18, 2025 23:59
azat added a commit to azat/chdig that referenced this pull request Apr 19, 2025
Example url:

    tcp://azat-tls@localhost:9440?secure=true&ca_certificate=ca.pem&certificate_file=client.crt&private_key_file=client.key

So you simply need to pass:
- `ca_certificate`
- `certificate_file`
- `private_key_file`

Fixes: #85
Refs: azat-rust/clickhouse-rs#3
azat added a commit to azat/chdig that referenced this pull request Apr 19, 2025
Example url:

    tcp://azat-tls@localhost:9440?secure=true&ca_certificate=ca.pem&certificate_file=client.crt&private_key_file=client.key

So you simply need to pass:
- `ca_certificate`
- `certificate_file`
- `private_key_file`

Note, that this is a **rought draft** for now, since mTLS support in
clickhouse-rs should be stabilized for this, this should be done until
next chdig release.

Fixes: #85
Refs: azat-rust/clickhouse-rs#3
azat added a commit to azat/chdig that referenced this pull request Apr 19, 2025
Example url:

    tcp://azat-tls@localhost:9440?secure=true&ca_certificate=ca.pem&certificate_file=client.crt&private_key_file=client.key

So you simply need to pass:
- `ca_certificate`
- `certificate_file`
- `private_key_file`

Note, that this is a **rought draft** for now, since mTLS support in
clickhouse-rs should be stabilized for this, this should be done until
next chdig release.

Refs: #85 (since this is draft only `Refs` over `Fixes`)
Refs: azat-rust/clickhouse-rs#3
azat added a commit to azat/chdig that referenced this pull request Apr 19, 2025
…ificates)

**mTLS** (Mutual TLS, or mTLS for short, is a method for mutual
authentication) allows you to authenticate on the server with client
certificate.

Now `chdig` supports it, for this you need to pass the following arguments for connection url:
- `ca_certificate`
- `certificate_file`
- `private_key_file`

I.e. `tcp://azat-tls@localhost:9440?secure=true&ca_certificate=ca.pem&certificate_file=client.crt&private_key_file=client.key`

Note, that this is a **rought draft** for now, since mTLS support in
clickhouse-rs should be stabilized for this, this should be done until
next chdig release.

Refs: #85 (since this is draft only `Refs` over `Fixes`)
Refs: azat-rust/clickhouse-rs#3
@azat azat marked this pull request as draft April 19, 2025 00:12
azat added a commit to azat/chdig that referenced this pull request Apr 19, 2025
…ificates)

**mTLS** (Mutual TLS, or mTLS for short, is a method for mutual
authentication) allows you to authenticate on the server with client
certificate.

Now `chdig` supports it, for this you need to pass the following arguments for connection url:
- `ca_certificate`
- `certificate_file`
- `private_key_file`

I.e. `tcp://azat-tls@localhost:9440?secure=true&ca_certificate=ca.pem&certificate_file=client.crt&private_key_file=client.key`

Note, that this is a **rought draft** for now, since mTLS support in
clickhouse-rs should be stabilized for this, this should be done until
next chdig release.

Refs: #85 (since this is draft only `Refs` over `Fixes`)
Refs: azat-rust/clickhouse-rs#3
@azat azat changed the title mTLS Add support for authentication via mTLS (authentication with TLS certificates) Apr 19, 2025
@azat azat merged commit 1463a3b into next Apr 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant