You are configuring a web application hosted on an Azure Virtual Machine to upload user profile images to a blob container named `profile-images` in an Azure Storage account named `webappassets2026`.
The application has the following requirements:
* Access must be limited exclusively to the `profile-images` container.
* Access must be restricted to HTTPS connections originating from the virtual machine's public IP address (`198.51.100.12`).
* Access credentials must automatically expire after 8 hours.
* The storage account access keys must not be used or exposed to sign the token.
Which configuration should you implement to meet the requirements under the principle of least privilege?
- Generate a User Delegation SAS scoped to the profile-images container by using a security principal assigned the Storage Blob Data Delegator role, restricted to HTTPS and the IP address 198.51.100.12.Cevap
- BGenerate a Service SAS scoped to the profile-images container signed with the storage account access key, restricted to HTTPS and the IP address 198.51.100.12.
- CGenerate an Account SAS scoped to the Blob service signed with the storage account access key, with a validity period of 30 days, restricted to HTTPS.
- DAssign the virtual machine's managed identity the Storage Blob Data Contributor role, disable public access on the storage account firewall, and enable the 'Allow trusted Microsoft services to access this storage account' bypass.
Cevap
Generate a User Delegation SAS scoped to the profile-images container by using a security principal assigned the Storage Blob Data Delegator role, restricted to HTTPS and the IP address 198.51.100.12.
A User Delegation SAS is the only option that satisfies the requirement to avoid using or exposing the storage account access keys, as it is signed with a user delegation key acquired via Microsoft Entra ID authentication. To generate this key, the security principal requires the Storage Blob Data Delegator role. Scoping the SAS token to the container level with HTTPS-only and IP address constraints enforces the principle of least privilege.
Adım Adım Çözüm
Anahtar Kavram
User Delegation SAS and RBAC