Control: 3.2 Ensure that storage account access keys are periodically regenerated
Description
Regenerate storage account access keys periodically.
When a storage account is created, Azure generates two 512-bit storage access keys, which are used for authentication when the storage account is accessed. Rotating these keys periodically ensures that any inadvertent access or exposure does not result in these keys being compromised.
Remediation
From Console
- Login to Azure Storage Accounts
- For each selected storage account, go to
Activity
log from side bar - Under Timespan drop-down, select Custom and choose Start time and End time such that it ranges 90 days
- Enter
RegenerateKey
in the Search text box - Click Apply
- It should list out all RegenerateKey events. If no such event exists, then this is a finding.
To remediate, follow Microsoft Azure documentation for regenerating storage account access keys.
Note: By default, access keys are not regenerated periodically.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cis_v140_3_2
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cis_v140_3_2 --share
SQL
This control uses a named query:
manual_control