Automatically Integrate with AWS using CloudFormation

Follow

 

Introduction

Threat Stack users can automatically set up an AWS integration through the CloudFormation template. When this integration completes, Threat Stack authenticates in AWS using a Threat Stack AWS Profile linked to an AWS IAM role. Threat Stack can then increase visibility into EC2 instances, monitor and create alerts for CloudTrail events, and perform configuration audits for AWS.

Prerequisites

  • Administrator access to your Amazon Web Service (AWS) account
  • Access to the Threat Stack console

Tip

Use side-by-side browser windows – one for AWS and one for Threat Stack – to complete these instructions.

Begin Creation of Threat Stack AWS Profile

The Threat Stack AWS profile includes a unique account ID and external ID. These IDs link the Threat Stack AWS profile to the AWS configuration.

Note

You will complete the Threat Stack AWS Profile after completing the creation of the AWS IAM role.

To begin the creation of a Threat Stack AWS profile:

  1. Log into Threat Stack.
  2. In the left navigation pane, click Settings. The Settings page displays.


    AWSProfileGetToIt.png

  3. Click the Integrations tab. The Integrations page displays.
  4. In the AWS Accounts section, click the + Add AWS Account button. The + Add AWS Account dialog opens.

    Warning

    Do not close this dialog until the AWS integration is complete. The External ID is uniquely generated each time you add an AWS profile and must match the value entered during the AWS integration. If you click the close button, then a confirmation message displays in which you must acknowledge the close.

    AddAWSProfile.png

    Continue to the next section.

Configure AWS Resources

Users use the Threat Stack CloudFormation template to configure AWS resources for use by Threat Stack. The Threat Stack CloudFormation template creates the following:

  • An SNS topic
  • An SQS queue
  • An S3 bucket
  • CloudTrail integration
  • Configuration Audit integration
  • A third-party cross-account with an IAM role. The IAM role will be used to authenticate the Threat Stack AWS profile.

To configure AWS resources:

  1. Log into the AWS console as an administrator.
  2. In this document, click the Launch Stack button.


    LaunchStackButton.png

    The AWS CloudFormation window opens and the Select Template page displays.

    CloudFormSelectTemp.png

  3. On the top bar, from the region drop-down menu, select the appropriate region for deployment. By default, the selected region is N. Virginia.
  4. Verify the Specify an Amazon S3 template URL radio button is selected and the field contains the “https://threatstack-cloudformation.s3.amazonaws.com/threatstack.json” path.

    Warning

    If you do not select the region in which the resources are located, then the integration will not successfully complete.

  5. Click the Next button. The Specify Details page displays.


    CloudFormSpecifyDetails.png

  6. In the Parameters section, fill in the following fields:
    1. What is your provided Threat Stack Account ID? – Copy and paste the Threat Stack account ID from the Threat Stack + Add AWS Account dialog.
    2. What is your provided Threat Stack External ID – Type or copy and paste the Threat Stack external ID from the Threat Stack + Add AWS Account dialog.
    3. What is your desired S3 bucket name? – Type a name for the Threat Stack S3 bucket to monitor. The S3 bucket is where Threat Stack stores AWS events. The name must meet the following criteria:
      1. Unique across all of AWS. For example, if you name the S3 bucket "MyCompanyName," then no one else using AWS can create a "MyCompanyName" S3 bucket.
      2. Between 3 and 63 characters long
      3. Contain only a combination of lowercase letters, numbers, periods, and dashes.
      4. Is not the 101st S3 bucket for the AWS account.

        Note

        AWS accounts only support 100 S3 buckets. Contact AWS to increase the S3 bucket limit for the AWS account.

  7. Click the Next button. The Options page displays.


    CloudFormOptions.png

  8. Do not enter any information. Filling out these fields may interfere with the monitoring and alerting operations of Threat Stack.
  9. Click the Next button. The Review page displays.


    CloudFormReviewInfo.png

  10. Verify the information displayed.
  11. In the Capabilities section, read the notification message and select the I acknowledged that AWS CloudFormation might create IAM resources check box.


    CloudFormAckCheckBox.png

  12. Click the Create button. The IAM role creates. The CloudFormation page displays.

    CloudFormCreate_Complete.png

  13. Click the Refresh button until the Status reads CREATE_COMPLETE.
  14. Click the stack name, then expand Outputs. The Outputs section displays.

    CloudFormComplete.png

    Warning

    Do not close the CloudFormation window or the Outputs section. The displayed information is necessary for the next step in the AWS integration.

    Continue to the next section.

Add AWS Account to Threat Stack

Completing the Threat Stack AWS Profile allows Threat Stack to authenticate in AWS using the IAM role.

  1. Go to the Threat Stack + Add AWS Account dialog from which you copied the account ID and external ID.


    AWSProfileRoleARN.png

  2. In the Role ARN field, copy and paste the Role ARN value from the CloudFormation Outputs section.
  3. In the Description field, type a description of the Threat Stack AWS role. Type a description that identifies how the bucket relates to the AWS account, such as "production."
  4. In the EC2 Agent Correlation section, from the Select Regions drop-down menu, select the region(s) in which your organization has an EC2 presence.


    AWSProfileClickAdd.png

  5. Select the CloudTrail Integration check box. The CloudTrail fields become available.
  6. In the SQS Name (Source) field, copy and paste the SQS Queue value from the CloudFormation Outputs section.
  7. In the S3 Bucket field, copy and paste the S3 Bucket value from the CloudFormation Outputs section.
  8. From the Select Regions drop-down menu, select the region(s) in which you deployed the CloudFormation template (Configure AWS Resources, step 3).

    Warning

    Selecting incorrect regions causes the authentication of Threat Stack in AWS using the IAM role for Cloud Trail to fail. Double-check your region selection.

  9. Select the Configuration Auditing check box. The Configuration Auditing field becomes available.
  10. From the Select Regions drop-down menu, select the region(s) in which your organization has resources.
  11. Verify the information entered and selected on the page is accurate.
  12. Click the Add AWS Account button. The + Add AWS Account dialog closes. The Integrations page displays. A “Profile Added Successfully” message displays and the new AWS profile displays in the AWS Accounts table. A clock icon displays in the Status column, indicating the profile is authenticating with AWS. This process may take several minutes.


    AWSProfileCheckBack.png

    Continue to the next section.

Confirm Successful Threat Stack Integration with AWS

In the Settings > Integrations tab > AWS Accounts table, in the row for the AWS profile, in the Status column, a green checkmark displays. That checkmark confirms that Threat Stack successfully authenticated in AWS using the IAM role created for AWS.

AWSProfileComplete.png

Next Steps

  1. Perform your first Configuration Audit of AWS.
  2. Get Started with CloudTrail Alerting.

    Note

    Threat Stack pulls CloudTrail events every ten minutes and turns the events into Threat Stack alerts.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.