microsoft / garnet

Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients.
https://microsoft.github.io/garnet/
MIT License
9.71k stars 460 forks source link

Add flag for backward compatibility with TLS checks #421

Closed msft-paddy14 closed 1 month ago

msft-paddy14 commented 1 month ago

In #392, we added stronger TLS checks for cluster gossip to prevent an unintended node from connecting. The behavior might be unexpected for some of consumers (using older versions of Garnet) as this would mean specifying the ClusterTlsClientTargetHost parameter which they might've missed earlier as it was not validated in all scenarios - it was behind a ClientCertificateRequired flag. This flag also implied that server cert was also not validated when Garnet acted as a client in gossip scenarios. But to maintain backward compatibility we're adding another flag to enable the stronger TLS checks conditionally. However, it should be recommended that this is turned on to prevent unexpected cluster connections.

badrishc commented 1 month ago

This flag also implied that server cert was also not validated when Garnet acted as a client in gossip scenarios

This flag should be enabled by default, and gossip should set this flag as well so that the gossip client validates the certificate.