Why this matters
SOC 2 expects strong encryption at rest and periodic key rotation to reduce blast radius.
Use envelope encryption (AES-256-GCM) with cloud KMS-managed CMKs for databases, object storage, and backups. Rotate CMKs at least annually and rotate DEKs per object/file.
SOC 2 expects strong encryption at rest and periodic key rotation to reduce blast radius.
Side-by-side examples engineers can pattern-match during review.
# store raw PII
customer.ssn = "123-45-6789"# store ciphertext with envelope encryption
customer.ssn_ct = kms.encrypt(aes_gcm(generate_dek()), ssn)kms.decrypt(ciphertext)db.insert({ ssn: plain_text })From the same buckets as this rule.
Public services must require TLSv1.2 or higher and set HSTS (max-age ≥ 15552000, includeSubDomains). Reject plaintext HTTP and weak ciphers; cookies must be Secure and HttpOnly with SameSite set.