Configure Alert Logic Cloud Defender AWS cross-account role access
Alert Logic Cloud Defender supports Amazon Web Services (AWS) cross-account roles. The Cloud Defender Deployments page in the Alert Logic console allows you to create deployments for your AWS accounts. On this page, you can edit an AWS deployment name, add and edit AWS credentials to provide us with cross-account access to those accounts, and delete deployments.
Before you begin
Before Alert Logic can manage the protection of your AWS accounts, you must:
- Log into your AWS account to create a cross-account role to allow Alert Logic to access your AWS accounts.
- Log into Cloud Defender to configure credentials for each discovered AWS deployment.
- Determine whether you want to configure cross-account for centralized CloudTrail log collection. For more information about centralized log collection, see Should you centralize CloudTrail log collection?
About AWS cross-account roles
Cross-account roles to allow Alert Logic to access your AWS account. AWS role creation requires that you provide an AWS policy, a document that specifies the permissions assigned to the AWS role you create for Alert Logic to access to your AWS account.
When you create a role to provide Alert Logic cross-account access to your AWS accounts, you provide better protection for those accounts with:
- Improved agent lifecycle management
- Optimized appliance deployments
- Auto detection of new assets and changed configurations
To set up or edit cross-account access, click an AWS deployment tile on the Deployments page, and then provide your AWS role ARN and the External ID.
When you set up your AWS cross-account role for Cloud Defender, you can choose from two levels of permissions:
- Full permission deployment—Allows Alert Logic to make all the necessary changes to your AWS account.
- Minimal permission deployment—Allows you to maintain full control over the changes in your deployment, and requires you to perform any necessary actions manually.
Our full permission policy document does not allow us to:
- Retrieve secret keys or credentials from IAM
- Retrieve data from data stores other than S3
- Perform these actions from any other AWS account
- Grant access to the protected account to any other AWS account or user
- Modify IAM credentials or policies.
Should you centralize CloudTrail log collection?
AWS allows you to use a separate, dedicated account with CloudTrail enabled to centralize your CloudTrail collection. Regardless of the level of permissions you choose to configure in the Alert Logic console, you can choose to centralize log collection, which requires a second IAM role to allow Alert Logic to access the AWS receiving account that collects CloudTrail data.
If you provide cross-account access to the AWS receiving account for centralized log collection, you get near real-time updates about your assets. Without this cross-account access, Cloud Defender refreshes information about your assets only every 12 hours.
Full permission deployment
Alert Logic recommends full permission deployment, which requires the use of the recommended policy available within the Alert Logic console. This set of permissions allows Cloud Defender to discover your AWS environment and automate the setup of the required AWS services.
To use full permission deployment, you must grant Alert Logic permissions to make changes to your environment (enable/modify AWS CloudTrail settings, create an Amazon SQS queue and an Amazon SNS topic, modify permissions).
Full permission deployment allows you to set up CloudTrail in either the AWS account you want protected by Cloud Defender, or in a separate account in which CloudTrail is configured for centralized log collection.
To configure full permission deployment, you must log into your AWS account and create a policy and IAM role, and then log into Cloud Defender and provide your role information. AWS role creation requires that you provide an AWS policy, a document that specifies the permissions assigned to the AWS role you create for Alert Logic to access to your AWS account.
Use a CloudFormation template to create an IAM policy and role for full permission deployment
Alert Logic recommends you use our CloudFormation template for quick, convenient IAM policy and role creation.
To use the CloudFormation template to create a deployment:
- Log into the AWS Console.
- Log into the Alert Logic console.
- From the Deployments page, click the icon.
- Select Amazon Web Services.
- Type a name for your deployment, and then click SAVE AND CONTINUE.
- Under Cloud Defender, click SELECT, and then click CONTINUE.
- Click CLOUDFORMATION SETUP to use the Alert Logic CloudFormation template to create the AWS role needed for deployment creation.
- Follow the on-screen procedure to access the AWS CloudFormation Create Stack page and generate the role ARN you need to create your deployment.
- When prompted, paste the role ARN you copied from the AWS CloudFormation Create Stack page.
- Click CONTINUE.
Manually create an IAM policy and role for full permission deployment
Before you begin, download and open this recommended policy document (JSON file) for full permission deployment. Keep the document open so you can copy and paste the information during IAM role creation.
To create a cross-account access role:
- In the AWS Console, click IAM, located under Security, Identity & Compliance.
- From the IAM Management Console, click Policies, and then click Create Policy.
- Click the JSON tab.
- Copy and paste the contents of your policy document into the JSON window.
- Click Review policy.
- On the Review Policy page, type a Policy Name and Description for the policy.
- Click Create policy.
- From the IAM Management Console, click Roles, and then click Create role.
- On the Create role page, click Another AWS account.
- Enter the following information for Alert Logic:
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- If you are using the US data center: 733251395267
- If you are using the EU data center: 857795874556
- Select Require external ID.
- External ID—Use your Alert Logic Customer ID. To find your Customer ID, in the Alert Logic console, click Settings () > Support Information.
- Require MFA—make sure the option is not selected.
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- Click Next: Permissions.
- Select the policy you created above, and then click Next: Review.
- Type a Role Name and Role description, and then click Create Role.
- In the list of IAM roles, click the name of the role you created, and then note the Role ARN value, which you will need when you create the AWS credentials in the Cloud Defender console.
Configure full permission deployment in Cloud Defender
To complete configuration of a full permission deployment, you must log into Cloud Defender, and then enter the AWS role information created above.
To configure this deployment in Cloud Defender:
- Navigate to the Deployments page.
- Click the tile for the AWS deployment you want to configure.
- Enter the Role ARN and External ID you created above.
- Click Create.
To configure full permission deployment with centralized log collection, you must log into your AWS account and create a policy and IAM role for the account you want to protect and for the account you want to use for centralized log collection. Then you must log into Cloud Defender and provide the role information for both accounts.
- Protected account—The account protected by Cloud Defender.
- Receiving account—The account that owns the S3 bucket where CloudTrail is configured to store its log files.
The policy document for the protected account grants only the permissions required to monitor your environments. The policy document for the receiving account grants only read-only access.
- Download and open this policy document for the protected account. Keep the document open so you can copy and paste the information during IAM role creation.
- Download and open this policy document for the receiving account. Keep the document open so you can copy and paste the information during IAM role creation for centralized log collection.
To create a cross-account access role:
- In the AWS Console, click IAM, located under Security, Identity & Compliance.
- From the IAM Management Console, click Policies, and then click Create Policy.
- Click the JSON tab.
- Copy and paste the contents of your policy document into the JSON window.
- Click Review policy.
- On the Review Policy page, type a Policy Name and Description for the policy.
- Click Create policy.
- From the IAM Management Console, click Roles, and then click Create role.
- On the Create role page, click Another AWS account.
- Enter the following information for Alert Logic:
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- If you are using the US data center: 733251395267
- If you are using the EU data center: 857795874556
- Select Require external ID.
- External ID—Use your Alert Logic Customer ID. To find your Customer ID, in the Alert Logic console, click Settings () > Support Information.
- Require MFA—make sure the option is not selected.
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- Click Next: Permissions.
- Select the policy you created above, and then click Next: Review.
- Type a Role Name and Role description, and then click Create Role.
- In the list of IAM roles, click the name of the role you created, and then note the Role ARN value, which you will need when you create the AWS credentials in the Cloud Defender console.
Configure full permission deployment with centralized log collection in Cloud Defender
To complete configuration of a full permission deployment with centralized log collection, you must log into Cloud Defender, and then enter the AWS role information created above.
To configure this deployment in Cloud Defender:
- Navigate to the Deployments page.
- Click the tile for the AWS deployment you want to configure.
- Enter the Role ARN and External ID for the protected account.
- Select I want this environment to use cross-account CloudTrail to centralize CloudTrail log collection.
- Enter the Role ARN and External ID for the receiving account.
- Click Create.
Minimal permission deployment
Minimal permission deployment employs the most limited privileges that still allow Cloud Defender to work properly in AWS. Minimal permission deployment requires that you perform additional manual steps, such as the setup of AWS CloudTrail and Amazon S3 log file collection.
Minimal permission deployment allows you to set up CloudTrail in either the AWS account you want protected by Cloud Defender, or in a separate account with an S3 bucket to which CloudTrail is configured for centralized log collection.
To perform minimal permission cross-account role configuration, you must log into your AWS account and create an IAM role. AWS role creation requires that you provide an AWS policy, a document that specifies the permissions assigned to the AWS role you create for Alert Logic to access to your AWS account. The policy document grants only the permissions required to monitor your environments.
To deploy minimal permissions for your Cloud Defender AWS implementation:
- Set up AWS CloudTrail. Choose to:
- Create an IAM policy and role for minimal permission deployment.
- Configure Amazon S3 bucket policies for log collection
Set up AWS CloudTrail
For minimal permission deployment to work properly, you must set up your AWS CloudTrail manually. The process to set up AWS CloudTrail depends on whether you need to create a SNS topic, or edit an existing SNS topic for CloudTrail.
If AWS CloudTrail is not yet enabled for your account, you must create a new trail, with an S3 bucket and SNS topic, and configure it for use with Cloud Defender.
To set up CloudTrail with a new SNS topic:
- Log into the AWS protected account.
- Click CloudTrail >Trails.
- Click Create trail.
- In Trail name, type a name for your trail.
- For Apply trail to all regions, click Yes.
- For Create a new S3 bucket, select Yes .
- In S3 bucket, type the name of the S3 bucket in which to store your CloudTrail logs in your account.
- Click Advanced.
- For Send SNS notification for every log file delivery, select Yes.
- For Create a new SNS topic, select Yes.
- Click Save.
- Click Create.
If you already enabled AWS CloudTrail for your account, Cloud Defender uses the existing trail with the "multi-region" flag enabled. If you set up more than one trail with this flag enabled, Cloud Defender selects the trail that appears first in alphabetical order. The existing trail you use must be configured with SNS delivery enabled, as described in the steps below.
To configure an existing SNS Topic:
- From the AWS CloudTrail console, click Trails and then select your existing trail.
- Ensure that Apply trail to all regions is set to Yes; if not, click the pencil icon (), and then change the value to Yes.
- In the S3 section, ensure that Publish to SNS is set to Yes, and that a valid SNS topic is set. If your current configuration is not set up to publish to SNS, then click the pencil icon () to change the settings and create a new SNS topic to receive notifications. Note the ARN of the SNS topic; you will need it when defining the IAM policy.
Create an IAM policy and role for minimal permission deployment
To create a cross-account access role:
- In the AWS Console, click IAM, located under Security, Identity & Compliance.
- From the IAM Management Console, click Policies, and then click Create Policy.
- Click the JSON tab.
- Copy and paste the contents of your policy document into the JSON window.
- Click Review policy.
- On the Review Policy page, type a Policy Name and Description for the policy.
- Click Create policy.
- From the IAM Management Console, click Roles, and then click Create role.
- On the Create role page, click Another AWS account.
- Enter the following information for Alert Logic:
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- If you are using the US data center: 733251395267
- If you are using the EU data center: 857795874556
- Select Require external ID.
- External ID—Use your Alert Logic Customer ID. To find your Customer ID, in the Alert Logic console, click Settings () > Support Information.
- Require MFA—make sure the option is not selected.
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- Click Next: Permissions.
- Select the policy you created above, and then click Next: Review.
- Type a Role Name and Role description, and then click Create Role.
- In the list of IAM roles, click the name of the role you created, and then note the Role ARN value, which you will need when you create the AWS credentials in the Cloud Defender console.
Configure Amazon S3 bucket policies for log collection
For Cloud Defender to collect CloudTrail and other logs from your S3 buckets, you must allow permission for the IAM role you created above to access the ListObjects and GetObject APIs for the bucket and prefix where you store the logs.
The process to configure the S3 bucket policy depends on your current configuration. Use one of the following procedures:
You must create an S3 bucket policy if your CloudTrail does not have that policy set up.
To create an Amazon S3 bucket policy:
- From the IAM Console click Roles, select the role you created above, and then note the IAM Role ARN value to ensure that the correct policy is applied to your bucket.
- From the Amazon S3 console, find the bucket that stores the logs to be collected.
If the logs are stored under one or more prefixes (which appear as folders in the console), note the prefix but stop at the top-level bucket, because bucket policies can only be edited from this level.
- Click Properties, and then expand the Permissions section and click Add Bucket Policy.
- Define the policy as follows:
- Download and open this policy document and paste the contents into the bucket policy window.
- Where indicated, replace BUCKET_NAME/PREFIX with the name of your bucket.
- Where indicated, replace YOUR_IAM_ROLE_ARN with the IAM role you created above.
- Click Save.
If the Amazon S3 bucket where you store logs has an existing bucket policy, you must make the following changes to your policy to allow the IAM role created for Cloud Defender to collect logs.
To update an existing Amazon S3 bucket policy:
-
From the Amazon S3 console, find the bucket that stores collected logs.
If the logs are stored under one or more prefixes (which appear as folders in the console), note the prefix but stop at the top-level bucket, because bucket policies can only be edited from this level.
- Click Properties, expand the Permissions section, and then click Edit Bucket Policy.
- Make the following changes to your policy:
- Download the bucket policy block (.txt) and copy the contents.
- After the last permissions statement in the bucket policy window, paste the bucket policy block contents.
- Where indicated, replace BUCKET_NAME/PREFIX with the name of your bucket.
- Where indicated, replace YOUR_IAM_ROLE_ARN with the account number of the protected account.
- Click Save.
Configure minimal permission deployment in Cloud Defender
To complete configuration of a minimal permission deployment, you must log into Cloud Defender, and then enter the AWS role information created above.
To configure this deployment in Cloud Defender:
- Navigate to the Deployments page.
- Click the tile for the AWS deployment you want to configure.
- Enter the Role ARN and External ID you created above.
- Click Create.
Minimal permission deployment with centralized log collection requires you to log into the AWS console to set up and configure both S3 and SNS in the receiving account (the AWS account in which you want to centralize log collection), and then log into the protected account (the AWS account you want to protect) to set up CloudTrail and an IAM role.
To deploy minimal permission deployment with centralized log collection:
- In the receiving account:
- Configure Amazon S3 bucket policies for log collection. Choose to:
- Enable a new S3 bucket policy in the receiving account, or
- Edit an existing S3 bucket policy in the receiving account.
- Configure SNS topic for the receiving account. Choose to:
- Create a minimal permissions IAM policy and role for the receiving account
- In the protected account:
- In Cloud Defender:
Configure minimal permission deployment with centralized log collection in Cloud Defender
Configure Amazon S3 bucket policies for log collection
For Cloud Defender to collect CloudTrail and other logs from your S3 buckets, you must allow permission for the IAM role you create to access the ListObjects and GetObject APIs for the bucket and prefix where you store the logs.
The process to configure the S3 bucket policy depends on your current configuration. Use one of the following procedures:
If S3 is not enabled for the receiving account, you must enable it, and then configure it for use with Cloud Defender.
To create an Amazon S3 bucket policy:
- Log into the receiving account.
- From the AWS console, click S3, and then click Create bucket.
- Complete the appropriate fields in the Create bucket window.
- Click Next , to accept the default settings for properties and permissions.
- Click Create.
- From the AWS S3 console, select the bucket you just created.
- Click the Permissions tab, and then click Bucket Policy.
- Create the bucket policy as follows:
- Download the bucket policy (.txt) and paste the contents into the bucket policy window.
- Where indicated, replace ReceivingAccountBucketName with the name of your bucket.
- Where indicated, replace ProtectedAccountID with the account number of the protected account.
- Download the bucket policy (.txt) and paste the contents into the bucket policy window.
- Click Save.
If you enabled S3 for the receiving account, you must configure S3 for use with Cloud Defender.
- Log into the receiving account.
- From the IAM Console, click S3, and find the bucket that stores collected logs.
- Click Properties, expand the Permissions section, and then click Edit Bucket Policy.
- Perform the following actions:
- Download the bucket policy block (.txt) and copy the contents.
- After the last permissions statement in the bucket policy window, paste the bucket policy block contents.
- Where indicated, replace ReceivingAccountBucketName with the name of your bucket.
- Where indicated, replace ProtectedAccountID with the account number of the protected account.
- Click Save.
Configure SNS topic for the receiving account
For minimal permission deployment to work properly, you must set up your AWS CloudTrail manually in the receiving account. The process to set up AWS CloudTrail depends on whether you need to create a SNS topic, or edit an existing SNS topic for CloudTrail.
You must create an Simple Notification Service (SNS) topic in the receiving account and configure it for use with Cloud Defender.
To create an SNS topic:
- Log into the receiving account.
- From the AWS console, click Simple Notification Service.
- From the SNS dashboard, click Create topic, and then provide a topic name.
- Click Create topic.
- On the Topics page, make note of the ARN for the new SNS topic.
- Select Other topic actions > Edit topic policy.
- Click Advanced view.
- Make the following changes to your topic policy:
- After the last permissions statement, add a comma (,).
- Download the SNS topic policy text block (.txt) and paste it into the policy after the comma.
- Replace SNS_TOPIC_ARN with the Topic ARN.
- Click Update policy.
If you have an existing Simple Notification Service (SNS) topic enabled in the receiving account, you must edit the existing topic policy.
To edit an existing SNS topic:
- Log into the receiving account.
- From the AWS console, click Simple Notification Service.
- From the SNS dashboard, click Topics, and select the topic you want to edit.
- Select Other topic actions > Edit topic policy.
- Click Advanced view.
- Make the following changes to your topic policy:
- After the last permissions statement, add a comma (,).
- Download the SNS topic policy text block (.txt) and paste it into the policy after the comma.
- Replace SNS_TOPIC_ARN with the Topic ARN.
- Click Update policy.
Create a minimal permissions IAM policy and role for the receiving account
To perform cross-account role configuration with centralized log collection, you must log into your AWS account and create an IAM role for the account you want to use for centralized log collection.
AWS role creation requires that you provide an AWS policy, a document that specifies the permissions assigned to the AWS role you create for Alert Logic to access to your AWS account. The policy document for the receiving account grants only read-only access.
Download and open this policy document for the receiving account. Keep the document open so you can copy and paste the information during IAM role creation for centralized log collection.
To create a cross-account access role:
- In the AWS Console, click IAM, located under Security, Identity & Compliance.
- From the IAM Management Console, click Policies, and then click Create Policy.
- Click the JSON tab.
- Copy and paste the contents of your policy document into the JSON window.
- Click Review policy.
- On the Review Policy page, type a Policy Name and Description for the policy.
- Click Create policy.
- From the IAM Management Console, click Roles, and then click Create role.
- On the Create role page, click Another AWS account.
- Enter the following information for Alert Logic:
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- If you are using the US data center: 733251395267
- If you are using the EU data center: 857795874556
- Select Require external ID.
- External ID—Use your Alert Logic Customer ID. To find your Customer ID, in the Alert Logic console, click Settings () > Support Information.
- Require MFA—make sure the option is not selected.
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- Click Next: Permissions.
- Select the policy you created above, and then click Next: Review.
- Type a Role Name and Role description, and then click Create Role.
- In the list of IAM roles, click the name of the role you created, and then note the Role ARN value, which you will need when you create the AWS credentials in the Cloud Defender console.
Set up CloudTrail in the protected account
- Log into the AWS protected account.
- Click CloudTrail >Trails.
- Click Create trail.
- In Trail name, type a name for your trail.
- For Apply trail to all regions, click Yes.
- For Create a new S3 bucket, select No .
- In S3 bucket, type the name of the S3 bucket you created in the receiving account to store your CloudTrail logs.
- Click Advanced.
- For Send SNS notification for every log file delivery, select Yes.
- For Create a new SNS topic, select No, and then enter the topic ARN for the SNS topic you created in the receiving account.
- Click Save.
- Click Create.
Create a minimal permission IAM policy and role for the protected account
To perform cross-account role configuration with centralized log collection, you must log into your AWS account and create an IAM role for the account you want to protect. The policy document for the protected account grants only the permissions required to monitor your environments.
Download and open this policy document for the protected account. Keep the document open so you can copy and paste the information during IAM role creation for the protected account.
To create a cross-account access role:
- In the AWS Console, click IAM, located under Security, Identity & Compliance.
- From the IAM Management Console, click Policies, and then click Create Policy.
- Click the JSON tab.
- Copy and paste the contents of your policy document into the JSON window.
- Click Review policy.
- On the Review Policy page, type a Policy Name and Description for the policy.
- Click Create policy.
- From the IAM Management Console, click Roles, and then click Create role.
- On the Create role page, click Another AWS account.
- Enter the following information for Alert Logic:
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- If you are using the US data center: 733251395267
- If you are using the EU data center: 857795874556
- Select Require external ID.
- External ID—Use your Alert Logic Customer ID. To find your Customer ID, in the Alert Logic console, click Settings () > Support Information.
- Require MFA—make sure the option is not selected.
- Account ID—Type the AWS account that Alert Logic uses to collect logs:
- Click Next: Permissions.
- Select the policy you created above, and then click Next: Review.
- Type a Role Name and Role description, and then click Create Role.
- In the list of IAM roles, click the name of the role you created, and then note the Role ARN value, which you will need when you create the AWS credentials in the Cloud Defender console.
Configure minimal permission deployment with centralized log collection in Cloud Defender
To complete configuration of a minimal permission deployment with centralized log collection, you must log into Cloud Defender, and then enter the AWS role information created above.
To configure this deployment in Cloud Defender:
- Navigate to the Deployments page.
- Click the tile for the AWS deployment you want to configure.
- Enter the Role ARN and External ID for the protected account.
- Select I want this environment to use cross-account CloudTrail to centralize CloudTrail log collection.
- Enter the Role ARN and External ID for the receiving account.
- Click Create.