EDH - Fully Automatic Setup Option (AWS)
This page includes step-by-step instruction to complete the InsightCloudSec setup for Event-Driven Harvesting (EDH) using a fully automatic approach.
Using this approach means that InsightCloudSec will automatically configure both the AWS IAM and CloudWatch resources.
- You are required to provide the appropriate permissions, and InsightCloudSec creates the IAM Eventbus role/policy.
- InsightCloudSec will also create and update CloudWatch rules during any platform upgrade.
For questions on this specific setup, assistance with this process for AWS GovCloud, or other EDH-related questions, reach out to us through the Customer Support Portal. For details on other EDH setup options, check out the main Event-Driven Harvesting (AWS) page.
New Onboarding
As of InsightCloudSec v. 23.4.11, the new universal onboarding experience for AWS accounts uses CloudFormation Templates (CFTs) to automatically provision relevant accounts with the necessary policies and roles. This means it is easiest to perform EDH configuration while onboarding an account/organization. Review AWS Cloud - Onboarding for more information.
Setup for EDH in AWS
Configure Consumer Account
Consumer accounts are tasked with ingesting events from other accounts and also producing their own events (i.e., consumers are both producers and consumers).
Opt-In Regions
If you are interested in disabling opt-in regions from harvesting, you can include that configuration when you establish the settings within your consumer(s). If you need assistance, contact us through the Customer Support Portal.
Refer to additional documentation on Opt-In Regions here.
- Login to your AWS Console and open the IAM dashboard.
- Open the Policies section and create a new policy using the JSON tab to assign to the existing user/role that InsightCloudSec uses to access the consumer account. You'll need to create the Egress EventBridge Auto Provisioning Policy, which grants the Rapid7 IAM Role permission to create/manage EventBridge Rules/Targets and create/manage an SQS queue from consuming the Events.
- Click the Review Policy option to add the Name, Description, and to review the Summary.
- Locate your Power User. Open the permissions tab to attach the newly created consumer policy to your Power User (e.g.,
DivvyCloud-PowerUser
below).Configuring CloudTrail
If you already have at least one CloudTrail enabled with at least Write events being logged, you do not need to create an additional trail for this and can skip to Step 7.
- With our consumer policies in place, you will need to configure CloudTrail. In the AWS console, open Services > CloudTrail.
- Navigate to Trails > Create Trail and complete the details based on your organization's requirements (e.g., all regions vs. specific, etc.).
- Navigate to CloudWatch > Events > Event Buses. Click the Add permission button and enable Organization access to the default event bus.
- If organization permissions do not already exist, add them using your organization ID.
Configure Producer Account
Login to your AWS Console and open the IAM dashboard.
Open the Policies section and create a new policy using the JSON tab. This new policy will be assigned to the existing user/role that InsightCloudSec uses to access the producer account.
- This policy allows the user to write the appropriate event data.
- In this case, our user is
DivvyCloud-PowerUser
and our policy name isDivvyCloud-EDH-Producer
.
json1{2"Version": "2012-10-17",3"Statement": [4{5"Effect": "Allow",6"Action": [7"events:DeleteRule",8"events:DescribeRule",9"events:PutRule",10"events:PutTargets",11"events:RemoveTargets"12],13"Resource": "arn:aws:events:*:*:rule/divvycloud-events*"14},15{16"Action": [17"organizations:DescribeOrganization"18],19"Effect": "Allow",20"Resource": "*"21}22]23}Create a second policy that will allow the automated creation of roles and permissions and allow the producers to feed our consumer.
- This policy will be named
DivvyCloud-EDH-AutoRole
.
json1{2"Version": "2012-10-17",3"Statement": [4{5"Effect": "Allow",6"Action": [7"iam:CreateRole",8"iam:AttachRolePolicy",9"iam:PassRole"10],11"Resource": "arn:aws:iam::*:role/service-role/event-driven-harvest/divvycloud-eventbus-role"12},13{14"Effect": "Allow",15"Action": [16"iam:CreatePolicy",17"iam:CreatePolicyVersion",18"iam:DeletePolicyVersion"19],20"Resource": "arn:aws:iam::*:policy/service-role/event-driven-harvest/divvycloud-eventbus-policy"21}2223]24}- This policy will be named
InsightCloudSec will automatically create the
divvycloud-eventbus-role
and associated policy.Now that you have created your producer policies, you will need to attach them to your
DivvyCloud-PowerUser
.- Click the Add permissions button and select your previously created policies.
Configuring CloudTrail
If you already have at least one CloudTrail enabled with at least Write events being logged, you do not need to create an additional trail for this and can skip to the next section.
- With your producer policies in place, you can now configure CloudTrail. Navigate to Services > CloudTrail.
- In this example, the trail is named
DivvyCloud-EDH
.
- In this example, the trail is named
- Navigate to Trails > Create Trail and complete the details based on your organization's requirements (e.g., all regions vs. specific, etc.).
Setup EDH in InsightCloudSec
After completing the AWS configuration, you are now ready to complete the configuration of EDH inside of InsightCloudSec.
- Navigate to Cloud > Cloud Accounts and select EDH Consumers.
- Click Add EDH Configuration, then click AWS SQS with Auto Provisioning.
- Complete this form by selecting the Consumer Account (already onboarded in InsightCloudSec) from the drop-down list. You will also need to do the following:
- Optionally, enter any additional regions that you want to exclude from using EDH.
- Optionally, enter the KMS key name.
- Click Configure. The Consumer will remain in a pending state while setup is in progress.
Enabling Producers
Do not add producers until the consumer displays as enabled.
- Click the EDH Producers tab, then click Add Producer.
- Complete the Create Auto-Provisioning Producer form with the details from the AWS setup completed earlier. If you have questions about the policy associated with enabling any options on this form, contact us through the Customer Support Portal.
- You can choose to Automatically update enabled resource types to use all resource types. This will provide event support for all future resource types as they become supported by InsightCloudSec (this is recommended).
- You can also set EDH to Automatically Provision IAM resources and Automatically Provision Cloudwatch resources (these are enabled be default and we recommend leaving this option enabled as part of the fully automatic setup.)
- After adding your producer, it may remain in the pending state for several minutes while setup is in progress (this will not refresh automatically; you will need to manually reload the browser).
Once the configuration is complete, the producer account’s status will be labeled enabled. If you added a heavily-used account as your producer, you should see events within a minute or so. If not, you can create and delete a test user to generate events.