From d347bec531837af8fd7396603a15fb51c8fc73b6 Mon Sep 17 00:00:00 2001 From: Vinay Suryadevara <126499167+vinay92-ch@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:09:14 -0800 Subject: [PATCH] [WIP] Add support for Workload identity credentials in AzureBlobStorage --- .../AzureBlobStorage/AzureBlobStorageAuth.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Disks/ObjectStorages/AzureBlobStorage/AzureBlobStorageAuth.cpp b/src/Disks/ObjectStorages/AzureBlobStorage/AzureBlobStorageAuth.cpp index 6075b385a6c..c091cc152d8 100644 --- a/src/Disks/ObjectStorages/AzureBlobStorage/AzureBlobStorageAuth.cpp +++ b/src/Disks/ObjectStorages/AzureBlobStorage/AzureBlobStorageAuth.cpp @@ -108,6 +108,12 @@ template std::unique_ptr getAzureBlobStorageClientWithAuth( const String & url, const String & container_name, const Poco::Util::AbstractConfiguration & config, const String & config_prefix) { + if (config.has(config_prefix + ".use_workload_identity_for_azure")) + { + auto workload_identity_credential = std::make_shared(); + return std::make_unique(url, workload_identity_credential); + } + if (config.has(config_prefix + ".connection_string")) { String connection_str = config.getString(config_prefix + ".connection_string");