无法使用拥有所有者访问的Azure应用程序访问存储表

发布于 2025-01-28 01:28:42 字数 238 浏览 6 评论 0原文

我们之前使用SAS令牌访问存储帐户。现在要求不使用它。如果Azure应用程序具有所有者访问权限,是否有可能访问该存储帐户。我尝试使用它。但是得到这个错误。

消息”:“指定的资源不存在

我们正在使用的URL IS

`https://${tableService.storageAccountName}.table.core.windows.net/tablename

We earlier used sas token to access the storage account.Now the requirment is to not to use it. Is it possible for an azure app to access the storage account if it has owner access. I tried using it . But getting this error.

message": "The specified resource does not exist

the url we are using is

`https://${tableService.storageAccountName}.table.core.windows.net/tablename

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青芜 2025-02-04 01:28:42

只需指向一个没有任何形式的凭据的存储帐户,将不适用于私人存储帐户或容器。
您必须提供一些选项,您需要提供凭据才能连接到存储帐户,例如使用包含访问密钥的连接字符串或使用 azure Resources的托管身份

托管身份为支持Azure Active Directory(Azure AD)身份验证的资源时,为应用程序提供了一种身份。应用程序可以使用托管身份获得Azure AD令牌。

这是使用托管身份的一些好处:

  • 您不需要管理凭据。您甚至无法获得凭据。
  • 您可以使用托管身份来验证任何支持Azure AD身份验证的资源,包括您自己的应用程序。
  • 可以使用托管身份而无需任何额外费用。

由于这些好处和易用性,我建议您授权使用托管身份的Azure Resources 访问BLOB数据。

Azure Blob存储支持Azure Active Directory(Azure AD)身份验证,并具有用于Azure资源的托管身份。 Azure Resources的托管身份可以使用Azure虚拟机中运行的应用程序(VMS),功能应用程序,虚拟机量表集和其他服务来授权对BLOB数据访问BLOB数据。通过将托管身份与Azure AD身份验证一起用于Azure资源,您可以避免使用在云中运行的应用程序存储凭据。

将RBAC角色分配给托管身份

当Azure AD安全主体尝试访问Azure存储帐户中的数据时,该安全主体必须对数据资源具有权限。安全主体是否是Azure中的托管身份,还是在开发环境中运行代码的Azure AD用户帐户,必须分配安全主体的Azure角色,以授予Azure Storage中的数据访问。

Simply pointing to a storage account, without any form of credentials, will not work for a private storage account or container.
There are a couple of options you have to provide credentials to connect to a storage account, like using the connection strings containing the access keys or using Managed Identities for Azure resources.

Managed identities provide an identity for applications to use when connecting to resources that support Azure Active Directory (Azure AD) authentication. Applications may use the managed identity to obtain Azure AD tokens.

Here are some of the benefits of using managed identities:

  • You don't need to manage credentials. Credentials aren’t even accessible to you.
  • You can use managed identities to authenticate to any resource that supports Azure AD authentication, including your own applications.
  • Managed identities can be used without any additional cost.

Because of these benefits and the ease of use I would suggest you Authorize access to blob data with managed identities for Azure resources.

Azure Blob Storage supports Azure Active Directory (Azure AD) authentication with managed identities for Azure resources. Managed identities for Azure resources can authorize access to blob data using Azure AD credentials from applications running in Azure virtual machines (VMs), function apps, virtual machine scale sets, and other services. By using managed identities for Azure resources together with Azure AD authentication, you can avoid storing credentials with your applications that run in the cloud.

Assign an RBAC role to a managed identity

When an Azure AD security principal attempts to access data in an Azure Storage account, that security principal must have permissions to the data resource. Whether the security principal is a managed identity in Azure or an Azure AD user account running code in the development environment, the security principal must be assigned an Azure role that grants access to data in Azure Storage.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文