๐ก๏ธ 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 stores 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 them in Azure Key Vault as secrets increases security by controlling access. This also allows credential updates without redeploying the entire application.
Impactโ
References to Key Vault secrets must be integrated into the application code. This requires additional configuration during application development or refactoring of an existing application. There are also additional costs charged per 10,000 requests to Key Vault.
Auditโ
From Azure Portalโ
- Log in to the Azure portal.
- In the left navigation pane, go to
Key Vaults.... see more
Remediationโ
Remediationโ
Remediation has two steps.
- Set up the Key Vault.
- Set up the App Service to use the Key Vault.
Step 1: Set up the Key Vaultโ
From Azure CLIโ
az keyvault create \
--name {{key-vault-name}} \
--resource-group {{resource-group-name}} \
--location {{location}}From PowerShellโ
New-AzKeyVault `
-Name {{key-vault-name}} `
-ResourceGroupName {{resource-group-name}} `
-Location {{location}}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" },
... [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 | 61 | no data |