SNS topic is not encrypted with a customer managed key Affecting SNS service in AWS


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Keys and Secrets/ Encryption at Rest

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CSA-CCMGDPRNIST-800-53SOC-2
  • Snyk IDSNYK-CC-00256
  • creditSnyk Research Team

Description

Scope of use of the encryption key cannot be controlled via KMS/IAM policies.

How to fix?

Ensure that the kms_master_key_id attribute is set a customer managed key id.

Example configuration:

resource "aws_sns_topic" "example" {
 kms_master_key_id = aws_kms_key.sns_topic_key.arn
 # other required attributes
}

resource "aws_kms_key" "sns_topic_key" {
 description = "key for SNS topics"
}