Tuhin Paul
Stored access policy in Azure Blob Storage

What is the difference between a SAS token and a stored access policy in Azure Blob Storage?

By Tuhin Paul in Azure on Feb 24 2023
  • Jay Pankhaniya
    Mar, 2023 8

    Both Shared Access Signatures (SAS) and Stored Access Policies (SAP) in Azure Blob Storage are used to control access to your storage resources, but they differ in how they provide that access control.

    A SAS token is a string of characters that contains a security token, which provides time-limited access to a specific Azure Storage resource, such as a blob or container. You can create a SAS token with specific permissions, such as read, write, or delete, and set an expiry time for the token. Once the token expires, the user will no longer have access to the resource. You can also revoke a SAS token at any time by invalidating the token.

    On the other hand, a stored access policy is a named set of permissions that can be assigned to one or more storage resources, such as blobs or containers. You create the policy once and then use it to grant access to specific resources over time. When you create a stored access policy, you define the permissions that the policy grants and the duration of the policy. You can then apply the policy to one or more storage resources, and the policy’s permissions and duration will apply to those resources until the policy expires or is deleted.

    In Short,

    • SAS tokens are used to grant temporary, time-limited access to specific Azure Storage resources.
    • while stored access policies are used to grant persistent, policy-based access to multiple storage resources over a period of time.

    • 0

Most Popular Job Functions