12 of 50 in All Controls
aws

Enforce KMS Key Policies for Central Landing Zone Accounts

IDAWS-DATA-006
Severity
high
Automation
Auto
Category
data-protection
Enforcementmandatory
Complexity / Impact
medium(low impact)
Risk Profile
low likelihood(low residual)
Cloud Scopeaws:account
Environments
production
Target Resources
KMS
Services
kmsiamcloudtrailconfig
Tags
kmsencryptionkey-managementkey-policyseparation-of-dutiesdata-protectionlanding-zonecore-accounts
Frameworks
NIST 800-53CIS AWSISO 27001PCI DSSHIPAASOC 2
Governance
Cloud Security (annually)
Created
2026-05-03
Last Updated
2026-06-04

Specification & Description

Enforce hardened KMS key policies in the Log Archive and Audit accounts to enforce separation of duties, restrict key usage to authorized AWS services via condition keys, and prevent privilege escalation through key policy overwrites or unrestricted grant creation.

Technical Specifications

Customer Managed Keys (CMKs) in the Log Archive and Audit accounts encrypt the most sensitive data in the landing zone: CloudTrail logs, Config history, Security Hub findings, and AWS Backup recovery points. A weak key policy undermines all other controls; three failure modes are most common:

  • Violation of Separation of Duties: Key administrators are granted kms:Decrypt or kms:Encrypt.
  • Policy Overwrite Risk: kms:PutKeyPolicy is left unrestricted, allowing admins to grant themselves decryption rights.
  • Unconstrained Grants: kms:CreateGrant is not restricted by kms:GrantIsForAWSResource, allowing arbitrary access for third-party principals.

This control defines the minimum key policy structure, mandates annual rotation, and uses kms:ViaService to restrict decryption to authorized service endpoints.

Security Rationale

KMS key policies are the last line of defense for encrypted data. IAM policies cannot grant access to a KMS key that the key policy does not allow - but the inverse is not true. A permissive key policy can grant access regardless of IAM boundaries. In the Log Archive and Audit accounts, where keys protect immutable audit records and security findings, a misconfigured key policy can silently nullify the confidentiality guarantees of every upstream encryption control in the landing zone.

Business & Security Impact

A misconfigured key policy in the Log Archive or Audit account can allow unauthorized decryption of CloudTrail logs, Config snapshots, or backup recovery points. This enables an attacker to read evidence of their own activity and to exfiltrate sensitive organizational data while remaining invisible to the audit trail. It also breaks the integrity guarantee of the landing zone's centralized logging architecture.

Policy Exceptions (2)

AWS-managed keys (KeyManager: AWS) are excluded from this control. Their key policies are managed by AWS and cannot be modified. Separation of duties and rotation are enforced by AWS automatically.

Asymmetric CMKs used for digital signing (e.g. for artifact verification) are exempt from the automatic rotation requirement - AWS KMS does not support rotation for asymmetric keys. Rotation for these keys must be handled by creating a new key version and updating all consumers manually on a documented schedule.

Operational & Implementation Notes

The root account statement (AllowRootAccountFullControl) is mandatory in every KMS key policy - omitting it produces a key that can only be managed via the key policy itself, and a policy mistake can lock the key permanently. The kms:ViaService condition value format is exactly service.region.amazonaws.com for most services; CloudTrail is a global service and uses cloudtrail.amazonaws.com without a region segment.

Compliance Framework Mappings (6)

Regulatory baselines and industry standards mapped to this control specification.

Beta
Framework / StandardMapped Requirements & ControlsControls
NIST 800-53 Rev 5NIST 800-53
SC-12SC-28AC-3
3
CIS AWS Foundations Benchmark v3.0CIS AWS
3.7
1
ISO 27001:2022ISO 27001
A.8.24
1
PCI DSS v4.0PCI DSS
3.7.1
1
HIPAA Security RuleHIPAA
164.312(a)(2)(iv)
1
SOC 2SOC 2
CC6.1
1

* Compliance framework mappings are provided for informational architectural reference. Always verify control alignment against your organization's formal audit requirements.

Automated Detection & Rule Logic

Detection Engine: aws-api • Automated: Yes

Audit CMK rotation status, policy content for missing 'Deny' statements, and CloudTrail for unexpected Decrypt calls.

Audit Compliancebash
# Check Rotation
aws kms get-key-rotation-status --key-id <ID>

# Check Policy for Deny
aws kms get-key-policy --key-id <ID> --policy-name default

# Monitor Decrypt Events (Last 24h)
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=Decrypt

# Track structural volume changes for both reads and writes over the last 24h
for event in Encrypt Decrypt GenerateDataKey; do
  count=$(aws cloudtrail lookup-events \
    --lookup-attributes AttributeKey=EventName,AttributeValue=$event \
    --query "Events[*].CloudTrailEvent" --output text | wc -l)
  echo "Event $event Total Executions: $count"
done

Remediation Guide & Automation

Apply hardened key policies, enable annual rotation, and restrict decryption to authorized service endpoints.

Step-by-Step Instructions

  1. Apply the hardened policy to all CMKs in Log Archive and Audit accounts.
  2. Enable automatic key rotation for all symmetric CMKs.
  3. Audit and revoke unconstrained grants using kms:GrantIsForAWSResource.
Hardening & Rotationbash
# 1. Apply Policy
aws kms put-key-policy --key-id <ID> --policy-name default --policy file://policy.json

# 2. Enable Rotation
aws kms enable-key-rotation --key-id <ID>

# 3. Revoke Grants
aws kms list-grants --key-id <ID>
aws kms revoke-grant --key-id <ID> --grant-id <GRANT_ID>
Secure CMKhcl
variable "account" {
  type        = string
  description = "The target 12-digit AWS Account ID."
}

variable "region" {
  type        = string
  description = "The deployment AWS Region (e.g., eu-central-1)."
}

resource "aws_kms_key" "central" {
  description             = "Secure CMK for Central Accounts"
  enable_key_rotation     = true
  deletion_window_in_days = 30 # Guardrail to prevent accidental instant key deletions

  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [
      # 1. Provide root account full control (Standard AWS requirement)
      {
        Sid      = "AllowRoot"
        Effect   = "Allow"
        Principal = { AWS = "arn:aws:iam::${var.account}:root" }
        Action   = "kms:*"
        Resource = "*"
      },
      # 2. GenerateDataKey and unified standard service usage
      {
        Sid      = "AllowViaService"
        Effect   = "Allow"
        Principal = { AWS = "arn:aws:iam::${var.account}:root" }
        Action   = [
          "kms:Encrypt",
          "kms:Decrypt",
          "kms:ReEncrypt*",
          "kms:GenerateDataKey*",
          "kms:DescribeKey"
        ]
        Resource = "*"
        Condition = {
          StringEquals = {
            "kms:ViaService" = [
              "s3.${var.region}.amazonaws.com",
              "cloudtrail.amazonaws.com"
            ]
          }
        }
      }
    ]
  })
}

We value your privacy

We use analytics cookies to understand how visitors interact with our site and to improve the user experience. You can choose to accept or decline these cookies.