Status: Deprecated
This recommendation is no longer valid due to changes in the retention configuration options for Activity Log. Activity log events are now retained in Azure for 90 days and then deleted by default. For more functionality, create a diagnostic setting to send the activity log to one or more of these locations for the following reasons:
- Send to Azure Monitor Logs for more complex querying and alerting and for longer retention, up to two years.
- Send to Azure Event Hubs to forward outside of Azure.
- Send to Azure Storage for cheaper, long-term archiving.
Log profiles are the legacy method for sending the activity log to storage or event hubs. If you're using this method, consider transitioning to diagnostic settings, which provide better functionality and consistency with resource logs. To follow audit and remediation steps for exporting logs via diagnostic settings, refer to this rule.
Ensure that the Log Profile created for your Azure activity log has a retention period of 365 days or more, configured for reliability and compliance purposes. A Log Profile controls how the activity log is exported and retained within your Azure cloud account. The retention period represents the number of days to retain activity logs for a Microsoft Azure cloud subscription.
This rule resolution is part of the Conformity Security & Compliance tool for Azure.
A retention period of 365 days or more should allow you to collect the necessary amount of activity log data useful to find any anomalies and potential security breaches. Because the average time to detect a breach is 210 days, your Azure activity log should be retained for 365 days or more in order to give you enough time to respond efficiently to any incidents.
Audit
To determine if your Azure Log Profile has a sufficient retention period configured for activity log data, perform the following actions:
Remediation / Resolution
To extend activity log data retention period for your Microsoft Azure account subscriptions, perform the following actions:
References
- Azure Official Documentation
- Overview of Azure Activity log
- Export Azure Activity log to storage or Azure Event Hubs
- CIS Microsoft Azure Foundations
- Azure Command Line Interface (CLI) Documentation
- az monitor log-profiles
- az monitor log-profiles list
- az monitor log-profiles update