Skip to main content

More Info:

Your AWS CloudWatch event bus should not be exposed to everyone.

Risk Level

High

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Well Architected Framework
  • 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
  • HITRUST CSF
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

The following are the steps to remediate the “Event Bus Should Not Be Exposed” misconfiguration on AWS using the AWS console:
  1. Log in to the AWS Management Console.
  2. Navigate to the Amazon EventBridge service.
  3. Click on the “Event buses” option on the left-hand menu.
  4. Select the event bus that is exposed.
  5. Click on the “Permissions” tab.
  6. Click on the “Edit” button to edit the permissions.
  7. Remove any unauthorized principals or accounts from the “Event bus policy” section.
  8. Click on the “Save” button to save the changes.
By following these steps, the event bus will no longer be exposed to unauthorized access and will be remediated.

To remediate the misconfiguration “Event Bus Should Not Be Exposed” for AWS using AWS CLI, you can follow the below steps:
  1. Open your command prompt or terminal and install the AWS CLI if you haven’t already done so.
  2. Run the following command to list all the Amazon EventBridge event buses in your AWS account:
  1. Identify the event bus that is exposed and note down its ARN.
  2. Run the following command to remove the event bus policy that is allowing public access:
Replace <event-bus-name> with the name of the event bus that you want to remediate and <statement-id> with the ID of the statement in the event bus policy that is allowing public access.
  1. After running the above command, you should receive an output similar to the following:
This means that the event bus policy has been successfully updated to remove public access.
  1. Finally, run the following command to verify that the event bus policy has been updated:
Replace <event-bus-name> with the name of the event bus that you remediated. The output should show that the event bus policy no longer allows public access.By following these steps, you can remediate the misconfiguration “Event Bus Should Not Be Exposed” for AWS using AWS CLI.
Remediating the “Event Bus Should Not Be Exposed” misconfiguration in AWS using Python involves the following steps:
  1. Identify the AWS account that has the exposed event bus.
  2. Create an IAM policy that denies access to the event bus.
  3. Attach the IAM policy to the AWS account.
  4. Verify that the event bus is no longer exposed.
Here’s an example Python code that can be used to remediate this misconfiguration:
Note: Replace the region, event_bus_name, and policy variables with the appropriate values for your use case. Also, ensure that you have the necessary permissions to create IAM policies and attach them to the AWS account.
This removes any existing public ("Principal": "*") permissions by replacing the event bus policy with one that only allows explicitly listed principals; this updates the policy in place and does not replace the event bus itself, but it is effectively irreversible in that all removed permissions must be re-added manually if needed.When you run terraform plan, you should see an update to aws_cloudwatch_event_bus_policy.this that removes the statement with a "Principal": "*" (or otherwise-public access) and shows only the restricted principals you configured.

Additional Reading: