Queues should be encrypted to protect queue contents.
The SQS queue messages could be read if compromised
Follow the appropriate remediation steps below to resolve the issue.
Turn on SQS Queue encryption
---AWSTemplateFormatVersion:"2010-09-09"Description:A sample templateAWSTemplateFormatVersion:2010-09-09Description:Good example of queueResources:Queue:Type:AWS::SQS::QueueProperties:KmsMasterKeyId:some-keyQueueName:my-queue
Log into the AWS Management Console.
Select the “Services” option and search for SQS.
Select the “SQS” queue that needs to be verify from “Name”.
Scroll down the page and click on the “Encryption” tab from the bottom panel.
Check the “Server Side Encryption” status for the selected “SQS” queue. If the “Server Side Encryption” is not configured then the following message is being displayed “Server-side encryption (SSE) is disabled. SSE lets you protect the contents of messages in Amazon SQS queues using keys managed in the AWS Key Management Service (AWS KMS)”.
Repeat steps number 2 - 5 to verify other “SQS” queue in the selected AWS region.
To enable the “SQS” encryption navigate to KMS services to create a “KMS CMK customer-managed key”.
Scroll down the left navigation panel and choose “Customer managed keys” under “Key Management Service” and click on the “Create key” button at the top panel.
On the “Add alias and description” page provide the “Alias” and “Description” for the new “KMS key” and click on the “Next” button.
On the “Add tags” page provide a unique key for “Tag key”, “Tag value” and click on the “Next” button.
On the “Define key administrative permissions” page select the “IAM users” and roles who can administer the new “KMS key” through the KMS API.
Click on the “Next” button at the bottom to continue the new “KMS key” process.
On the “Define key usage permissions” page select the IAM users and roles that can use the CMK to encrypt and decrypt SQS data with the “AWS KMS API” and click on the “Next” button.
On the “Review and edit key policy” page review the policy and click on the “Finish” button to create a new “KMS key” which can be used to encrypt/decrypt the SQS data.
Now “KMS CMK customer-managed key” is created navigate to SQS and select the “SQS” queue which needs to be modified.
Click on the “Queue Actions” button at the top and select the “Configure Queue” option.
On the “Configure Test” tab scroll down and under the “Server-Side Encryption (SSE) Settings” click on the checkbox next to “Use SSE” and select the “AWS KMS Customer Master Key (CMK)” from the dropdown menu and click on the “Save Changes” button to make the necessary changes.
Repeat steps number 8 - 17 to enable encryption using KMS for all SQS queues.
Aqua Security is the largest pure-play cloud native security company, providing customers the freedom to innovate and run their businesses with minimal friction. The Aqua Cloud Native Security Platform provides prevention, detection, and response automation across the entire application lifecycle to secure the build, secure cloud infrastructure and secure running workloads wherever they are deployed.