Ensure Azure Network Security Perimeter is used to secure Azure PaaS resources
Description
Azure Network Security Perimeter creates a logical boundary around Azure platform-as-a-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.
Rationale
Network security perimeter denies public access to PaaS resources, reducing exposure and mitigating data exfiltration risks.
Impact
Implementation requires administrative effort to configure and maintain network security perimeter profiles and resource assignments. Azure does not list any additional charges for using network security perimeters.
Audit Procedure
Using Azure Portal
- Go to
Resource groups. - Click the name of a resource group.
- Take note of PaaS resources.
- Go to
Network Security Perimeters. - Click the name of a network security perimeter.
- Under
Settings, clickAssociated resources. - Take note of the associated resources.
- Repeat steps 1-7 and ensure each PaaS resource is associated with a network security perimeter.
Using Azure CLI
Run the following command to list resource groups:
az group list
For each resource group, run the following command to list resources:
az resource list --resource-group <resource-group>
Take note of PaaS resources.
For each resource group, run the following command to list network security perimeters:
az network perimeter list --resource-group <resource-group>
For each network security perimeter, run the following command to list resources:
az network perimeter association list --resource-group <resource-group> --perimeter-name <network-security-perimeter>
Ensure each PaaS resource is associated with a network security perimeter.
Expected Result
All PaaS resources should be associated with a network security perimeter. The association list for each perimeter should include all relevant PaaS resources in the environment.
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 aName, 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 profileorAssociate 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.
- Provide a
- 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.
References
- https://learn.microsoft.com/en-us/azure/private-link/network-security-perimeter-concepts
- https://learn.microsoft.com/en-us/azure/private-link/create-network-security-perimeter-portal
- https://learn.microsoft.com/en-us/cli/azure/group
- https://learn.microsoft.com/en-us/cli/azure/resource
- https://learn.microsoft.com/en-us/cli/azure/network/perimeter
Profile
Level 2 | Manual