WAF++ WAF++
Back to WAF++ Homepage

WAF-SEC-030 – Encryption at Rest with CMK

Beschreibung

Alle Datenspeicher (Datenbanken, Objekt-Storage, Block-Volumes, Backups) MÜSSEN mit kundenverwalteten KMS-Schlüsseln (CMK) verschlüsselt sein. RDS-Instanzen MÜSSEN storage_encrypted = true gesetzt haben. KMS-Schlüssel MÜSSEN automatische Rotation (enable_key_rotation = true) aktiviert haben. S3-Buckets MÜSSEN Server-Side-Encryption mit einem CMK konfiguriert haben. AWS-verwaltete Standardschlüssel (aws/s3, aws/rds) sind für produktive Workloads mit sensiblen Daten NICHT ausreichend.

Rationale

Verschlüsselung ruhender Daten verhindert, dass physisch oder logisch abgerufene Rohdaten (aus Backup-Leaks, falsch konfigurierten Snapshots oder Insider-Zugriffen) verwertbar sind. Kundenverwaltete Schlüssel bieten entscheidende Vorteile gegenüber AWS-verwalteten Schlüsseln: vollständige Kontrolle über den Schlüssel-Lifecycle, revozierbare Zugriffsrechte, detailliertes Audit-Logging jedes Schlüsselnutzungsereignisses und die Möglichkeit, Daten durch Schlüssel- löschung unwiderruflich unzugänglich zu machen. Automatische Schlüsselrotation begrenzt das Kryptomaterial-Exposition-Fenster ohne operativen Aufwand.

Bedrohungskontext

Risiko Beschreibung

Datenleck durch Storage-Fehlkonfiguration

Unverschlüsselte Snapshots oder Backups, die versehentlich öffentlich zugänglich sind, liefern Angreifenden direkt verwertbare Klardaten.

Insider-Datenzugriff

Mitarbeitende mit physischem oder logischem Storage-Zugriff (Cloud-Provider-Mitarbeitende, privilegierte Admins) können unverschlüsselte Daten lesen.

Regulatorische Nichteinhaltung

DSGVO Art. 32 und BSI C5 erwarten Verschlüsselung ruhender Daten; fehlende CMK-Nutzung ist ein Audit-Finding.

Verlust von Schlüsselkontrolle

Ohne CMK hat die Organisation keine Möglichkeit, Datenzugriff nach einer Kompromittierung sofort zu sperren.

Anforderung

  • Alle RDS-Instanzen MÜSSEN storage_encrypted = true mit einem CMK gesetzt haben.

  • Alle KMS-Schlüssel MÜSSEN enable_key_rotation = true aktiviert haben.

  • Alle S3-Buckets, die produktive oder sensible Daten enthalten, MÜSSEN Server-Side-Encryption mit CMK konfiguriert haben.

  • EBS-Volumes von Produktions-Instanzen MÜSSEN verschlüsselt sein.

  • Backups und Snapshots MÜSSEN denselben Verschlüsselungsstandard wie die Quelldaten einhalten.

  • KMS-Key-Policies MÜSSEN explizit auf benötigte Principals beschränkt sein – kein Principal: "*".

Implementierungsanleitung

  1. CMK-Strategie definieren: Schlüssel-Hierarchie nach Datenkategorie und Umgebung planen (z. B. getrennte CMKs für Prod-RDS, S3-Sensitivdaten, Secrets Manager).

  2. KMS-Schlüssel in Terraform erstellen: aws_kms_key mit enable_key_rotation = true und restriktiver Key-Policy.

  3. RDS-Verschlüsselung aktivieren: storage_encrypted = true und kms_key_id auf alle aws_db_instance-Ressourcen setzen.

  4. S3-Bucket-Encryption konfigurieren: aws_s3_bucket_server_side_encryption_configuration mit aws:kms und CMK-ARN.

  5. EBS-Default-Encryption aktivieren: Account-Level-EBS-Verschlüsselung via aws_ebs_encryption_by_default einschalten.

  6. KMS-Key-Aliases pflegen: Aussagekräftige Aliases (alias/prod-rds-cmk) für Nachvollziehbarkeit.

  7. CloudTrail-KMS-Audit aktivieren: kms:Decrypt und kms:GenerateDataKey Events in CloudTrail erfassen und auf Anomalien überwachen.

Reifegrad-Abstufung

Level Bezeichnung Kriterien

1

Keine oder inkonsistente Verschlüsselung

Viele Datenspeicher unverschlüsselt; keine einheitliche CMK-Strategie; AWS-Standardschlüssel dort wo vorhanden.

2

AWS-verwaltete Schlüssel flächendeckend

Alle Datenspeicher verschlüsselt; AWS-managed Keys (aws/rds, aws/s3); keine eigene Schlüsselkontrolle.

3

CMK auf allen Produktionsdatenspeichern

CMKs mit automatischer Rotation auf allen Prod-RDS, S3 und EBS; KMS-Key-Policies restriktiv; CloudTrail-Audit aktiv.

4

CMK-Lifecycle-Management operativ

Getrennte CMKs pro Datenkategorie; Key-Policy-Reviews quartalsweise; KMS-Nutzungsanomalien mit Alerting.

5

Vollautomatisierte Schlüsselverwaltung mit Compliance-Durchsetzung

Automatische Erkennung und Remediation nicht-konformer Ressourcen; Data-Sovereignty-Schlüsselstrategie (HSM/CloudHSM für kritische Daten).

Terraform Checks

waf-sec-030.tf.aws.rds-storage-encrypted

Prüft: RDS-Instanzen müssen mit storage_encrypted = true und einem CMK verschlüsselt sein.

Compliant Non-Compliant
resource "aws_kms_key" "rds" {
  description         = "CMK for RDS encryption"
  enable_key_rotation = true
}

resource "aws_db_instance" "app" {
  identifier        = "app-prod-db"
  engine            = "postgres"
  instance_class    = "db.t3.medium"
  allocated_storage = 100
  storage_encrypted = true
  kms_key_id        = aws_kms_key.rds.arn
  username          = "app_user"
  password          = var.db_password
}
resource "aws_db_instance" "app" {
  identifier        = "app-prod-db"
  engine            = "postgres"
  instance_class    = "db.t3.medium"
  allocated_storage = 100
  # storage_encrypted fehlt  – WAF-SEC-030 Violation
  # kms_key_id fehlt         – WAF-SEC-030 Violation
  username          = "app_user"
  password          = var.db_password
}

Remediation: storage_encrypted = true und kms_key_id = aws_kms_key.rds.arn zu allen aws_db_instance-Ressourcen hinzufügen. Verschlüsselung kann nur beim Erstellen der Instanz aktiviert werden; bestehende unverschlüsselte Instanzen müssen als verschlüsselte Snapshots wiederhergestellt werden.


waf-sec-030.tf.aws.kms-key-rotation

Prüft: Alle KMS-Schlüssel müssen automatische Rotation aktiviert haben.

Compliant Non-Compliant
resource "aws_kms_key" "app_data" {
  description             = "CMK for application data"
  enable_key_rotation     = true
  deletion_window_in_days = 30
  tags = {
    owner       = "platform-team"
    environment = "production"
  }
}
resource "aws_kms_key" "app_data" {
  description = "CMK for application data"
  # enable_key_rotation fehlt (default: false)
  # WAF-SEC-030 Violation
}

Remediation: enable_key_rotation = true zu allen aws_kms_key-Ressourcen hinzufügen. AWS rotiert symmetrische CMKs jährlich automatisch ohne Auswirkung auf bestehende verschlüsselte Daten.

Evidenz

Typ Pflicht Beschreibung

IaC

✅ Pflicht

Terraform-Konfiguration aller KMS-Schlüssel mit enable_key_rotation = true sowie aller Datenspeicher mit CMK-Referenz.

Config

✅ Pflicht

AWS Config Rule rds-storage-encrypted und s3-bucket-server-side-encryption-enabled Compliance-Report.

Governance

Optional

CMK-Strategie-Dokument mit Schlüssel-Hierarchie, Rotationsintervallen und Key-Policy-Vorgaben.

Process

Optional

KMS-Key-Policy-Review-Protokolle (quartalsweise) mit Dokumentation ungenutzter Key-Grants.

Regulatorisches Mapping

Framework Controls

ISO 27001:2022

A.5.15 – Threat intelligence; A.5.16 – Threat classification; A.5.24 – Information security incident management; A.5.25 – Assessment and decision on information security events; A.5.26 – Response to information security incidents; A.5.27 – Learning from information security incidents; A.5.28 – Collection of evidence; A.8.16 – Technology use identification and monitoring; A.8.21 – Telecommunications and network security

ISO 27017

CLD.5.1 – Information security in cloud services; CLD.5.2 – Access control in cloud services

ISO 27018

A.2 – Purpose legitimacy and PII protection; A.10 – Confidentiality and security of PII

GDPR

Art. 5(1)(c) – Data minimisation; Art. 5(1)(f) – Integrity and confidentiality; Art. 9 – Special categories of personal data; Art. 25 – Data protection by design and by default; Art. 32 – Security of processing

BSI C5:2020

IDM-01 – Identity and access management policy; IDM-02 – Role management; IDM-03 – User lifecycle management; COM-01 – Network and service security; COM-02 – Cloud monitoring

EUCS (ENISA)

IAM-01 – Identity and access management; IAM-02 – Access rights management; IAM-03 – Privileged access management

NIST SP 800-53

AC-1 – Policy and procedures; AC-2 – Account management; AC-3 – Access enforcement; AC-6 – Least privilege; IA-2 – Identification and authentication; SI-4 – Information system monitoring

FedRAMP

AC-1, AC-2, AC-3, AC-6, IA-2 (Moderate/High baseline)

HIPAA

§ 164.308(a)(4) – Access management; § 164.312(a) – Access control; § 164.312(d) – Information system activity review

PCI DSS v4.0

Req 7 – Restrict access to cardholder data; Req 8 – Identify and authenticate access; Req 8.3 – Non-service accounts

SOC 2 Type II

CC6.1 – Logical access security software; CC6.2 – Logical access security management; CC6.6 – Secure configuration

CSRD

ESRS E1 – Climate change; ESRS G1 – Governance

NIST CSF 2.0

GV.AC – Identity management and access control; DE.CM – Configuration management

CIS Controls v8

CIS 4 – Secure Configuration; CIS 4.4 – Access control; CIS 4.5 – Least privilege

TISAX

Information security – Access rights management

ANSSI SecNumCloud

Domain – Identity and access management; Domain – Security monitoring

BIO

BIO – Identificatie en authenticatie; BIO – Toegangsbeheer

ENS High

org.3 – Políticas de acceso; op.exp.5 – Monitorización de la configuración

UK NCSC CAF

B1 – Access control; B2 – Secure configuration

CMMC 2.0

AC.L2-3.1.1 – Access control policy; AC.L2-3.5.1 – Access enforcement

IRAP

ISM – Identity and access management; ISM – Access control

CCCS PBMM

AC-6 – Least privilege; AC-7 – Unsuccessful logon attempts

MAS TRM

Ch.4 – Identity and access management; Ch.8 – Security monitoring

ISMAP

Access control and identity management

FISC

Operational measures – Access control

Best Practice