Key Rotation Policy
Policy for encryption key rotation.
Key rotation helps limit the exposure window if a key is compromised and is required by many compliance frameworks (SOC 2, FedRAMP, etc.).
Properties
When true, the SDK will automatically rotate keys when they exceed maxKeyAgeDays. When false, rotation is manual via VersionedCryptoProvider.rotateKey.
Maximum age of a key before rotation is recommended. After this period, VersionedCryptoProvider.shouldRotate returns true. Set to 0 to disable age-based rotation checks.
Maximum number of key versions to retain. Oldest versions beyond this limit are deleted. Set to 0 for unlimited.
Number of days to retain old key versions for backward-compatible decryption. After this period, old keys may be deleted and data encrypted with them becomes unreadable.