Skip to content

Commit 2d4407d

Browse files
authored
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?
1 parent a961483 commit 2d4407d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/iceberg/src/io/storage_azdls.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ pub const ADLS_CLIENT_ID: &str = "adls.client-id";
4949
/// The client-secret.
5050
pub const ADLS_CLIENT_SECRET: &str = "adls.client-secret";
5151

52+
/// The authority host of the service principal.
53+
/// - required for client_credentials authentication
54+
/// - default value: `https://login.microsoftonline.com`
55+
pub const ADLS_AUTHORITY_HOST: &str = "adls.authority-host";
56+
5257
/// Parses adls.* prefixed configuration properties.
5358
pub(crate) fn azdls_config_parse(mut properties: HashMap<String, String>) -> Result<AzdlsConfig> {
5459
let mut config = AzdlsConfig::default();
@@ -84,6 +89,10 @@ pub(crate) fn azdls_config_parse(mut properties: HashMap<String, String>) -> Res
8489
config.client_secret = Some(client_secret);
8590
}
8691

92+
if let Some(authority_host) = properties.remove(ADLS_AUTHORITY_HOST) {
93+
config.authority_host = Some(authority_host);
94+
}
95+
8796
Ok(config)
8897
}
8998

0 commit comments

Comments
 (0)