π Azure Network Security Group Flow Logs retention period is less than 90 days π’
- Contextual name: π Security Group Flow Logs retention period is less than 90 days π’
- ID:
/ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days
- Located in: π Azure Virtual Network
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-e5c05d3e
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-e5c05d3e | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Network Security Group Flow Logs should be enabled and the retention period set to greater than or equal to 90 days.
Rationaleβ
Flow logs enable capturing information about IP traffic flowing in and out of network security groups. Logs can be used to check for anomalies and give insight into suspected breaches.
Impactβ
This will keep IP traffic logs for longer than 90 days. As a level 2, first determine your need to retain data, then apply your selection here. As this is data stored for longer, your monthly storage costs will increase depending on your data use.
Auditβ
From Azure Portalβ
- Go to
Network Watcher
.- Select
NSG flow logs
blade in the Logs section.- Select each Network Security Group from the list.
- Ensure
Status
is set toOn
.- Ensure
Retention (days)
settinggreater than 90 days
.From Azure CLIβ
az network watcher flow-log show --resource-group <resourceGroup> --nsg <NameorID of the NetworkSecurityGroup> --query 'retentionPolicy'
Ensure that
enabled
is set totrue
anddays
is set togreater then or equal to 90
.... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Go to
Network Watcher
.- Select
NSG flow logs
blade in the Logs section.- Select each Network Security Group from the list.
- Ensure
Status
is set toOn
.- Ensure
Retention (days)
settinggreater than 90 days
.- Select your storage account in the
Storage account
field.- Select
Save
.From Azure CLIβ
Enable the
NSG flow logs
and set theRetention (days)
togreater than or equal to 90 days
:az network watcher flow-log configure --nsg <NameorID of the Network Security Group> --enabled true --resource-group <resourceGroupName> --retention 91 --storage-account <NameorID of the storage account to save flow logs>