Control: Ensure App Service authentication is set up for apps in Azure App Service
Description
Azure App Service authentication is a feature that can prevent anonymous HTTP requests from reaching a Web Application or authenticate those with tokens before they reach the app. If an anonymous request is received from a browser, App Service will redirect to a logon page. To handle the logon process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.appservice_authentication_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.appservice_authentication_enabled --shareSQL
This control uses a named query:
select  app.id as resource,  case    when not (auth_settings -> 'properties' ->> 'enabled') :: boolean then 'alarm'    else 'ok'  end as status,  case    when not (auth_settings -> 'properties' ->> 'enabled') :: boolean then name || ' authentication not set.'    else name || ' authentication set.'  end as reason    , app.resource_group as resource_group  , sub.display_name as subscriptionfrom  azure_app_service_web_app as app  left join azure_subscription as sub on sub.subscription_id = app.subscription_id;