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

feat(core): Azblob supports azure workload identity #4705

Merged
merged 1 commit into from
Jun 7, 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
4 changes: 2 additions & 2 deletions bin/ofs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bin/oli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ sha1 = { version = "0.10.6", optional = true }
sha2 = { version = "0.10", optional = true }

# For http based services.
reqsign = { version = "0.15.0", default-features = false, optional = true }
reqsign = { version = "0.15.2", default-features = false, optional = true }

# for services-atomic-server
atomic_lib = { version = "0.34.5", optional = true }
Expand Down
28 changes: 18 additions & 10 deletions core/src/services/azblob/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,16 +439,24 @@ impl Builder for AzblobBuilder {
})?
};

let config_loader = AzureStorageConfig {
account_name: self
.config
.account_name
.clone()
.or_else(|| infer_storage_name_from_endpoint(endpoint.as_str())),
account_key: self.config.account_key.clone(),
sas_token: self.config.sas_token.clone(),
..Default::default()
};
let mut config_loader = AzureStorageConfig::default().from_env();

if let Some(v) = self
.config
.account_name
.clone()
.or_else(|| infer_storage_name_from_endpoint(endpoint.as_str()))
{
config_loader.account_name = Some(v);
}

if let Some(v) = self.config.account_key.clone() {
config_loader.account_key = Some(v);
}

if let Some(v) = self.config.sas_token.clone() {
config_loader.sas_token = Some(v);
}

let encryption_key =
match &self.config.encryption_key {
Expand Down
Loading