Azure Storage Block Blobs
Last updated
Last updated
Azure Block Blobs are the equivalent of AWS S3 and allows to store objects. Access to these objects can then be done over HTTP using a URL that is generated.
We will look at
misconfigurations with Azure Block Blobs (AWS S3 equivalent)
Create a new Blob Storage object using the following steps
Click on Storage Account
from the favorites menu and click Create storage account
or the + Add
button.
Provide a unique storage account name. For example azuretestbucket
. This has to be unique across the Internet. So you can use your unique-name to proceed.
Under account kind select BlobStorage
from the drop down.
Leave all the remaining options at default
Click Next: Networking
and let the default Public endpoint (all networks)
Click Next:Advanced
. Do not change anything here. Click on Review + Create
Click Create
after validation is successful, to setup your Azure Block Blob.
Click on Go to resource
Under Settings
, click on Properties
and copy the PRIMARY BLOB SERVICE ENDPOINT
. For azuretestbucket
, it will be https://azuretestbucket.blob.core.windows.net/
To add data to the Blob, a container inside the Blob must be created. This can be done via the Storage Explorer.
Azure Storage can also be managed using an external Storage manager (download link in references).
We will use the portal to upload and manage data to our Blob.
Click on Storage Explorer
in the left pane of the Storage account.
Right click on BLOB CONTAINERS
and select Create Blob Container
.
Give it a name and set the Public access level
to Container (annonymous read access for containers and blobs)
Click on the newly created container and select Upload
on the container menu
Select a file (non-sensitive).
Under Advanced, make sure the Account key
toggle button is selected
Select Blob type
to Block blob
Click Upload
Once Upload is completed, click on the object that was uploaded and click on Copy URL
Navigate to the URL to view the object.
Right click on the uploaded object and select Get Shared Access Signature (SAS)
You can enable the DELETE
permission as well.
To access the uploaded file using the SAS browse to the SAS URL created.
To delete the object, use curl -X DELETE https://SAS-URL-HERE