Your company requires all storage accounts containing sensitive client data to comply with a security policy that limits the maximum validity period of Shared Access Signatures (SAS) signed with account keys to 4 hours. You have configured a SAS lifetime policy on the storage account named clientdata.
A developer generates an ad-hoc Service SAS token for a blob in this storage account with a validity period of 12 hours.
What is the result when a client attempts to read the blob using this Service SAS token 1 hour after it was generated?
- AThe request succeeds because the SAS lifetime policy automatically truncates the token's validity period to 4 hours, and the request is made within the first hour.
- BThe request succeeds because SAS lifetime policies only apply to Account SAS tokens and do not restrict Service SAS tokens.
- The request fails with an HTTP 403 (Forbidden) error because the validity period of the SAS token exceeds the maximum limit configured in the SAS lifetime policy.Cevap
- DThe request succeeds because SAS lifetime policies only restrict the generation of new SAS tokens and do not affect the validation of tokens at the time of client requests.
Cevap
The request fails with an HTTP 403 (Forbidden) error because the validity period of the SAS token exceeds the maximum limit configured in the SAS lifetime policy.
The correct answer is that the request fails with a 403 (Forbidden) error. SAS lifetime policies limit the maximum expiration time allowed for SAS tokens signed with account keys. Because these tokens are generated offline, the policy is evaluated and enforced when a client presents the token for authorization. A token with an expiration exceeding the policy limit fails authorization completely.
Adım Adım Çözüm
Anahtar Kavram
Azure Storage SAS lifetime policies restrict the maximum allowed expiration period of SAS tokens signed with account keys, and this policy is enforced during request authorization.