Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stronger TLS check for Gossip in Cluster mode #392

Merged
merged 11 commits into from
May 23, 2024

Conversation

msft-paddy14
Copy link
Contributor

This PR resolves issue #391.

It's a small change that uses ClusterTlsClientTargetHost and validates the incoming remote cert (during Gossip CLUSTER MEET call) and ensures that we're attempting to join a node that was created as part of current cluster setup. This can prevent issues of unknown clusters getting connected when multiple caches might be running in same IP pool. Previously, no such validation was there and we did an unconditional handshake approval (when ClientCertRequired is false). This will enforce the checks for only gossip where the server node acts as a client

@msft-paddy14 msft-paddy14 linked an issue May 16, 2024 that may be closed by this pull request
@msft-paddy14
Copy link
Contributor Author

@lmaas / @vazois gentle ping for reviewing this change

Copy link
Contributor

@lmaas lmaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks solid! I have added a few suggestions for minor code cleanup.

libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
libs/server/TLS/GarnetTlsOptions.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@lmaas lmaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I think we can go ahead and merge this PR.

@msft-paddy14 msft-paddy14 merged commit 9822a43 into main May 23, 2024
23 checks passed
@msft-paddy14 msft-paddy14 deleted the users/padgupta/enable_cert_validation_gossip branch May 23, 2024 06:32
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.

Stronger TLS validation for Cluster communication
2 participants