bug: azdls backend doesn't load Azure credentials from environment variables
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
### Describe the bug
The `azdls` backend does not load Azure credentials from environment variables, unlike the `azblob` backend. Specifically, it's not calling `AzureStorageConfig::default().from_env()`, which means Azure Workload Identity environment variables are never loaded.
This causes authentication to fail in environments like Azure Kubernetes Service (AKS) with Workload Identity enabled, where credentials are provided via environment variables rather than explicit configuration.
### Steps to Reproduce
1. Deploy an application using the `azdls` backend in AKS with Workload Identity enabled
2. Set up the following environment variables (automatically injected by Azure Workload Identity):
- `AZURE_FEDERATED_TOKEN_FILE`
- `AZURE_CLIENT_ID`
- `AZURE_TENANT_ID`
- `AZURE_AUTHORITY_HOST`
3. Try to access Azure Data Lake Storage Gen2 without explicitly configuring credentials in code
4. Authentication fails and falls back to IMDS, which doesn't work in AKS
### Expected Behavior
The `azdls` backend should automatically load Azure credentials from environment variables, just like the `azblob` backend does (as implemented in PR #4705).
### Additional Context
PR #4705 fixed this issue for the `azblob` backend to close #4704, but the same fix was not applied to the `azdls` backend. The two backends should have consistent behavior for credential loading.
### Are you willing to submit a PR to fix this bug?
- [x] Yes, I would like to submit a PR.
Contributor guide
Research direction
Compare the azdls backend's credential initialization with the azblob backend and inspect PR #4705, focusing on AzureStorageConfig::default().from_env(). Run the existing azdls tests if available; done means Azure Workload Identity environment variables are loaded and authentication no longer falls back unnecessarily to IMDS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, rust
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100