turbot/azure_compliance

Control: 9.5 Ensure that Register with Azure Active Directory is enabled on App Service

Description

Managed service identity in App Service makes the app more secure by eliminating secrets from the app, such as credentials in the connection strings. When registering with Azure Active Directory in the app service, the app will connect to other Azure services securely without the need of username and passwords.

App Service provides a highly scalable, self-patching web hosting service in Azure. It also provides a managed identity for apps, which is a turn-key solution for securing access to Azure SQL Database and other Azure services.

Remediation

From Console

  1. Login to Azure Portal and go to App Services.
  2. Click on each App.
  3. Under Settings section, click on Identity.
  4. From System assigned tab, set Status to On.
  5. Click Save.

From Command Line

To set Register with Azure Active Directory feature for an existing app, run the following command:

az webapp identity assign --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME>

Usage

steampipe check azure_compliance.control.cis_v130_9_5

SQL

This control uses a named query:

appservice_web_app_register_with_active_directory_enabled

Tags