v.22.8Improvement

Add TLS Support for NATS Connections

Add support for TLS connections to NATS. Implements #39525. #39527 (Constantine Peresypkin).
Adds support for TLS encrypted connections to NATS messaging system in ClickHouse.

Why it matters

This feature enables secure communication between ClickHouse and NATS by using TLS encryption, addressing the need for protecting data in transit and enhancing overall security when interacting with NATS message brokers.

How to use it

To use TLS with NATS in ClickHouse, configure your NATS connection settings to enable TLS by specifying the necessary certificates and TLS parameters in the relevant ClickHouse configuration or connection strings.