Control: 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.
Usage
Run the control in your terminal:
powerpipe control run terraform_azure_compliance.control.appservice_web_app_register_with_active_directory_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.appservice_web_app_register_with_active_directory_enabled --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std -> 'identity') is null then 'alarm'    when (attributes_std -> 'identity' ->> 'type')::text = 'SystemAssigned' then 'ok'    else 'ok'  end status,  split_part(address, '.', 2) || case    when (attributes_std -> 'identity') is null then ' ''identity'' not defined'    when (attributes_std -> 'identity' ->> 'type')::text = 'SystemAssigned' then ' register with azure active directory enabled'    else ' register with azure active directory disabled.'  end || '.' reason    , path || ':' || start_linefrom  terraform_resourcewhere  type = 'azurerm_app_service';