Control: 7.16 Ensure Azure Network Security Perimeter is used to secure Azure platform-as-a-service resources
Description
Azure Network Security Perimeter creates a logical boundary around Azure platform-asa-service (PaaS) resources outside of virtual networks. By default, the network security perimeter denies public access to associated PaaS resources, with the ability to define explicit rules for inbound and outbound traffic.
While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining appropriate network security perimeter profiles and resource assignments depends on the context and requirements of each organization and environment.
Network security perimeter denies public access to PaaS resources, reducing exposure and mitigating data exfiltration risks.
Remediation
Remediate from Azure Portal
Create and associate PaaS resources with a new network security perimeter:
- Go to
Network Security Perimeters. - Click
+ Create. - Select a
SubscriptionandResource group, provide a Name, select aRegion, and provide aProfile name. - Click
Next. - Click
+ Add. - Check the box next to a PaaS resource to associate it with the network security perimeter.
- Click
Select. - Click
Next. - Configure appropriate
Inbound access rulesfor your organization. - Click
Next. - Configure appropriate
Outbound access rulesfor your organization. - Click
Review + create. - Click
Create.
Associate PaaS resources with an existing network security perimeter:
- Go to
Network Security Perimeters. - Click the name of a network security perimeter.
- Under
Settings, clickAssociated resources. - Click
+ Add. - Select Associate resources with a new profile or Associate resources with an existing profile.
- To associate resources with a new profile:
- Provide a Name.
- Click
Next. - Click
+ Add. - Check the box next to a PaaS resource to associate it with the network security perimeter.
- Click
Select. - Click
Next. - Configure appropriate
Inbound access rulesfor your organization. - Click
Next. - Configure appropriate
Outbound access rulesfor your organization. - Click
Review + create. - Click
Create.
- To associate resources with an existing profile:
- Next to
Profile, clickSelectto display the drop-down menu. - Select a
profile. - Click
+ Add. - Check the box next to a PaaS resource to associate it with the network security perimeter.
- Click
Select. - Click
Associate.
- Next to
Remediate from Azure CLI
Use az network perimeter profile list or az network perimeter profile create to list existing or create a new network security perimeter profile.
For each PaaS resource requiring association with a network security perimeter, run the following command:
az network perimeter association create --resource-group <resource-group> --perimeter-name <network-security-perimeter> --association-name <association> --private-link-resource "{id:<paas-resource-id>}" --profile "{<profile-id>}"
Default Value
PaaS resources are not associated with a network security perimeter by default.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cis_v500_7_16Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cis_v500_7_16 --shareSQL
This control uses a named query:
select id as resource, 'info' as status, 'Manual verification required.' as reason, display_name as subscriptionfrom azure_subscription;