Skip to content

bug: azdls backend doesn't load Azure credentials from environment variables #7224

@rohankmr414

Description

@rohankmr414

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?

  • Yes, I would like to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions