Ensure App Service plan SKU supports private endpoints
Description
Ensure that your App Service plan SKU supports private endpoints. Private endpoints provide secure access over Azure Private Link, which keeps traffic on the Microsoft backbone network and eliminates exposure to the public internet. Note that not all SKUs support private endpoints.
Rationale
An appropriately configured private endpoint eliminates public exposure and helps prevent data exfiltration.
Impact
App Service plan costs vary based on the selected SKU.
Audit Procedure
Using Azure Portal
- Go to
App Services.
- Click the name of an app.
- In the
Properties pane, under Hosting, next to SKU and size, ensure that the plan tier is one of the following: Basic, Standard, ElasticPremium, Premium, PremiumV2, Premium0V3, PremiumV3, PremiumMV3, IsolatedV2, IsolatedMV2, WorkflowStandard, FlexConsumption, and that the plan name is one of the following: B1, B2, B3, S1, S2, S3, EP1, EP2, EP3, P1, P2, P3, P1V2, P2V2, P3V2, P0V3, P1V3, P2V3, P3V3, P1MV3, P2MV3, P3MV3, P4MV3, P5MV3, I1V2, I2V2, I3V2, I4V2, I5V2, I6V2, I1MV2, I2MV2, I3MV2, I4MV2, I5MV2, WS1, WS2, WS3, FC1.
- Repeat steps 1-3 for each app.
Using Azure CLI
Run the following command to list apps:
az webapp list
For each app, run the following command to get the App Service plan ID:
az webapp show --resource-group <resource-group-name> --name <app-name> --query appServicePlanId
For each App Service plan, run the following command to get the plan SKU tier and name:
az appservice plan show --resource-group <resource-group-name> --name <app-service-plan-name> --query "{tier:sku.tier,name:sku.name}"
Ensure that the plan tier is one of the following: Basic, Standard, ElasticPremium, Premium, PremiumV2, Premium0V3, PremiumV3, PremiumMV3, IsolatedV2, IsolatedMV2, WorkflowStandard, FlexConsumption, and that the plan name is one of the following: B1, B2, B3, S1, S2, S3, EP1, EP2, EP3, P1, P2, P3, P1V2, P2V2, P3V2, P0V3, P1V3, P2V3, P3V3, P1MV3, P2MV3, P3MV3, P4MV3, P5MV3, I1V2, I2V2, I3V2, I4V2, I5V2, I6V2, I1MV2, I2MV2, I3MV2, I4MV2, I5MV2, WS1, WS2, WS3, FC1.
Using Azure PowerShell
Run the following command to list apps:
Get-AzWebApp
Run the following command to get the app in a resource group with a given name:
$app = Get-AzWebApp -ResourceGroupName <resource-group-name> -Name <app-name>
Run the following command to get the App Service plan ID:
$app.ServerFarmId
Run the following command to get the App Service plan in a resource group with a given name:
$plan = Get-AzAppServicePlan -ResourceGroupname <resource-group-name> -Name <app-service-plan-name>
Run the following command to get the plan SKU tier and name:
$plan.Sku | select-object Tier, Name
Ensure that the plan tier and name match the supported values listed above. Repeat for each app.
Expected Result
The App Service plan SKU tier and name should be one that supports private endpoints (Basic or higher).
Remediation
Using Azure Portal
- Go to
App Services.
- Click the name of an app.
- In the
Properties pane, under Hosting, next to Name, click the App Service plan name.
- Under
Current App Service plan, next to Name, click the App Service plan name.
- Under
Essentials, next to Pricing plan, click the pricing plan name.
- Select a pricing plan where the plan tier is one of the following:
Basic, Standard, ElasticPremium, Premium, PremiumV2, Premium0V3, PremiumV3, PremiumMV3, IsolatedV2, IsolatedMV2, WorkflowStandard, FlexConsumption, and the plan name is one of the supported values.
- Click
Select.
- Click
Downgrade or Upgrade to confirm the change.
- Repeat steps 1-8 for each app and App Service plan requiring remediation.
Using Azure CLI
For each App Service plan requiring remediation, run the following command to update the SKU:
az appservice plan update --resource-group <resource-group-name> --name <app-service-plan-name> --sku <sku>
Using Azure PowerShell
Not specifically documented for this control.
Default Value
The App Service plan is selected during creation.
References
- https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans
- https://learn.microsoft.com/en-us/azure/app-service/overview-private-endpoint
- https://learn.microsoft.com/en-us/cli/azure/webapp
- https://learn.microsoft.com/en-us/cli/azure/appservice/plan
- https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp
- https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azappserviceplan
- https://azure.microsoft.com/en-us/pricing/details/app-service/linux/
- https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
Profile
Level 2 | Automated
1---2name: cis-azure-compute-2-1-153description: Ensure App Service plan SKU supports private endpoints4---56# Ensure App Service plan SKU supports private endpoints78## Description910Ensure that your App Service plan SKU supports private endpoints. Private endpoints provide secure access over Azure Private Link, which keeps traffic on the Microsoft backbone network and eliminates exposure to the public internet. Note that not all SKUs support private endpoints.1112## Rationale1314An appropriately configured private endpoint eliminates public exposure and helps prevent data exfiltration.1516## Impact1718App Service plan costs vary based on the selected SKU.1920- App Service on Linux pricing: https://azure.microsoft.com/en-us/pricing/details/app-service/linux/21- App Service on Windows pricing: https://azure.microsoft.com/en-us/pricing/details/app-service/windows/2223## Audit Procedure2425### Using Azure Portal26271. Go to `App Services`.282. Click the name of an app.293. In the `Properties` pane, under `Hosting`, next to `SKU and size`, ensure that the plan tier is one of the following: `Basic`, `Standard`, `ElasticPremium`, `Premium`, `PremiumV2`, `Premium0V3`, `PremiumV3`, `PremiumMV3`, `IsolatedV2`, `IsolatedMV2`, `WorkflowStandard`, `FlexConsumption`, and that the plan name is one of the following: `B1`, `B2`, `B3`, `S1`, `S2`, `S3`, `EP1`, `EP2`, `EP3`, `P1`, `P2`, `P3`, `P1V2`, `P2V2`, `P3V2`, `P0V3`, `P1V3`, `P2V3`, `P3V3`, `P1MV3`, `P2MV3`, `P3MV3`, `P4MV3`, `P5MV3`, `I1V2`, `I2V2`, `I3V2`, `I4V2`, `I5V2`, `I6V2`, `I1MV2`, `I2MV2`, `I3MV2`, `I4MV2`, `I5MV2`, `WS1`, `WS2`, `WS3`, `FC1`.304. Repeat steps 1-3 for each app.3132### Using Azure CLI3334Run the following command to list apps:3536```37az webapp list38```3940For each app, run the following command to get the App Service plan ID:4142```43az webapp show --resource-group <resource-group-name> --name <app-name> --query appServicePlanId44```4546For each App Service plan, run the following command to get the plan SKU tier and name:4748```49az appservice plan show --resource-group <resource-group-name> --name <app-service-plan-name> --query "{tier:sku.tier,name:sku.name}"50```5152Ensure that the plan tier is one of the following: `Basic`, `Standard`, `ElasticPremium`, `Premium`, `PremiumV2`, `Premium0V3`, `PremiumV3`, `PremiumMV3`, `IsolatedV2`, `IsolatedMV2`, `WorkflowStandard`, `FlexConsumption`, and that the plan name is one of the following: `B1`, `B2`, `B3`, `S1`, `S2`, `S3`, `EP1`, `EP2`, `EP3`, `P1`, `P2`, `P3`, `P1V2`, `P2V2`, `P3V2`, `P0V3`, `P1V3`, `P2V3`, `P3V3`, `P1MV3`, `P2MV3`, `P3MV3`, `P4MV3`, `P5MV3`, `I1V2`, `I2V2`, `I3V2`, `I4V2`, `I5V2`, `I6V2`, `I1MV2`, `I2MV2`, `I3MV2`, `I4MV2`, `I5MV2`, `WS1`, `WS2`, `WS3`, `FC1`.5354### Using Azure PowerShell5556Run the following command to list apps:5758```59Get-AzWebApp60```6162Run the following command to get the app in a resource group with a given name:6364```65$app = Get-AzWebApp -ResourceGroupName <resource-group-name> -Name <app-name>66```6768Run the following command to get the App Service plan ID:6970```71$app.ServerFarmId72```7374Run the following command to get the App Service plan in a resource group with a given name:7576```77$plan = Get-AzAppServicePlan -ResourceGroupname <resource-group-name> -Name <app-service-plan-name>78```7980Run the following command to get the plan SKU tier and name:8182```83$plan.Sku | select-object Tier, Name84```8586Ensure that the plan tier and name match the supported values listed above. Repeat for each app.8788## Expected Result8990The App Service plan SKU tier and name should be one that supports private endpoints (Basic or higher).9192## Remediation9394### Using Azure Portal95961. Go to `App Services`.972. Click the name of an app.983. In the `Properties` pane, under `Hosting`, next to `Name`, click the App Service plan name.994. Under `Current App Service plan`, next to `Name`, click the App Service plan name.1005. Under `Essentials`, next to `Pricing plan`, click the pricing plan name.1016. Select a pricing plan where the plan tier is one of the following: `Basic`, `Standard`, `ElasticPremium`, `Premium`, `PremiumV2`, `Premium0V3`, `PremiumV3`, `PremiumMV3`, `IsolatedV2`, `IsolatedMV2`, `WorkflowStandard`, `FlexConsumption`, and the plan name is one of the supported values.1027. Click `Select`.1038. Click `Downgrade` or `Upgrade` to confirm the change.1049. Repeat steps 1-8 for each app and App Service plan requiring remediation.105106### Using Azure CLI107108For each App Service plan requiring remediation, run the following command to update the SKU:109110```111az appservice plan update --resource-group <resource-group-name> --name <app-service-plan-name> --sku <sku>112```113114### Using Azure PowerShell115116Not specifically documented for this control.117118## Default Value119120The App Service plan is selected during creation.121122## References1231241. https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans1252. https://learn.microsoft.com/en-us/azure/app-service/overview-private-endpoint1263. https://learn.microsoft.com/en-us/cli/azure/webapp1274. https://learn.microsoft.com/en-us/cli/azure/appservice/plan1285. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp1296. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azappserviceplan1307. https://azure.microsoft.com/en-us/pricing/details/app-service/linux/1318. https://azure.microsoft.com/en-us/pricing/details/app-service/windows/132133## Profile134135Level 2 | Automated