I am working on a Azure Blob Storage which has some image files. I want to use the image in my website, but want to pull the images securely. The code I wrote is using a SAS token generated on the container. However to retrieve the image, the URL to the image file is used with the SAS token passed as a URL parameter. Isn't that insecure in the sense that anyone who gets the SAS token for the time it is valid, can also download the image? Is there some way to post the SAS token back within the Request header so that its protected? How would I achieve this?
So at the moment I can generate a SAS programmatically. But when using it to retrieve the blob I dont want to use the format of https://myblobstore.blob.core.windows.net/test/image-0_8.jpg?skoid=<>&sktid=<>&skt=<>&ske=<>&sks=b&skv=<>&st=<>&se=<>&sr=b&sp=r&sig=<>, since the signature is readable to anyone. Is there another way?
Thanks in advance, Jake.
I am not sure how the web application was configured. But you can use the below concept of code that might be help you to access the blob files or images over website without displaying the SAS URL in your request Header.
Reference piece of code:- Download and display a private Azure Blob using ASP MVC
Additional References:
Reference: https://learn.microsoft.com/en-us/answers/questions/252303/sas-url-to-display-in-browser-rather-than-download.html