Skip to main content

๐Ÿ’ผ 5.1 Configuring Diagnostic Settings

  • Contextual name: ๐Ÿ’ผ 5.1 Configuring Diagnostic Settings
  • ID: /frameworks/cis-azure-v2.0.0/05/01
  • Located in: ๐Ÿ’ผ 5 Logging and Monitoring

Descriptionโ€‹

The Azure Diagnostic Settings capture control/management activities performed on a subscription or Azure AD Tenant. By default, the Azure Portal retains activity logs only for 90 days. The Diagnostic Settings define the type of events that are stored or streamed and the outputsโ€”storage account, log analytics workspace, event hub, and others. The Diagnostic Settings, if configured properly, can ensure that all logs are retained for longer duration. This section has recommendations for correctly configuring the Diagnostic Settings so that all logs captured are retained for longer periods.

Azure Subscriptions

When configuring Diagnostic Settings, you may choose to export in one of four ways in which you need to ensure appropriate data retention. The options are Log Analytics, Event Hub, Storage Account, and Partner Solutions. It is important to ensure you are aware and have set retention as your organization sees fit.

Azure AD Logs

In order to retain sign in logs, user account changes, application provisioning logs, or other logs that are visible to only on the Tenant in Azure AD, separate Diagnostic settings must be specified.

Deployment by Policy

Deploying Azure diagnostics should ideally be done by policy to ensure a consistent configuration, Microsoft provide a full set of policies for all diagnostic capable resource types in their github repository. If you chose to deploy by policy, it is best to route the diagnostics to a Log Analytics Workspace so that they can be used in Azure Monitor or Azure Sentinel. Be aware that this has a cost attached to it. Future versions of the CIS Azure Foundations Benchmark will aim to cover the use of policy in greater detail.

Similarโ€‹

  • Internal
    • ID: dec-b-99d0827c

Sub Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlags
๐Ÿ’ผ 5.1.1 Ensure that a 'Diagnostic Setting' exists - Level 1 (Manual)
๐Ÿ’ผ 5.1.2 Ensure Diagnostic Setting captures appropriate categories - Level 1 (Automated)11
๐Ÿ’ผ 5.1.3 Ensure the Storage Container Storing the Activity Logs is not Publicly Accessible - Level 1 (Automated)
๐Ÿ’ผ 5.1.4 Ensure the storage account containing the container with activity logs is encrypted with Customer Managed Key - Level 2 (Automated)11
๐Ÿ’ผ 5.1.5 Ensure that logging for Azure Key Vault is 'Enabled' - Level 1 (Automated)11
๐Ÿ’ผ 5.1.6 Ensure that Network Security Group Flow logs are captured and sent to Log Analytics - Level 2 (Manual)
๐Ÿ’ผ 5.1.7 Ensure that logging for Azure AppService 'HTTP logs' is enabled - Level 2 (Manual)