Profile Applicability
- Level 2
Description
Amazon EventBridge event buses can be configured to allow cross-account access for event delivery. However, unrestricted or unknown cross-account access can expose your event buses to unauthorized use, leading to potential security risks. Ensuring that only trusted AWS accounts or organizations have access to your event buses helps maintain a secure and controlled environment.
Rationale
Enhanced Security: Prevents unauthorized accounts from sending events to your event buses.
Risk Mitigation: Reduces the risk of malicious activities or data breaches.
Compliance: Aligns with security best practices and regulatory requirements.
Impact
Pros:
Protects event buses from unauthorized access.
Reduces the risk of data misuse or malicious event injection.
Enhances overall security posture.
Cons:
Requires careful management of resource policies for event buses.
May limit collaboration if not properly configured.
Default Value
By default, EventBridge event buses do not allow cross-account access unless explicitly configured.
Pre-Requisite
IAM Permissions Required:
events:DescribeEventBus
events:PutPermission
events:RemovePermission
AWS CLI installed and configured.
Remediation
Test Plan:
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to Amazon EventBridge > Event Buses.
Select an event bus and review its Resource Policy.
Identify any policies that allow access to unknown accounts or * (wildcard).
Using AWS CLI:
Describe the event bus:
aws events describe-event-bus --name <event-bus-name>
Check the Policy field in the output for any wildcard (*) or unknown account permissions.
Implementation Steps:
Using AWS Console:
Navigate to Amazon EventBridge > Event Buses.
Select the event bus to update.
Edit the Resource Policy to remove any wildcard (*) or unknown account permissions.
Save the changes.
Using AWS CLI:
Remove unknown cross-account permissions:
aws events remove-permission --event-bus-name <event-bus-name> --statement-id <statement-id>
Add permissions for trusted accounts or organizations:
aws events put-permission --event-bus-name <event-bus-name> --action "events:PutEvents" --principal <trusted-account-id>
Verify the updated policy:
aws events describe-event-bus --name <event-bus-name>
Backout Plan
Using AWS Console:
If restricting access to unknown cross-account access causes issues, sign in to the AWS Management Console.
Navigate to Amazon EventBridge, select the event bus, and modify the resource policy to re-enable access for any AWS account (although this is not recommended).
Save the changes and verify that the event bus is once again exposed to all AWS accounts.
Using AWS CLI:
To revert the event bus policy to allow unknown cross-account access, use the following command:
aws events put-permission --event-bus-name <EVENT_BUS_NAME> --action "PutEvents" --principal "*" --region <REGION>
Verify that the policy has been reverted:
aws events describe-event-bus --name <EVENT_BUS_NAME> --region <REGION>