Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
131 stars 147 forks source link

How to authenticate an application running on azure VM to access azure storage. #382

Open chuyiwtree opened 3 years ago

chuyiwtree commented 3 years ago

Does the azure cpp storage sdk supports using DefaultAzureCredential (as in python sdk) method of authentication? How do we authenticate an application running on azure VM to access azure storage, if passing account key or token is not an option?

Thanks! Chuyi

Jinming-Hu commented 3 years ago

Hi @chuyiwtree , I'm not familiar with that in python sdk. Can you elaborate?

chuyiwtree commented 3 years ago

Hi @Jinming-Hu, please find following link: https://devblogs.microsoft.com/azure-sdk/azure-identity-august-2020-ga/

Jinming-Hu commented 3 years ago

Hi @chuyiwtree , this sdk doesn't support all the auth methods of DefaultAzureCredential. It only supports bearer token credential now, and you'll have to refresh the token before it expires by yourself.

Since this sdk is going to be deprecated in favor of Track2 storage sdk, you might want to request this feature in track2 identity sdk. https://github.com/Azure/azure-sdk-for-cpp/issues/5