How to consume Azure storage account on a web app hosted outside Azure?

Najam ul Saqib 360 Reputation points
2024-11-19T06:34:42.1366667+00:00

If I have a storage account on Azure that holds data of users on an external web application, how can I use it on frontend?

I cannot use anonymous access because the data is not public. Each user on the web app has its own data, like user A on the web app should not be able to access user B's data.

I cannot employ Entra authentication because these are web app users which I dont plan to register/enroll in Entra.

I only see a few options, I cant go for Entra auth (as stated earlier), I cant use anonymous access, shared access key signature is discouraged to be used, and only left recommendation is user delegation SAS which again is dependent on Entra users.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,330 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,040 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 12,960 Reputation points
    2024-11-19T07:26:54.9466667+00:00

    Hello Najam ,
    To consume storage accounts outside of Azure in a web application while discouraging anonymous access and Shared Access Signatures (SAS), one alternative approach is to build a service application (Azure function )that acts as a proxy. In this setup, the user's device authenticates with the service application, which then authorizes access to Azure Storage resources. This method helps to avoid exposing storage account keys on insecure devices, although it does introduce additional overhead since all data transferred between the user's device and Azure Storage must pass through the service application.

    Another approach is to utilize Azure Role-Based Access Control (RBAC) to manage access permissions effectively. By assigning specific roles to users or applications, you can control who has access to the storage resources without exposing sensitive keys or using SAS.

    References:

    Please let us know if you have any other questions

    Thanks

    Deepanshu


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.