DEV Community

Cover image for Microsoft Certified Azure Administrator Associate Exam (AZ-104) Lab Preparation #4.2: Storage Account and Access Token
David Au Yeung
David Au Yeung

Posted on

2 1 1 1 1

Microsoft Certified Azure Administrator Associate Exam (AZ-104) Lab Preparation #4.2: Storage Account and Access Token

Introduction

To pass the AZ-104 exam, you need to complete several live online lab tests. This article will teach you how to grant limited access to Azure Storage resources using Shared Access Signatures (SAS). We will continue our previous lab tutorial as an example.

Steps

Step 1:
Navigate to "Storage accounts."
Check if our account "davidaystorageaccount" has Blob anonymous access disabled.

Image description

And you will see the uploaded file will response PublicAccessNotPermitted.

Image description

Step 2:
In the "Storage accounts," click on "Shared access signature."

Image description

Step 3:
In the "Shared access signature" section, configure the following settings:

Allowed services: Blob

Allowed resource types: Service, Container, Object

Image description

Start and expiry date/time: Set according to your preference.

Then, click "Generate SAS and connection string."

Image description

Note that the signing key "key1" is stored in "Access keys":

Image description

Step 4:
Copy the generated "SAS token".

?sv=2022-11-02&ss=b&srt=sco&sp=rwdlaciytfx&se=2025-01-06T18:52:17Z&st=2025-01-06T10:52:17Z&spr=https&sig=w6DGYscuw3bBilBys2j2g6GqBN2e%2FSMGu5GrIbtjMuA%3D

Image description

Testing

Paste the SAS token into the target blob resource URL:

https://davidaystorageaccount.blob.core.windows.net/folder1/hello_david.jpg?sv=2022-11-02&ss=b&srt=sco&sp=rwdlaciytfx&se=2025-01-06T18:52:17Z&st=2025-01-06T10:52:17Z&spr=https&sig=w6DGYscuw3bBilBys2j2g6GqBN2e%2FSMGu5GrIbtjMuA%3D

Image description

You should replace the SAS token part in the URL with the one you copied.

Remark

If you rotate "key1" stored in "Access keys," all previously generated SAS tokens using "key1" will become invalid.

Image description

Image description

Conclusion

In this lab, you learned how to create a Shared Access Signature (SAS) for an Azure Storage account, allowing you to grant limited access to your storage resources. This is a crucial skill for the AZ-104 exam, as it demonstrates your ability to manage Azure Storage securely. Always remember that rotating your access keys will invalidate existing SAS tokens, so plan your security measures accordingly. Continue practicing these steps to ensure you are well-prepared for your exam!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (1)

Collapse
 
martin_tristin_cc2b8e50a0 profile image
Martin Tristin

Ace the AZ-104 exam with Certifiedumps.com’s expertly crafted study guides and practice questions. Get ready with confidence!
certifiedumps.com/microsoft/az-104...

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay