You are developing a client-side application that needs to upload temporary log files to a specific container named 'logs' in an Azure Blob Storage account. You need to generate a Shared Access Signature (SAS) token for the client. The solution must adhere to the principle of least privilege, allow access only from the IP address range 198.51.100.0/24, restrict communication to HTTPS, and expire in 2 hours. Which of the following configurations should you implement?
- AAn Account SAS scoped to the storage account with Read, Write, and List permissions across all services, protocol set to HTTP and HTTPS, and no IP address restrictions.
- A Service SAS scoped only to the 'logs' container with Write-only permission, protocol restricted to HTTPS-only, IP address range restricted to 198.51.100.0/24, and a 2-hour expiration time.Cevap
- CA Service SAS scoped to the 'logs' container with Read, Write, and Delete permissions, protocol restricted to HTTPS-only, and a 24-hour expiration time.
- DAn Account SAS scoped to the Blob service with Write and Delete permissions, protocol set to HTTP and HTTPS, and no IP address restrictions.
Cevap
A Service SAS scoped only to the 'logs' container with Write-only permission, protocol restricted to HTTPS-only, IP address range restricted to 198.51.100.0/24, and a 2-hour expiration time.
The correct configuration is a Service SAS scoped to the 'logs' container with Write-only permission, HTTPS-only protocol, the specific client IP address range, and a 2-hour expiration time. This ensures that the client has only the necessary access permissions, is constrained to a secure protocol and IP range, and that the token expires as soon as possible.
Adım Adım Çözüm
Anahtar Kavram
Shared Access Signatures (SAS) Principle of Least Privilege