|   Trend Micro Cloud One™
Open menu

Activity Log Retention

Cloud Conformity allows you to automate the auditing process of this resolution page. Register for a 14 day evaluation and check your compliance level for free!

Start a Free Trial Product features
Last updated: 04 February 2020
Risk level: Medium (should be achieved)

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.

Reliability

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:

Using Azure Console

01 Sign in to Azure Management Console.

02 Navigate to Azure Monitor blade at https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/overview.

03 In the navigation panel, select Activity log to access the activity log available in your Azure cloud account.

04 From the Subscription filter box, select the Azure account subscription that you want to examine.

05 On the Activity log page, click Export to Event Hub to access your Azure Log profile configuration settings. If there is no Log Profile currently available, follow the steps outlined in this conformity rule to create and configure one. If there is a Log Profile available, check the value set for the Retention (days) setting. If this value is less than 365 and different from 0 (retain data forever), the Log Profile created for the selected Azure subscription does not have a sufficient retention period configured.

06 Repeat step no. 4 and 5 for each subscription created in your Microsoft Azure cloud account.

Using Azure PowerShell

01 Run monitor log-profiles list command (Windows/macOS/Linux) using custom query filters to get the retention period configured for the Log Profile available in the current Azure subscription. If there is no Log Profile currently available, follow the steps outlined in this conformity rule to create one. Each Azure subscription has only one Log Profile:

az monitor log-profiles list
   --query '[*].retentionPolicy'

02 The command output should return the requested configuration information (i.e. the number of days to retain activity log data):

90

If the number (days) returned by the monitor log-profiles list command output is less than 365 and different from 0 (unlimited retention), as shown in the example above, the verified Azure Log Profile does not have a sufficient activity log data retention period configured.

03 Repeat step no. 1 and 2 for each subscription available in your Microsoft Azure cloud account.

Remediation / Resolution

To extend activity log data retention period for your Microsoft Azure account subscriptions, perform the following actions:

Using Azure Console

01 Sign in to Azure Management Console.

02 Navigate to Azure Monitor blade at https://portal.azure.com/#blade/Microsoft_Azure_Monitoring/AzureMonitoringBrowseBlade/overview.

03 In the navigation panel, select Activity log to access the activity log available in your Azure cloud account.

04 From the Subscription filter box, select the Azure account subscription that you want to update.

05 On the Activity log page, click Export to Event Hub to access your Azure Log Profile configuration settings.

06 On the Export activity log panel, set the number of days to retain activity log data for the selected Azure subscription in the Retention (days) box to 365 or 0, or use the slider control to set the right value. A setting of 0 (zero) days retains the activity logs forever. Click Save to apply the configuration changes.

07 Repeat steps no. 4 – 6 for each subscription created in your Microsoft Azure cloud account.

Using Azure CLI and PowerShell

01 Run monitor log-profiles update command (Windows/macOS/Linux) using the name of the Azure Log Profile that you want to reconfigure as identifier parameter to extend the retention period for activity log data recorded for the selected Azure subscription. For compliance, the activity log data retention period can be set to 365 and 0 (unlimited retention) days. For example, the following command request sets a retention period of 365 days for the activity log recorded within the current Microsoft Azure subscription (the command does not produce an output):

az monitor log-profiles update
	--name cc-activity-log-profile
	--set retentionPolicy.days=365

02 Repeat step no. 1 for each subscription created in your Microsoft Azure cloud account.

References

Publication date Jul 29, 2019

Unlock the Remediation Steps

Gain free unlimited access to our full Knowledge Base


Over 600 rules & best practices for and

Get started for FREE

A verification email will be sent to this address
We keep your information private. Learn more.

Thank you!

Please click the link in the confirmation email sent to

You are auditing:

Activity Log Retention

Risk level: Medium