You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Key Vault VM extension provides automatic refresh of certificates stored in an Azure key vault. Specifically, the extension monitors a list of observed certificates stored in key vaults. The extension retrieves and installs the corresponding certificates after detecting a change. This document details the supported platforms, configurations, and deployment options for the Key Vault VM extension for Linux.
17
17
18
-
###Operating system
18
+
## Operating system
19
19
20
20
The Key Vault VM extension supports these Linux distributions:
21
21
@@ -30,6 +30,16 @@ The Key Vault VM extension supports these Linux distributions:
30
30
- PKCS #12
31
31
- PEM
32
32
33
+
## Updates in Version 3.0+
34
+
35
+
Version 3.0+ of the Key Vault VM extension for Linux adds support for the following features:
36
+
37
+
- Add ACL permissions for downloaded certificates
38
+
- Certificate installation location configuration
39
+
- Custom symbolic name support
40
+
- VM extension logging integration support through [Fluentd](https://www.fluentd.org/)
41
+
42
+
33
43
## Prerequisites
34
44
- Key Vault instance with certificate. See [Create a Key Vault](../../key-vault/general/quick-create-portal.md)
35
45
- Assigned [managed identity](../../active-directory/managed-identities-azure-resources/overview.md) on VM/VMSS
@@ -56,20 +66,88 @@ The Key Vault VM extension supports these Linux distributions:
56
66
`
57
67
## Key Vault VM extension version
58
68
59
-
* Users can choose to upgrade their Key Vault vm extension version to `V2.0` to use full certificate chain download feature. Issuer certificates (intermediate and root) are included with leaf certificate in the PEM file.
69
+
* Users can choose to upgrade their existing Key Vault vn extension version to newer version.
60
70
61
-
* If you prefer to upgrade to `v2.0`, you would need to delete `v1.0`first, then install `v2.0`.
71
+
* If you prefer to upgrade to newer version, you would need to delete previous version first, then install newer version.
62
72
```azurecli
63
73
az vm extension delete --name KeyVaultForLinux --resource-group ${resourceGroup} --vm-name ${vmName}
64
-
az vm extension set -n "KeyVaultForLinux" --publisher Microsoft.Azure.KeyVault --resource-group "${resourceGroup}" --vm-name "${vmName}" –settings .\akvvm.json –version 2.0
74
+
az vm extension set -n "KeyVaultForLinux" --publisher Microsoft.Azure.KeyVault --resource-group "${resourceGroup}" --vm-name "${vmName}" –settings .\akvvm.json –version 3.0
65
75
```
66
-
The flag --version 2.0 is optional because the latest version is installed by default.
76
+
The flag --version 3.0 is optional because the latest version is installed by default.
67
77
68
-
* If the VM has certificates downloaded by v1.0, deleting the v1.0 AKVVM extension doesn't delete the downloaded certificates. After installing v2.0, the existing certificates aren't modified. You would need to delete the certificate files or roll-over the certificate to get the PEM file with full-chain on the VM.
78
+
* If the VM has certificates downloaded by previous version, deleting VM extension doesn't delete the downloaded certificates. After installing newer version, the existing certificates aren't modified. You would need to delete the certificate files or roll-over the certificate to get the PEM file with full-chain on the VM.
69
79
70
80
## Extension schema
71
81
72
82
The following JSON shows the schema for the Key Vault VM extension. The extension doesn't require protected settings - all its settings are considered information without security impact. The extension requires a list of monitored secrets, polling frequency, and the destination certificate store. Specifically:
"servicename": <Service name used in logs. e.g.: "akvvm_service">
107
+
},
108
+
"secretsManagementSettings": {
109
+
"pollingIntervalInS": <polling interval in seconds, e.g. "3600">,
110
+
"linkOnRenewal": <Not available on Linux e.g.: false>,
111
+
"requireInitialSync": <initial synchronization of certificates e..g: true>,
112
+
"aclEnabled": <Enables ACLs for downloaded certificates, e.g.: true>,
113
+
"observedCertificates": <An array of KeyVault URIs that represent monitored certificates, including certificate store location, ACL permission to certificate private key, and custom symbolic name. e.g.:
114
+
[
115
+
{
116
+
"url": <A Key Vault URI to the secret portion of the certificate. e.g.: "https://myvault.vault.azure.net/secrets/mycertificate1">,
117
+
"certificateStoreLocation": <disk path where certificate is stored, e.g.: "/var/lib/waagent/Microsoft.Azure.KeyVault/app1">,
118
+
"customSymbolicLinkName": <symbolic name for the certificate. e.g.: "app1Cert1">,
Azure VM extensions can be deployed with Azure Resource Manager templates. Templates are ideal when deploying one or more virtual machines that require post deployment refresh of certificates. The extension can be deployed to individual VMs or virtual machine scale sets. The schema and configuration are common to both template types.
@@ -142,6 +252,74 @@ The JSON configuration for a virtual machine extension must be nested inside the
142
252
> The VM extension would require system or user managed identity to be assigned to authenticate to Key vault. See [How to authenticate to Key Vault and assign a Key Vault access policy.](../../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm.md)
"servicename": <Service name used in logs. e.g.: "akvvm_service">
278
+
},
279
+
"secretsManagementSettings": {
280
+
"pollingIntervalInS": <polling interval in seconds, e.g. "3600">,
281
+
"requireInitialSync": <initial synchronization of certificates e..g: false>,
282
+
"observedCertificates": <An array of KeyVault URIs that represent monitored certificates, including certificate store location and ACL permission to certificate private key. Example:
283
+
[
284
+
{
285
+
"url": <A Key Vault URI to the secret portion of the certificate. Example: "https://myvault.vault.azure.net/secrets/mycertificate1">,
286
+
"certificateStoreLocation": <The certificate store location, which currently works locally only. Example: "/var/lib/waagent/Microsoft.Azure.KeyVault.Store">,
287
+
"acls": <Optional. An array of preferred acls with read access to certificate private keys. Example:
"certificateStoreLocation": <The certificate store location, which currently works locally only. Example: "/var/lib/waagent/Microsoft.Azure.KeyVault.Store">,
302
+
"acls": <Optional. An array of preferred acls with read access to certificate private keys. Example:
303
+
[
304
+
{
305
+
"user": "app2"
306
+
}
307
+
]>
308
+
}
309
+
310
+
]>
311
+
},
312
+
"authenticationSettings": {
313
+
"msiEndpoint": <Required when msiClientId is provided. MSI endpoint e.g. for most Azure VMs: "http://169.254.169.254/metadata/identity">,
314
+
"msiClientId": <Required when VM has any user assigned identities. MSI identity e.g.: "c7373ae5-91c2-4165-8ab6-7381d6e75619">
@@ -160,16 +338,23 @@ The JSON configuration for a virtual machine extension must be nested inside the
160
338
"settings": {
161
339
"secretsManagementSettings": {
162
340
"pollingIntervalInS": <polling interval in seconds, e.g. "3600">,
163
-
"certificateStoreName": <ingnored on linux>,
341
+
"certificateStoreName": <ignored on linux>,
164
342
"certificateStoreLocation": <disk path where certificate is stored, default: "/var/lib/waagent/Microsoft.Azure.KeyVault">,
165
343
"observedCertificates": <list of KeyVault URIs representing monitored certificates, e.g.: "https://myvault.vault.azure.net/secrets/mycertificate"
344
+
},
345
+
"authenticationSettings": {
346
+
"msiEndpoint": <Required when msiClientId is provided. MSI endpoint e.g. for most Azure VMs: "http://169.254.169.254/metadata/identity">,
347
+
"msiClientId": <Required when VM has any user assigned identities. MSI identity e.g.: "c7373ae5-91c2-4165-8ab6-7381d6e75619">
348
+
}
166
349
}
167
350
}
168
-
}
169
351
}
170
352
```
171
353
354
+
---
355
+
172
356
### Extension Dependency Ordering
357
+
173
358
The Key Vault VM extension supports extension ordering if configured. By default the extension reports successful start as soon as polling starts. However, you can configure it to wait until it successfully download the complete list of certificates before reporting a successful start. If other extensions depend on installed certificates before they start, then enabling this setting will allow those extensions to declare a dependency on the Key Vault extension. This will prevent those extensions from starting until all certificates they depend on have been installed. The extension will retry the initial download indefinitely and remain in a `Transitioning` state.
174
359
175
360
To turn on extension dependency, set the following:
@@ -190,7 +375,10 @@ The Azure PowerShell can be used to deploy the Key Vault VM extension to an exis
190
375
191
376
* To deploy the extension on a VM:
192
377
378
+
### [Version-3.0](#tab/version3)
379
+
193
380
```powershell
381
+
194
382
# Build settings
195
383
$settings = '{"secretsManagementSettings":
196
384
{ "pollingIntervalInS": "' + <pollingInterval> +
@@ -227,14 +415,60 @@ The Azure PowerShell can be used to deploy the Key Vault VM extension to an exis
Please be aware of the following restrictions/requirements:
262
498
- Key Vault restrictions:
263
499
- It must exist at the time of the deployment
264
-
- The Key Vault Access Policy must be set for VM/VMSS Identity using a Managed Identity. See [How to Authenticate to Key Vault](../../key-vault/general/authentication.md) and [Assign a Key Vault access policy](../../key-vault/general/assign-access-policy-cli.md).
500
+
- The Key Vault Secrets User role must be assigned to Key Vault for VM identity
0 commit comments