Skip to main content

Module azure

Module azure 

Source
Expand description

An Azure Blob Storage implementation of Blob storage.

StructsΒ§

AzureBlob
Implementation of Blob backed by Azure Blob Storage.
AzureBlobConfig
Configuration for opening an AzureBlob.
RefreshingWorkloadIdentityCredential πŸ”’
A TokenCredential for AKS-style workload identity that re-reads the projected service account token file on every AAD access token refresh.

ConstantsΒ§

AZURE_CLIENT_ID πŸ”’
AZURE_FEDERATED_TOKEN πŸ”’
AZURE_FEDERATED_TOKEN_FILE πŸ”’
AZURE_TENANT_ID πŸ”’
Environment variables that configure AKS-style workload identity. The names match the ones azure_identity’s credential chain reads.
TOKEN_REFRESH_BUFFER πŸ”’
Time before an access token’s expiry at which its refresh task fetches a replacement, so requests keep being served from an unexpired token while the refresh round trip to AAD is in flight.
TOKEN_REFRESH_RETRY_INTERVAL πŸ”’
Minimum time a refresh task waits between fetch attempts once a refresh is due. This paces retries after failures, e.g. when AAD is transiently unreachable, and prevents hot-looping if issued tokens are already within TOKEN_REFRESH_BUFFER of expiry.

FunctionsΒ§

fetch_token πŸ”’
Reads the projected service account token file and exchanges its contents for an AAD access token.
refresh_task πŸ”’
Keeps slot holding an unexpired token by fetching a replacement within refresh_buffer of the current token’s expiry. A failed fetch leaves the current token in place and is retried after retry_interval.
token_credential πŸ”’
Returns the token credential to use when the blob URL carries no SAS token.

Type AliasesΒ§

ExchangeFn πŸ”’
Exchanges a client assertion (the projected service account token) for an AAD access token with the given scopes.
TokenSlot πŸ”’
A shared slot holding the current access token for one scope set.