azure: authenticate with Entra ID instead of a storage account key (#10456)

* azure: authenticate the blob sink with Entra ID

Shared account keys have to be distributed and rotated everywhere a sink
runs. Leaving account_key empty now falls back to the identity chain, so a
workload identity or managed identity carries the authorization instead.

* azure: authenticate remote storage with Entra ID

The remote storage client demanded an account key and refused to start
without one. Fall back to the identity chain when it is absent, and let
azure.client_id pin a user-assigned identity.

* azure: reject a malformed storage account name

The account name is interpolated into the service URL, so a name carrying
a "/", "?" or "@" moves the authority elsewhere and an authenticated
request follows it. Hold callers to Azure's own naming rule instead.

* azure: keep a leftover environment key off the identity path

A configured client id asks for Entra ID, but AZURE_STORAGE_ACCESS_KEY
still filled in the account key behind it. An old mounted secret would go
on authenticating until it rotated, and the failure then blamed the key.

* azure: say what the identity path reads from the environment

A pinned client id alone is not enough for workload identity: the tenant
and the projected token come from the environment, and missing them only
surfaces later, when a token is first requested.
This commit is contained in:
Chris Lu authored and GitHub committed 2026-07-27 14:12:14 -07:00
1 parent 6b6e6d8547
commit 3ae4e9c563
11 files changed
+242 -33

No files matched your search

+7
View File
@@ -59,7 +59,14 @@ is_incremental = false
# experimental, let me know if it works
enabled = false
account_name = ""
# leave account_key empty to authenticate with Entra ID instead of a shared key,
# picking up a workload identity or managed identity from the environment. The
# identity needs a data-plane role such as Storage Blob Data Contributor.
account_key = ""
# optional user-assigned identity, when account_key is empty. Workload identity
# takes its tenant and token from AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE,
# which the Azure workload identity webhook projects into the pod.
client_id = ""
container = "mycontainer" # an existing container
directory = "/" # destination directory
is_incremental = false