|
| 1 | +// similar to CIS 3.1 |
| 2 | +export default { |
| 3 | + id: 'pci-dss-3.2.1-encryption-check-4', |
| 4 | + title: "Encryption Check 4: Storage Accounts 'Secure transfer required' should be enabled", |
| 5 | + |
| 6 | + description: 'Enable Storage Accounts data encryption in transit.', |
| 7 | + |
| 8 | + audit: `**From Azure Console** |
| 9 | +
|
| 10 | + 1. Go to Storage Accounts |
| 11 | + 2. For each storage account, go to Configuration |
| 12 | + 3. Ensure that Secure transfer required is set to Enabled |
| 13 | +
|
| 14 | + **Using Azure Command Line Interface 2.0** |
| 15 | + Use the below command to ensure the Secure transfer required is enabled for all the Storage Accounts by ensuring the output contains true for each of the Storage Accounts. |
| 16 | +
|
| 17 | + z storage account list --query [*].[name,enableHttpsTrafficOnly]`, |
| 18 | + |
| 19 | + rationale: |
| 20 | + "The secure transfer option enhances the security of a storage account by only allowing requests to the storage account by a secure connection. For example, when calling REST APIs to access storage accounts, the connection must use HTTPS. Any requests using HTTP will be rejected when 'secure transfer required' is enabled. When using the Azure files service, connection without encryption will fail, including scenarios using SMB 2.1, SMB 3.0 without encryption, and some flavors of the Linux SMB client. Because Azure storage doesn’t support HTTPS for custom domain names, this option is not applied when using a custom domain name.", |
| 21 | + |
| 22 | + remediation: `**From Azure Console** |
| 23 | +
|
| 24 | + 1. Go to Storage Accounts |
| 25 | + 2. For each storage account, go to Configuration |
| 26 | + 3. Set Secure transfer required to Enabled |
| 27 | +
|
| 28 | + **Using Azure Command Line Interface 2.0** |
| 29 | + Use the below command to enable Secure transfer required for a Storage Account |
| 30 | +
|
| 31 | + az storage account update --name <storageAccountName> --resource-group <resourceGroupName> --https-only true`, |
| 32 | + |
| 33 | + references: [ |
| 34 | + 'https://docs.microsoft.com/en-us/azure/storage/blobs/security-recommendations#encryption-in-transit', |
| 35 | + 'https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az_storage_account_list', |
| 36 | + 'https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az_storage_account_update', |
| 37 | + 'https://docs.microsoft.com/en-us/azure/security/benchmarks/security-controls-v2-data-protection#dp-4-encrypt-sensitive-information-in-transit', |
| 38 | + ], |
| 39 | + gql: `{ |
| 40 | + queryazureStorageAccount { |
| 41 | + id |
| 42 | + __typename |
| 43 | + enableHttpsTrafficOnly |
| 44 | + } |
| 45 | + }`, |
| 46 | + resource: 'queryazureStorageAccount[*]', |
| 47 | + severity: 'medium', |
| 48 | + conditions: { |
| 49 | + path: '@.enableHttpsTrafficOnly', |
| 50 | + equal: 'Yes', |
| 51 | + }, |
| 52 | +} |
0 commit comments