Question

Difficulty: Very hardCentralized Monitoring, Logging, and Auditing Solutions

An enterprise is establishing a centralized compliance logging architecture for its multi-account AWS Organization. A Solutions Architect must configure an organization-wide AWS CloudTrail trail in the management account that consolidates log files into an Amazon S3 bucket located within a dedicated Security account. The security policy mandates that all logs must be encrypted at rest using SSE-KMS with a customer managed key, and access must adhere strictly to the principle of least privilege. Specifically, the configuration must prevent unauthorized access from member accounts while ensuring that CloudTrail can successfully write logs to the bucket. Which combination of configurations must the solutions architect implement to meet these requirements?

  1. A
    Configure S3 bucket default encryption in the Security account using the AWS-managed KMS key (aws/s3aws/s3). Configure the S3 bucket policy in the Security account to allow s3:PutObjects3:PutObject and s3:GetBucketAcls3:GetBucketAcl actions for the CloudTrail service principal (cloudtrail.amazonaws.comcloudtrail.amazonaws.com) with a condition restricting the aws:SourceArnaws:SourceArn to the organization trail ARN.
  2. B
    Configure the S3 bucket policy in the Security account to grant s3:PutObjects3:PutObject permissions to individual IAM roles created in each member account. Configure the Organization Trail to assume these member roles when writing logs to the centralized S3 bucket. Create a customer managed KMS key in the Security account and grant key access to the member account IAM roles.
  3. Configure the S3 bucket policy in the Security account to allow s3:PutObjects3:PutObject and s3:GetBucketAcls3:GetBucketAcl actions for the CloudTrail service principal (cloudtrail.amazonaws.comcloudtrail.amazonaws.com), specifying the Organization Trail ARN in the aws:SourceArnaws:SourceArn condition. Create a customer managed KMS key in the Security account with a key policy that grants kms:GenerateDataKeykms:GenerateDataKey* and kms:Decryptkms:Decrypt to cloudtrail.amazonaws.comcloudtrail.amazonaws.com with a condition restricting the aws:SourceArnaws:SourceArn to the organization trail ARN.Answer
  4. D
    Create a customer managed KMS key in the Security account and assign it to the Organization Trail. Attach a Service Control Policy (SCP) to the Root organizational unit that explicitly allows the CloudTrail service principal (cloudtrail.amazonaws.comcloudtrail.amazonaws.com) to write to the centralized S3 bucket and use the KMS key, relying on the SCP to bypass local S3 bucket policies.

Answer

The configuration using a customer managed KMS key in the Security account with S3 bucket and KMS key policies that grant access to the CloudTrail service principal (cloudtrail.amazonaws.comcloudtrail.amazonaws.com) under the aws:SourceArnaws:SourceArn condition matching the Organization Trail ARN.
The configuration using a customer managed KMS key in the Security account with policies allowing the CloudTrail service principal (cloudtrail.amazonaws.comcloudtrail.amazonaws.com) to perform key operations and bucket writes constrained by the aws:SourceArnaws:SourceArn is correct. It ensures secure log delivery directly by the AWS CloudTrail service, isolates access, protects against the confused deputy vulnerability, and uses a key whose policy can be customized for cross-account service access.

Step-by-Step Solution

1
Select a customer managed KMS key for encryption
Avoids using the AWS-managed KMS key (aws/s3aws/s3) since its key policy cannot be modified to grant cross-account access to CloudTrail.
CloudTrail requires key permissions (kms:GenerateDataKeykms:GenerateDataKey* and kms:Decryptkms:Decrypt) which are only configurable on customer managed KMS keys.
2
Configure the S3 bucket policy in the Security account
Grants s3:PutObjects3:PutObject and s3:GetBucketAcls3:GetBucketAcl permissions to the service principal cloudtrail.amazonaws.comcloudtrail.amazonaws.com.
Allows CloudTrail to write logs directly to the centralized bucket on behalf of the organization's member accounts.
3
Add the aws:SourceArnaws:SourceArn condition to both S3 bucket and KMS key policies
Restricts the permissions to only the Organization Trail ARN from the management account.
Mitigates the confused deputy security risk by preventing other CloudTrail configurations in other accounts from writing to the bucket or using the KMS key.

Key Concept

Centralized Organization Trail log delivery requires explicit permission grants to the CloudTrail service principal (cloudtrail.amazonaws.comcloudtrail.amazonaws.com) on both the destination S3 bucket policy and a customer managed KMS key policy, securely scoped with the aws:SourceArnaws:SourceArn condition.
Rate this question