AZ-305 ยท Authorization, secrets and keys
Authorizing access to data: Entra ID first, keys last
Microsoft Entra authorization vs shared keys and SAS for Storage (user delegation SAS, disabling shared key), Azure ABAC role assignment conditions, database Entra authentication.
Key points
- Prefer Microsoft Entra ID and data roles (Storage Blob Data Reader) over account keys.
- Service SAS, account SAS: signed with the account key.
- User delegation SAS: Entra-obtained key, up to 7 days.
- AllowSharedKeyAccess false: rejects Shared Key, service and account SAS; Entra and user delegation SAS work.
- ABAC conditions narrow blob or queue role assignments by index tags or container.
- Microsoft Entra-only authentication: no SQL logins.
Source: https://learn.microsoft.com/en-us/azure/storage/common/shared-key-authorization-prevent
Practice questions
Which type of shared access signature is secured with Microsoft Entra credentials instead of the storage account key?
- Account SAS
- Service SAS
- User delegation SAS
- Stored access policy SAS
Show answer
Answer: C. User delegation SAS
A user delegation SAS is signed with a user delegation key that the caller requests with an Entra token. Service SAS and account SAS are both signed with the account key, so they stop working when Shared Key access is disallowed.
AllowSharedKeyAccess is set to false on a storage account. Which requests to Blob Storage can still succeed?
- A request with an Entra token from a principal holding Storage Blob Data Reader
- A request that uses a user delegation SAS
- A request that uses a service SAS for one container
- A request that uses an account SAS
- A request signed with the primary account key
Show answer
Answer: A. A request with an Entra token from a principal holding Storage Blob Data Reader, B. A request that uses a user delegation SAS
Requests with an Entra OAuth token and a suitable data role are allowed, and so is a user delegation SAS because it is authorized through Entra ID. Service SAS, account SAS and requests signed directly with the account key all rely on Shared Key and are rejected with 403.
An Azure ABAC role assignment condition can be used to explicitly deny a user access to a specific blob container, overriding their other role assignments.
Show answer
Answer: False
False. A condition only filters down what its own role assignment grants; it cannot explicitly deny access. If another role assignment grants the access without a condition, the user still has it.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
