๐ก๏ธ Azure App Service does not use Azure Key Vaults to store secrets๐ขโช
- Contextual name: ๐ก๏ธ App Service does not use Azure Key Vaults to store secrets๐ขโช
 - ID: 
/ce/ca/azure/app-service/use-key-vaults-to-store-secrets - Tags:
- โช Impossible policy
 - ๐ข Policy with categories
 - ๐ข Policy with type
 
 - Policy Type: 
COMPLIANCE_POLICY - Policy Categories: 
SECURITY 
Similar Policiesโ
- Cloud Conformity: Use Key Vaults to Store App Service Application Secrets
 
Descriptionโ
Descriptionโ
Azure Key Vault will store multiple types of sensitive information such as encryption keys, certificate thumbprints, and Managed Identity Credentials. Access to these 'Secrets' can be controlled through granular permissions.
Rationaleโ
The credentials given to an application have permissions to create, delete, or modify data stored within the systems they access. If these credentials are stored within the application itself, anyone with access to the application or a copy of the code has access to them. Storing within Azure Key Vault as secrets increases security by controlling access. This also allows for updates of the credentials without redeploying the entire application.
Impactโ
Integrating references to secrets within the key vault are required to be specifically integrated within the application code. This will require additional configuration to be made during the writing of an application, or refactoring of an already written one. There are also additional costs that are charged per 10000 requests to the Key Vault.
... see more
Remediationโ
Remediationโ
Remediation has 2 steps
- Setup the Key Vault.
 - Setup the App Service to use the Key Vault.
 Step 1: Set up the Key Vaultโ
From Azure CLIโ
az keyvault create --name "<name>" --resource-group "<myResourceGroup>" --location myLocationFrom Powershellโ
New-AzKeyvault -name <name> -ResourceGroupName <myResourceGroup> -Location <myLocation>Step 2: Set up the App Service to use the Key Vaultโ
Sample JSON Template for App Service Configuration:
{
//...
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
//...
},
{
"type": "Microsoft.Insights/components",
"name": "[variables('appInsightsName')]",
//...
},
{
"type": "Microsoft.Web/sites",
"name": "[variables('functionAppName')]",
"identity": {
"type": "SystemAssigned" },
//...
"resources": [
... [see more](remediation.md)
policy.yamlโ
Linked Framework Sectionsโ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance | 
|---|---|---|---|---|---|
| ๐ผ CIS Azure v2.1.0 โ ๐ผ 9.10 Ensure Azure Key Vaults are Used to Store Secrets - Level 2 (Manual) | 1 | no data | |||
| ๐ผ CIS Azure v3.0.0 โ ๐ผ 9.11 Ensure Azure Key Vaults are Used to Store Secrets (Manual) | 1 | no data | |||
| ๐ผ Cloudaware Framework โ ๐ผ Data Encryption | 44 | no data |