feat: (IAC-1386) EncryptAtHost changes for NIST #372
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
This PR adds EncryptAtHost requirements in the VMs and AKS nodes.
Note: You must enable the feature for your subscription before you use the EncryptionAtHost property for your VM/VMSS. Use the following steps to enable the feature for your subscription:
This is an optional features, to enable encryption at host for nodes and VMs you would set the following variables:
By default, when using AKS, OS and data disks use server-side encryption with platform-managed keys. The caches for these disks are encrypted at rest with platform-managed keys. You can specify your own managed keys following Bring your own keys (BYOK) with Azure disks in Azure Kubernetes Service. The caches for these disks are also encrypted using the key you specify.
When using customer-managed-keys, ensure you have the proper AKS credentials. The managed identity needs to have contributor access to the resource group where the diskencryptionset is deployed. Otherwise, you'll get an error suggesting that the managed identity does not have permissions.
Also, make sure the VNet of your deployment has access to the Key Vault which has the diskencryptionset.
Note: Adding the subnet service endpoints makes the process smooth.
Tests:
enable_vm_host_encryption = true
,aks_cluster_enable_host_encryption = true
enable_vm_host_encryption = true
,vm_disk_encryption_set_id = "<disk_encryption_set_id>"
,aks_cluster_enable_host_encryption = true
,aks_node_disk_encryption_set_id = "<disk_encryption_set_id>"