zakariya-s commented on code in PR #2932:
URL: https://github.com/apache/iceberg-rust/pull/2932#discussion_r4379288022


##########
crates/storage/opendal/src/azdls.rs:
##########
@@ -226,16 +372,24 @@ pub(crate) struct AzureStoragePath {
 }
 
 impl AzureStoragePath {
+    /// The host of the path, e.g. `account.dfs.core.windows.net`.
+    fn host(&self) -> String {
+        let service = match self.scheme {
+            AzureStorageScheme::Abfs | AzureStorageScheme::Abfss => "dfs",
+            AzureStorageScheme::Wasb | AzureStorageScheme::Wasbs => "blob",
+        };
+        format!("{}.{service}.{}", self.account_name, self.endpoint_suffix)
+    }
+
     /// Converts the AzureStoragePath into a full endpoint URL.
     ///
     /// This is possible because the path is fully qualified.
+    ///
+    /// Like Iceberg Java, the endpoint always uses TLS, also for the
+    /// non-secure schemes: SAS tokens are query parameters and must not be
+    /// sent over a plaintext connection unless the user configures one.
     fn as_endpoint(&self) -> String {
-        format!(
-            "{}://{}.dfs.{}",
-            self.scheme.as_http_scheme(),
-            self.account_name,
-            self.endpoint_suffix
-        )
+        format!("https://{}.dfs.{}";, self.account_name, self.endpoint_suffix)

Review Comment:
   agreed, it will go in the ADLS PR, but keeping it in this reference PR 
for... reference :)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to