Some months ago I have some posts about Shared Access Signature (SAS). Yesterday I received a simple question that appears when we start to use SAS over Windows Azure Storage (blobs, tables or queues).
When I’m using Shared Access Signature over a blob, should I change the public access level?
People can have the feeling that from the moment when you start using the SAS over a container or a blob, people will not be able to access the content in the classic way. SAS don’t change the public access level, because of this, if your blob is public, than people will be able to access it using SAS token or with a normal URL.
To be able to control the access to a container or to a blob using only SAS you will need to set the access level of the content to private. This can be made from different locations (Windows Azure Portal, different storage clients or from code). Having a container of blob with the access level set to private means that people with account credentials will be able to access the content.
I recommend you to have different containers for the content that needs to be public and private (and the private content is access using SAS). In this way the content management will be easier. Also, try to generate SAS tokens per blob and not per container, when is possible.
Using the storage account name and access key anybody can access our storage account, even if we are using SAS. From the moment when we start using SAS, our client should not have access to our storage account credentials. Also, using storage account credentials anybody can change our SAS configuration.
In conclusion we could say that from the moment when we start using SAS we should switch the access rights of the blobs and container to private.
When I’m using Shared Access Signature over a blob, should I change the public access level?
People can have the feeling that from the moment when you start using the SAS over a container or a blob, people will not be able to access the content in the classic way. SAS don’t change the public access level, because of this, if your blob is public, than people will be able to access it using SAS token or with a normal URL.
To be able to control the access to a container or to a blob using only SAS you will need to set the access level of the content to private. This can be made from different locations (Windows Azure Portal, different storage clients or from code). Having a container of blob with the access level set to private means that people with account credentials will be able to access the content.
I recommend you to have different containers for the content that needs to be public and private (and the private content is access using SAS). In this way the content management will be easier. Also, try to generate SAS tokens per blob and not per container, when is possible.
Using the storage account name and access key anybody can access our storage account, even if we are using SAS. From the moment when we start using SAS, our client should not have access to our storage account credentials. Also, using storage account credentials anybody can change our SAS configuration.
In conclusion we could say that from the moment when we start using SAS we should switch the access rights of the blobs and container to private.
Comments
Post a Comment