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

Fixed the initial nodes expander #30

Closed
wants to merge 1 commit into from

Conversation

barshaul
Copy link

Fixed the initial nodes expander to return the socketAddr object and maintain the provided hostname, for TLS hostname verifications.
The Subject Alternative Name (SAN) is an extension to the X.509 specification that allows users to specify additional host names for a single SSL certificate. In ElastiCache cluster TLS certificate there is a subject name containing the suffix of the cluster name, e.g.: *.barshaul-babushka-standalone-test-tls.ez432c.use1.cache.amazonaws.com. When we expand the DNS endpoint to multiple node addresses, we shall save the provided hostname in order to be able to verify the node with the TLS cert.

…maintain the provided hostname, for TLS hostname verifications.
Copy link

@nihohit nihohit left a comment

Choose a reason for hiding this comment

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

FSM

} => {
if let Some(socket_addr) = socket_addr {
Copy link

Choose a reason for hiding this comment

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

minor:

let socket_addrs = if let Some(socket_addr) = socket_addr {
  socket_addr 
 } else {
   get_socket_addrs(host, port).await? 
};
select_ok(
    socket_addrs.map(|socket_addr| <T>::connect_tcp_tls(host, socket_addr, insecure)),
)
.await?
.0

Copy link
Author

Choose a reason for hiding this comment

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

get_socket_addrs return an iterator

redis/src/connection.rs Show resolved Hide resolved
@@ -64,6 +64,10 @@ pub enum ConnectionAddr {
host: String,
Copy link

Choose a reason for hiding this comment

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

add to doc "This name should remain the DNS name, for the purpose of TLS hostname verification. IP addresses can be saved in socket_addr."

@barshaul
Copy link
Author

Chose option 2: #31

@barshaul barshaul closed this Aug 31, 2023
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.

2 participants