【发布时间】:2019-05-03 00:49:37
【问题描述】:
我最近设置了我的 .net 核心应用程序以使用 MSI(托管标识)与 Azure Blob 进行通信。
MSI 是否适用于 Azure 表存储?似乎找不到任何关于它的文档。
我正在尝试使用 MSI,因此我不必再管理我的密钥(无密钥)。
【问题讨论】:
标签: azure .net-core azure-blob-storage azure-table-storage azure-managed-identity
我最近设置了我的 .net 核心应用程序以使用 MSI(托管标识)与 Azure Blob 进行通信。
MSI 是否适用于 Azure 表存储?似乎找不到任何关于它的文档。
我正在尝试使用 MSI,因此我不必再管理我的密钥(无密钥)。
【问题讨论】:
标签: azure .net-core azure-blob-storage azure-table-storage azure-managed-identity
Azure 表存储不支持 MSI。表存储确实支持 Active Directory 访问。您可以在以下链接中找到支持 MSI 的服务...
托管标识在 Azure AD 中为 Azure 服务提供自动托管标识。你可以使用该标识向任何支持 Azure AD 身份验证的服务(包括 Key Vault)进行身份验证,而无需在代码中添加任何凭据。
https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview
【讨论】:
There is also a role for queue, but I didn't found one for table - 将 Azure Tables 移动到 Cosmos DB 下的原因。这就是您最近没有看到对 Azure Tables 进行任何增强的原因。 Azure 存储将继续支持 Azure Tables。
现在使用最新版本的 https://www.nuget.org/packages/Azure.Data.Tables/ (12.2.1)
您现在可以使用类似的东西创建客户端
var tableServiceClient = new TableServiceClient(uri, new efaultAzureCredential());
确保您已在 Azure 中为用户分配了正确的权限以从资源中读取
【讨论】: