8.3.1 Ensure that the Expiration Date is Set for all Keys in Key Vaults using RBAC

Information

Ensure that all Keys in Azure Key Vaults using Role Based Access Control (RBAC) have an expiration date set.

Note: The audit commands require data-plane access to each Key Vault in addition to the management-plane Reader role. Without data-plane access these commands return empty results silently.

The Azure Key Vault enables users to store and use cryptographic keys within the Microsoft Azure environment. The exp (expiration date) attribute identifies the expiration date on or after which the key MUST NOT be used for encryption of new data, wrapping of new keys, and signing. By default, keys never expire. It is thus recommended that keys be rotated in the key vault and set an explicit expiration date for all keys to help enforce the key rotation. This ensures that the keys cannot be used beyond their assigned lifetimes.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

Requisite RBAC Permissions for Keys - read section overview!

Remediation Role = Key Vault Crypto Officer

Remediate from Azure Portal

- Go to Key vaults.
- For each Key vault, under Objects, select Keys.
- In the main pane, ensure that the status of the key(s) is Enabled.
- Click on the Key without Expiration date.
- Click the checkbox Set expiration date and set an appropriate Expiration date on the Key.
- Click Apply.

Remediate from Azure CLI

Update the Expiration date for the key using the below command:

az keyvault key set-attributes --name <keyName> --vault-name <vaultName> --expires Y-m-d'T'H:M:S'Z'

Remediate from PowerShell

Set-AzKeyVaultKeyAttribute -VaultName <VaultName> -Name <KeyName> -Expires <DateTime>

Impact:

Keys cannot be used beyond their assigned expiration dates respectively. Keys need to be rotated periodically wherever they are used.

See Also

https://workbench.cisecurity.org/benchmarks/24282

Item Details

Category: ACCESS CONTROL, AUDIT AND ACCOUNTABILITY, SYSTEM AND INFORMATION INTEGRITY

References: 800-53|AC-1, 800-53|AC-2, 800-53|AC-2(1), 800-53|AU-11, 800-53|SI-12, CSCv7|16.7

Plugin: microsoft_azure

Control ID: 9c1e322f710aa8c4b0c6fcef83b229db2ad95ac3b58daa3ca46cb4554bde5fc8