Skip to main content

More Info:

This rule checks if Amazon MQ brokers have Amazon CloudWatch audit logging enabled. The rule is NON_COMPLIANT if a broker does not have audit logging enabled.

Risk Level

Low

Address

Monitoring

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • GDPR
  • HIPAA
  • ISO 27001
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration of MQ Brokers having CloudWatch audit logging enabled for AWS Security Groups using the AWS console, follow these steps:
  1. Access AWS Console: Log in to your AWS Management Console using your credentials.
  2. Navigate to Amazon MQ Service: Go to the Amazon MQ service by either searching for it in the AWS services search bar or locating it under the “Messaging & Queueing” section.
  3. Select the MQ Broker: Select the MQ Broker for which you want to remediate the CloudWatch audit logging configuration.
  4. Modify Broker: Click on the “Actions” dropdown menu and select “Modify Broker”.
  5. Update Broker Configuration: In the “Broker Details” section, scroll down to the “Logs” section.
  6. Disable CloudWatch Audit Logging: Locate the “CloudWatch Audit Logging” option and disable it by unchecking the box or selecting “Disabled” from the dropdown menu.
  7. Save Changes: Scroll to the bottom of the page and click on the “Modify” button to save the changes.
  8. Verify Configuration: Once the changes are saved, verify that CloudWatch audit logging is disabled for the MQ Broker by checking the broker’s configuration settings.
By following these steps, you will successfully remediate the misconfiguration of MQ Brokers having CloudWatch audit logging enabled for AWS Security Groups using the AWS console.

To remediate the misconfiguration of MQ Brokers having CloudWatch audit logging enabled for AWS Security Groups using AWS CLI, follow these steps:
  1. Identify the AWS Security Groups associated with the MQ Brokers:
    • Run the following AWS CLI command to list all the AWS Security Groups associated with the MQ Brokers:
    • Note down the Security Group IDs associated with the MQ Brokers.
  2. Disable CloudWatch audit logging for the identified Security Groups:
    • Run the following AWS CLI command for each Security Group ID to disable CloudWatch audit logging:
    Replace <BROKER_ID> with the actual ID of the MQ Broker associated with the Security Group.
  3. Verify the changes:
    • Run the following AWS CLI command to describe the MQ Broker and verify that CloudWatch audit logging is disabled for the Security Group:
    Replace <BROKER_ID> with the actual ID of the MQ Broker associated with the Security Group.
  4. Repeat for other Security Groups:
    • If there are multiple Security Groups associated with the MQ Brokers, repeat steps 2 and 3 for each Security Group.
By following these steps, you can remediate the misconfiguration of MQ Brokers having CloudWatch audit logging enabled for AWS Security Groups using AWS CLI.
To remediate the misconfiguration of MQ Brokers having CloudWatch audit logging enabled for AWS Security Groups using Python, you can follow these steps:
  1. Identify the Security Groups: First, you need to identify the Security Groups associated with your MQ Brokers.
  2. Disable CloudWatch Audit Logging: You can use the AWS SDK for Python (Boto3) to disable CloudWatch audit logging for the identified Security Groups. Here is a sample Python code snippet to achieve this:
  1. Run the Python Script: Save the above Python script in a file (e.g., remediate_security_groups.py) and execute it using Python. Make sure you have the necessary IAM permissions to modify the Security Groups.
By following these steps and executing the Python script, you can remediate the misconfiguration of MQ Brokers having CloudWatch audit logging enabled for AWS Security Groups.
This change enables CloudWatch audit logging on the broker, matching --logs '{"Audit":true}'. It will trigger a rolling update of active/standby brokers (brief outage) but does not force resource replacement; terraform plan should show an in-place update changing logs.audit from false (or null) to true.

Additional Reading: