Skip to content

Commit 0d40c98

Browse files
authored
Merge pull request #104895 from JasonFreeberg/E@R-with-CMK
Encryption at rest w/ Customer Managed Keys (CMK)
2 parents 6bfd2a0 + 609f0ba commit 0d40c98

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

articles/app-service/deploy-run-package.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,33 @@ az webapp config appsettings set --name <app-name> --resource-group <resource-gr
5959

6060
If you publish an updated package with the same name to Blob storage, you need to restart your app so that the updated package is loaded into App Service.
6161

62+
### Use Key Vault References
63+
64+
For added security, you can use Key Vault References in conjunction with your external URL. This keeps the URL encrypted at rest and allows to leverage Key Vault for secret management and rotation. It is recommended to use Azure Blob storage so you can easily rotate the associated SAS key. Azure Blob storage is encrypted at rest, which keeps your application data secure when it is not deployed on App Service.
65+
66+
1. Create an Azure Key Vault.
67+
68+
```azurecli
69+
az keyvault create --name "Contoso-Vault" --resource-group <group-name> --location eastus
70+
```
71+
72+
1. Add your external URL as a secret in Key Vault.
73+
74+
```azurecli
75+
az keyvault secret set --vault-name "Contoso-Vault" --name "external-url" --value "<insert-your-URL>"
76+
```
77+
78+
1. Create the `WEBSITE_RUN_FROM_PACKAGE` app setting and set the value as a Key Vault Reference to the external URL.
79+
80+
```azurecli
81+
az webapp config appsettings set --settings WEBSITE_RUN_FROM_PACKAGE="@Microsoft.KeyVault(SecretUri=https://Contoso-Vault.vault.azure.net/secrets/external-url/<secret-version>"
82+
```
83+
84+
See the following articles for more information.
85+
86+
- [Key Vault references for App Service](app-service-key-vault-references.md)
87+
- [Azure Storage encryption for data at rest](../storage/common/storage-service-encryption.md)
88+
6289
## Troubleshooting
6390
6491
- Running directly from a package makes `wwwroot` read-only. Your app will receive an error if it tries to write files to this directory.

articles/azure-functions/run-functions-from-deployment-package.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,33 @@ The following shows a function app configured to run from a .zip file hosted in
5454

5555
[!INCLUDE [Function app settings](../../includes/functions-app-settings.md)]
5656

57+
### Use Key Vault References
58+
59+
For added security, you can use Key Vault References in conjunction with your external URL. This keeps the URL encrypted at rest and allows to leverage Key Vault for secret management and rotation. It is recommended to use Azure Blob storage so you can easily rotate the associated SAS key. Azure Blob storage is encrypted at rest, which keeps your application data secure when it is not deployed on App Service.
60+
61+
1. Create an Azure Key Vault.
62+
63+
```azurecli
64+
az keyvault create --name "Contoso-Vault" --resource-group <group-name> --location eastus
65+
```
66+
67+
1. Add your external URL as a secret in Key Vault.
68+
69+
```azurecli
70+
az keyvault secret set --vault-name "Contoso-Vault" --name "external-url" --value "<insert-your-URL>"
71+
```
72+
73+
1. Create the `WEBSITE_RUN_FROM_PACKAGE` app setting and set the value as a Key Vault Reference to the external URL.
74+
75+
```azurecli
76+
az webapp config appsettings set --settings WEBSITE_RUN_FROM_PACKAGE="@Microsoft.KeyVault(SecretUri=https://Contoso-Vault.vault.azure.net/secrets/external-url/<secret-version>"
77+
```
78+
79+
See the following articles for more information.
80+
81+
- [Key Vault references for App Service](../app-service/app-service-key-vault-references.md)
82+
- [Azure Storage encryption for data at rest](../storage/common/storage-service-encryption.md)
83+
5784
## Troubleshooting
5885
5986
- Run From Package makes `wwwroot` read-only, so you will receive an error when writing files to this directory.

0 commit comments

Comments
 (0)