Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Workload Identity Credentials #83

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static void LoadInternal(DatabaseInstance &instance) {
LogicalType::VARCHAR);
config.AddExtensionOption("azure_credential_chain",
"Ordered list of Azure credential providers, in string format separated by ';'. E.g. "
"'cli;managed_identity;env'",
"'cli;workload_identity;managed_identity;env'",
LogicalType::VARCHAR, nullptr);
config.AddExtensionOption("azure_endpoint",
"Override the azure endpoint for when the Azure credential providers are used.",
Expand Down
3 changes: 3 additions & 0 deletions src/azure_storage_account_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <azure/identity/default_azure_credential.hpp>
#include <azure/identity/environment_credential.hpp>
#include <azure/identity/managed_identity_credential.hpp>
#include <azure/identity/workload_identity_credential.hpp>
#include <azure/storage/blobs/blob_options.hpp>
#include <azure/storage/blobs/blob_service_client.hpp>

Expand Down Expand Up @@ -138,6 +139,8 @@ CreateChainedTokenCredential(const std::string &chain,
for (const auto &item : chain_list) {
if (item == "cli") {
sources.push_back(std::make_shared<Azure::Identity::AzureCliCredential>(credential_options));
} else if (item == "workload_identity") {
sources.push_back(std::make_shared<Azure::Identity::WorkloadIdentityCredential>(credential_options));
} else if (item == "managed_identity") {
sources.push_back(std::make_shared<Azure::Identity::ManagedIdentityCredential>(credential_options));
} else if (item == "env") {
Expand Down
Loading