davesaway
davesaway

Reputation: 3

How can I prevent an Azure Storage Shared Access Signature based on a Stored Access Policy being cached in the browser

I have generated an Azure Storage Shared Access Signature based on a Blob specific Stored Access Policy through Storage Explorer and have tested the generated URI in both Firefox and Chrome.

However, if I delete the SAP and/or regenerate the Storage Account Key, I can still access the Blob through that browser using the previous SAS.

Although clearing the Cached Web Content (or Chrome equivalent) resolves the issue I thought that deleting the SAP would immediately prevent further access (I only tried regenerating the key as a last resort and even that didn't work).

Is anyone aware of a way that I can prevent this browser caching of the SAS as it seems like a security issue to me.

Upvotes: 0

Views: 701

Answers (1)

Ivan Glasenberg
Ivan Glasenberg

Reputation: 29995

Please try to set the blob property CacheControl to max-age=0 or no-cache.

In storage explorer,right click the blob -> then in the context menu, select properties -> then scroll to CacheControl. Screenshot as below:

enter image description here

Upvotes: 2

Related Questions