| name | cis-azure-compute-2.3.11 |
| description | Ensure 'App Service authentication' is set to 'Enabled' |
| category | cis-azure-compute |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","function-apps","app-service-auth","authentication","identity"] |
| cis_id | 2.3.11 |
| cis_benchmark | CIS Microsoft Azure Compute Services Benchmark v2.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure 'App Service authentication' is set to 'Enabled'
Description
App Service authentication can prevent anonymous HTTP requests from reaching an app, 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 login page. To handle the login process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented.
Rationale
By enabling authentication, every incoming HTTP request passes through it before being handled by the application code. It also handles authentication of users with the specified provider (Entra ID, Facebook, Google, Microsoft Account, and Twitter), validation, storage and refreshing of tokens, managing the authenticated sessions, and injecting identity information into request headers.
Impact
This is only required for apps that require authentication. Enabling it on a site like a marketing or support website will prevent unauthenticated access, which would be undesirable.
Adding an authentication requirement will increase costs and require additional security components to facilitate the authentication.
Audit Procedure
Using Azure Portal
- Go to
App Services or Function App.
- Click the name of a function app.
- Under
Settings, click Authentication.
- Ensure that
App Service authentication is set to Enabled.
- Repeat steps 1-4 for each function app.
Using Azure CLI
Run the following command to list function apps:
az functionapp list
For each function app, run the following command to get the authentication setting:
For v1 auth commands:
az webapp auth show --resource-group <resource-group-name> --name <function-app-name> --query enabled
For v2 auth commands:
az webapp auth show --resource-group <resource-group-name> --name <function-app-name> --query properties.platform.enabled
Ensure that true is returned.
Expected Result
App Service authentication should be enabled (return true).
Remediation
Using Azure Portal
- Go to
App Services or Function App.
- Click the name of a function app.