az-104 Practice Question 1707
Exam: az-104
Domain: Implement and manage storage
Topic: Configure access to storage
Difficulty: medium
Contoso Ltd wants to ensure that only specific users within their organization can access certain Azure Blob containers, and they want to avoid hardcoding keys in the application code. What is the best practice for achieving this, and how does it work?
Answer Options
A
Use Shared Access Signatures (SAS) for each user.
B
Implement Storage Firewall to restrict access by IP address.
C
Use Stored Access Policies to define and assign permissions to users.
D
Store the storage account key in a secure vault and retrieve it programmatically.
Correct Answer
C: Use Stored Access Policies to define and assign permissions to users.
Explanation
The correct answer is to use Stored Access Policies. Stored Access Policies allow you to define and assign permissions to specific users or groups at the container level. This method avoids hardcoding keys in the application code by leveraging Azure Active Directory (AAD) for authentication and authorization. Other options like Shared Access Signatures (SAS) are suitable for temporary access, and Storage Firewall controls IP-level access rather than user-level access.