You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "oowl (via GitHub)" <gi...@apache.org> on 2023/07/19 09:57:47 UTC

[GitHub] [incubator-opendal] oowl commented on a diff in pull request #2670: feat(services/redis): enable TLS

oowl commented on code in PR #2670:
URL: https://github.com/apache/incubator-opendal/pull/2670#discussion_r1267849658


##########
core/src/services/redis/backend.rs:
##########
@@ -185,7 +185,18 @@ impl Builder for RedisBuilder {
                 let port = ep_url.port_u16().unwrap_or(DEFAULT_REDIS_PORT);
                 ConnectionAddr::Tcp(host, port)
             }
-            // TODO: wait for upstream to support `rustls` based TLS connection.
+            Some("rediss") => {
+                let host = ep_url
+                    .host()
+                    .map(|h| h.to_string())
+                    .unwrap_or_else(|| "127.0.0.1".to_string());
+                let port = ep_url.port_u16().unwrap_or(DEFAULT_REDIS_PORT);
+                ConnectionAddr::TcpTls {
+                    host,
+                    port,
+                    insecure: false,
+                }
+            }

Review Comment:
   Maybe we need to add the Redis TLS Integration test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org