Skip to content

Commit

Permalink
Fix broken auths
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Dec 22, 2023
1 parent f6e40aa commit d4af840
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,23 @@ Status AzureOptions::ConfigureClientSecretCredential(const std::string& account_
const std::string& tenant_id,
const std::string& client_id,
const std::string& client_secret) {
account_name_ = account_name;
credential_kind_ = CredentialKind::kTokenCredential;
token_credential_ = std::make_shared<Azure::Identity::ClientSecretCredential>(
tenant_id, client_id, client_secret);
return Status::OK();
}

Status AzureOptions::ConfigureDefaultCredential(const std::string& account_name) {
account_name_ = account_name;
credential_kind_ = CredentialKind::kTokenCredential;
token_credential_ = std::make_shared<Azure::Identity::DefaultAzureCredential>();
return Status::OK();
}

Status AzureOptions::ConfigureManagedIdentityCredential(const std::string& account_name,
std::string const& clientId) {
account_name_ = account_name;
credential_kind_ = CredentialKind::kTokenCredential;
token_credential_ =
std::make_shared<Azure::Identity::ManagedIdentityCredential>(clientId);
Expand All @@ -139,6 +142,7 @@ Status AzureOptions::ConfigureManagedIdentityCredential(const std::string& accou

Status AzureOptions::ConfigureWorkloadIdentityCredential(
const std::string& account_name) {
account_name_ = account_name;
credential_kind_ = CredentialKind::kTokenCredential;
token_credential_ = std::make_shared<Azure::Identity::WorkloadIdentityCredential>();
return Status::OK();
Expand Down

0 comments on commit d4af840

Please sign in to comment.