Control: Ensure that 'Enable key rotation reminders' is enabled for each Storage Account
Description
Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The 'Rotation Reminder' is an automatic reminder feature for a manual procedure, the default value is 90 days.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.storage_account_key_rotation_reminder_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.storage_account_key_rotation_reminder_enabled --share
SQL
This control uses a named query:
select sa.id as resource, case when key_policy is null then 'alarm' when key_policy ->> 'keyExpirationPeriodInDays' = '90' then 'ok' else 'alarm' end as status, case when key_policy is null then sa.name || ' key rotation reminder disabled.' else sa.name || ' key rotation reminder enabled for ' || (key_policy ->> 'keyExpirationPeriodInDays') || ' days.' end as reason , sa.resource_group as resource_group , sub.display_name as subscriptionfrom azure_storage_account sa, azure_subscription subwhere sub.subscription_id = sa.subscription_id;