---
title: KMS encryption keys should be rotated every 90 days or less
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > KMS encryption keys should be rotated
  every 90 days or less
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# KMS encryption keys should be rotated every 90 days or less
 
## Description{% #description %}

This rule fails when a symmetric Cloud KMS encryption key (purpose `ENCRYPT_DECRYPT`) does not have an automatic rotation period of 90 days or less, or when its next scheduled rotation is more than 90 days away. Regular rotation limits the amount of data protected by a single key version and reduces the impact of a compromised version. Keys with any other purpose, such as asymmetric signing, asymmetric decryption, MAC, or raw encryption keys, are skipped because Cloud KMS does not support automatic rotation for them. Keys whose primary version is not enabled, for example because it is disabled or destroyed, are also skipped. A symmetric key with no primary version, such as an imported key whose version has not been set as primary, fails until it has an enabled primary version and a compliant rotation schedule.

## Remediation{% #remediation %}

1. Set a rotation period of 90 days or less and a next rotation time for each symmetric key by following [Rotate a key](https://docs.cloud.google.com/kms/docs/rotate-key).
1. Re-encrypt data that must be protected by the newest key version, because rotation does not re-encrypt existing data. See [Re-encrypting data](https://docs.cloud.google.com/kms/docs/re-encrypt-data).

## References{% #references %}

- [Key rotation](https://docs.cloud.google.com/kms/docs/key-rotation)
- [CIS Google Cloud Platform Foundation Benchmark](https://www.cisecurity.org/benchmark/google_cloud_computing_platform)
