You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are two ways to authenticate with Azure: 1. CONN_STR or 2. SAS_SVC_URL. I am asking for one more option: DefaultAzureCredential.
We currently use Workload Identity in Kubernetes to spin up a container in the context of an Azure account. We can then connect to Azure using the default credentials to access resources. We do not have to pass any connection information to the container. Essentially connection information is in the environment that the SDK can use to connect.
Here is an example in Python using the Python SDK that works in our environment:
# in the middle of a function to handle a filecredential=DefaultAzureCredential()
client=BlobClient.from_blob_url(file, credential)
Done. Should be good for upcoming release (#289) this weekend.
Would be nice if you could compile the binary on branch v1.2.10 (steps here) to test to confirm it works.
Closing for now.
I just tested this locally and it works exactly how I expected. I only have to specify the type, account, and container and sling will pick up the credentials from the environment.
I still need to run this in containers, but I trust DefaultAzureCredential will work there as well.
Feature Description
Currently there are two ways to authenticate with Azure: 1.
CONN_STR
or 2.SAS_SVC_URL
. I am asking for one more option:DefaultAzureCredential
.We currently use Workload Identity in Kubernetes to spin up a container in the context of an Azure account. We can then connect to Azure using the default credentials to access resources. We do not have to pass any connection information to the container. Essentially connection information is in the environment that the SDK can use to connect.
Here is an example in Python using the Python SDK that works in our environment:
I am not a Go developer, but it appears that the Azure blob SDK has a similar function at https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#NewClient. It takes a credential from
azidentity
module.In the
azidentity
module there is a default Azure credential: https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#authenticate-to-azure-with-defaultazurecredentialThe text was updated successfully, but these errors were encountered: