You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by xu...@apache.org on 2025/06/25 07:43:13 UTC

(iceberg-rust) branch main updated: feat: Support non-default adls-authority-host (#1439)

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 2d4407d2 feat: Support non-default adls-authority-host (#1439)
2d4407d2 is described below

commit 2d4407d280b9c49c68ca15a26970738a18039ebc
Author: Christian <ch...@hansetag.com>
AuthorDate: Wed Jun 25 09:43:07 2025 +0200

    feat: Support non-default adls-authority-host (#1439)
    
    ## Which issue does this PR close?
    
    Currently we don't have a way to create a `FileIO` for adls with a
    non-default Authority host. Opendal already supports this feature, so we
    only need to pass the configuration.
    
    ## What changes are included in this PR?
    Expose a property `adls.authority-host` that sets the corresponding
    Opendal configuration
    
    ## Are these changes tested?
    No, do we need to?
---
 crates/iceberg/src/io/storage_azdls.rs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/crates/iceberg/src/io/storage_azdls.rs b/crates/iceberg/src/io/storage_azdls.rs
index c3daa4f5..fe12167f 100644
--- a/crates/iceberg/src/io/storage_azdls.rs
+++ b/crates/iceberg/src/io/storage_azdls.rs
@@ -49,6 +49,11 @@ pub const ADLS_CLIENT_ID: &str = "adls.client-id";
 /// The client-secret.
 pub const ADLS_CLIENT_SECRET: &str = "adls.client-secret";
 
+/// The authority host of the service principal.
+/// - required for client_credentials authentication
+/// - default value: `https://login.microsoftonline.com`
+pub const ADLS_AUTHORITY_HOST: &str = "adls.authority-host";
+
 /// Parses adls.* prefixed configuration properties.
 pub(crate) fn azdls_config_parse(mut properties: HashMap<String, String>) -> Result<AzdlsConfig> {
     let mut config = AzdlsConfig::default();
@@ -84,6 +89,10 @@ pub(crate) fn azdls_config_parse(mut properties: HashMap<String, String>) -> Res
         config.client_secret = Some(client_secret);
     }
 
+    if let Some(authority_host) = properties.remove(ADLS_AUTHORITY_HOST) {
+        config.authority_host = Some(authority_host);
+    }
+
     Ok(config)
 }