rules/findings/Azure/KeyVault/CIS3.0/azure-expiration-date-for-all-keys-in-non-rbac-keyvault-disabled.json
{
"args": [ ], "provider": "Azure", "serviceType": "Azure KeyVault", "serviceName": "Storage", "displayName": "Ensure that the Expiration Date is set for all Keys in Non-RBAC Key Vaults", "description": "Ensure that all Keys in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.", "rationale": "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.", "impact": "Keys cannot be used beyond their assigned expiration dates respectively. Keys need to be rotated periodically wherever they are used.", "remediation": { "text": "###### From Azure Portal\r\n\t\t\t\t\t1. Go to `Key vaults`\r\n\t\t\t\t\t2. For each Key vault, click on `Keys`.\r\n\t\t\t\t\t3. Under the `Settings` section, Make sure `Enabled?` is set to Yes\r\n\t\t\t\t\t4. Set an appropriate **expiration date** on all keys.", "code": { "powerShell": null, "iac": null, "terraform": null, "other": null } }, "recommendation": null, "references": [ "https://docs.microsoft.com/en-us/azure/key-vault/about-keys-secrets-and-certificates" ], "compliance": [ { "name": "CIS Microsoft Azure Foundations", "version": "3.0.0", "reference": "3.3.2", "profile":"Level 1" } ], "level": "medium", "tags": [ ], "rule": { "path": "az_keyvault", "subPath": null, "selectCondition": { }, "query": [ { "filter": [ { "conditions": [ [ "enableRbacAuthorization", "eq", "false" ], [ "objects.keys.attributes.exp", "ne" ] ], "operator": "and" } ] } ], "shouldExist": null, "returnObject": null, "removeIfNotExists": null }, "output": { "html": { "data": { "properties": { "name": "Key Vault Name", "location": "Location", "enableRbacAuthorization": "RBAC Enabled" }, "expandObject": null }, "table": "Normal", "decorate": [ ], "emphasis": [ ], "actions": { "objectData": { "properties": [ ], "expandObject": null, "limit": null }, "showGoToButton": "true", "showModalButton": "true", "directLink": null } }, "text": { "data": { "properties": { }, "expandObject": null }, "status": { "keyName": [ ], "message": "", "defaultMessage": null }, "properties": { "resourceName": null, "resourceId": null, "resourceType": null }, "onlyStatus": false } }, "idSuffix": "azure_non_rbac_key_vault_keys_notexpire", "notes": [ ], "categories": [ ] } |