Support single endpoint architecture with SSL/TLS in cluster mode #1086
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR will solve the following issue.
The issue is an error the client fails to verify the certificate of nodes. It is caused in a case which we use cluster feature with SSL/TLS connection. Since the client relies and depends on CLUSTER NODES and CLUSTER SLOTS, the client may fail to verify certificates if servers return IP addresses of nodes in reply to the client.
AWS ElastiCache and Redis versions since
7.*
possess an ability to be able to reply FQDN of nodes by the following directives of configuration. They were added by AWS folks and have been available since Redis7.*
.On the other hand, other architectures for cluster mode with SSL/TLS may use proxy servers such that stunnel or something like that for SSL/TLS termination. In that case, the client has to connect to the nodes via the FQDN of a single endpoint.
So this PR adds a
fixed_hostname
option to the client and modifying to be able to pass it to internal connector.How does cluster client work?
Architectures of Redis cluster with SSL/TLS as I can imagine
AWS
The client can connect to the nodes directly. The endpoint is just a CNAME record of DNS. It is as simple as that.
Microsoft Azure
The service provides a single IP address and multiple ports mapped to each node. The endpoint doesn't support redirection. It does only SSL/TLS termination.