exam questions

Exam AWS Certified Security - Specialty All Questions

View all questions & answers for the AWS Certified Security - Specialty exam

Exam AWS Certified Security - Specialty topic 1 question 242 discussion

Exam question from Amazon's AWS Certified Security - Specialty
Question #: 242
Topic #: 1
[All AWS Certified Security - Specialty Questions]

A company is collecting AWS CloudTrail log data from multiple AWS accounts by managing individual trails in each account and forwarding log data to a centralized Amazon S3 bucket residing in a log archive account. After CloudTrail introduced support for AWS Organizations trails, the company decided to further centralize management and automate deployment of the CloudTrail logging capability across all of its AWS accounts.
The company's security engineer created an AWS Organizations trail in the master account, enabled server-side encryption with AWS KMS managed keys (SSE-
KMS) for the log files, and specified the same bucket as the storage location. However, the engineer noticed that logs recorded by the new trail were not delivered to the bucket.
Which factors could cause this issue? (Choose two.)

  • A. The CMK key policy does not allow CloudTrail to make encrypt and decrypt API calls against the key.
  • B. The CMK key policy does not allow CloudTrail to make GenerateDatakey API calls against the key.
  • C. The IAM role used by the CloudTrail trail does not have permissions to make PutObject API calls against a folder created for the Organizations trail.
  • D. The S3 bucket policy does not allow CloudTrail to make PutObject API calls against a folder created for the Organizations trail.
  • E. The CMK key policy does not allow the IAM role used by the CloudTrail trail to use the key for cryptographical operations.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
[Removed]
Highly Voted 3 years, 8 months ago
Or Sorry, answer is BD -- "Each time CloudTrail puts a log file into your S3 bucket, Amazon S3 sends a GenerateDataKey request to AWS KMS on behalf of CloudTrail. In response to this request, AWS KMS generates a unique data key and then sends Amazon S3 two copies of the data key, one in plaintext and one that is encrypted with the specified CMK."
upvoted 14 times
babaseun
3 years, 7 months ago
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/encrypting-cloudtrail-log-files-with-aws-kms.html
upvoted 1 times
...
EricR17
3 years, 7 months ago
How does B make sense? It's an AWS-managed key that was created for SSE. The policy can't be changed and it's set by default when the key is created.
upvoted 3 times
6_8ftwin
1 year, 11 months ago
B, D The default key policy applies to KMS managed keys: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html. This default policy "gives the AWS account that owns the KMS key permission to use IAM policies to allow access to all AWS KMS operations on the KMS key". The S3 bucket resides in a log archive account; the KMS key account was never specified in the question -- it is likely in the same account and would also be the source of the problem. The AWS Organizations trail is in the master account and would not have access to perform these cryptographic operations, specifically the ability to generate DEKs. So use of the KMS managed key is the problem in this case. A better option would be to use a customer managed key so the key policy may be modified.
upvoted 1 times
...
...
...
Shefali85
Highly Voted 3 years, 7 months ago
why not C and D , It is not customer managed key , this is SSE- KMS which is managed by AWS
upvoted 8 times
boooliyooo
2 years, 4 months ago
The security engineer needs to ensure that the IAM role used by the CloudTrail trail has permissions to make PutObject API calls against the folder created for the Organizations trail. If the IAM role doesn't have the necessary permissions, the logs will not be delivered to the bucket. Similarly, the S3 bucket policy also needs to allow CloudTrail to make PutObject API calls against the folder created for the Organizations trail. If the bucket policy doesn't allow this, the logs will not be delivered to the bucket. Option A, B and E are not applicable as they are related to key encryption and decryption, in this scenario the CloudTrail is already configured to use SSE-KMS.
upvoted 4 times
...
...
Raphaello
Most Recent 1 year, 3 months ago
Selected Answer: AB
In fact all of KMS 3 actions, Encrypt, Decrypt, and GenerateDataKey, are required for CloudTrail to use KMS key. ----- Required KMS key policy elements for trails *Enable CloudTrail log encrypt permissions. See Granting encrypt permissions. *Enable CloudTrail log decrypt permissions. See Granting decrypt permissions. If you are using an existing S3 bucket with an S3 Bucket Key, kms:Decrypt permissions are required to create or update a trail with SSE-KMS encryption enabled. *Enable CloudTrail to describe KMS key properties. See Enable CloudTrail to describe KMS key ----- Reference: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html But again, option D is correct, cause without S3 bucket policy permission to put object that will not work. A question requesting 2 correct answers, and provides 3! Nice!
upvoted 1 times
...
Passexam4sure_com
1 year, 7 months ago
Selected Answer: BD
The CMK key policy does not allow CloudTrail to make GenerateDatakey API calls against the key. The S3 bucket policy does not allow CloudTrail to make PutObject API calls against a folder created for the Organizations trail.
upvoted 1 times
...
pupsik
1 year, 7 months ago
Selected Answer: CE
CloudTrail operations are performed via service linked role, therefore we need to ensure those roles across all accounts have necessary permissions. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-trail-organization.html
upvoted 1 times
...
Joeylee
1 year, 8 months ago
Selected Answer: CD
AWS managed key policy is fixed
upvoted 1 times
Raphaello
1 year, 3 months ago
Have you missed this "WS KMS managed keys (SSE-KMS) for the log files" in the question?
upvoted 1 times
...
...
Urameshi
1 year, 12 months ago
Selected Answer: BD
Option D is more obvious, but I'm going with option B because of this: https://docs.aws.amazon.com/kms/latest/developerguide/services-cloudtrail.html The question: "the engineer noticed that logs recorded by the new trail were not delivered to the bucket." Link: "Each time CloudTrail puts a log file into your S3 bucket, Amazon S3 sends a GenerateDataKey request to AWS KMS on behalf of CloudTrail."
upvoted 2 times
...
pal40sg
2 years ago
Selected Answer: AD
A. The CMK key policy does not allow CloudTrail to make encrypt and decrypt API calls against the key: To enable server-side encryption with AWS KMS managed keys (SSE-KMS), the CloudTrail service needs permission to encrypt and decrypt the log files using the specified AWS KMS CMK. If the key policy does not allow CloudTrail to perform these operations, it will result in logs not being delivered to the S3 bucket. D. The S3 bucket policy does not allow CloudTrail to make PutObject API calls against a folder created for the Organizations trail: The S3 bucket policy controls access to the S3 bucket. If the bucket policy does not grant CloudTrail the necessary permissions to perform the PutObject API calls to the specific folder created for the Organizations trail, it will prevent the logs from being delivered to the bucket.
upvoted 3 times
pal40sg
2 years ago
A. The CMK key policy does not allow CloudTrail to make encrypt and decrypt API calls against the key. B. The CMK key policy does not allow CloudTrail to make GenerateDataKey API calls against the key. Both factors A and B can cause the issue. CloudTrail requires permission to encrypt and decrypt the log files using the specified AWS KMS CMK (Factor A). Additionally, it needs permission to generate a data encryption key (DEK) for encrypting the log files using the GenerateDataKey API call (Factor B).
upvoted 1 times
captainpike
1 year, 10 months ago
Agree, but D is definitely needed. Between A nd B I choose B for the following reason, see "Granting encrypt permissions, Example Allow CloudTrail to encrypt logs on behalf of specific accounts" in https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html#required-kms-key-policy-trails
upvoted 1 times
...
...
...
arpgaur
2 years, 4 months ago
Still confused after going through the comments why not C & D?
upvoted 2 times
...
sakibmas
2 years, 5 months ago
Selected Answer: BD
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html
upvoted 1 times
...
Root_Access
2 years, 9 months ago
Selected Answer: BD
CloudTrail needs explicit permission to use the KMS key to encrypt logs on behalf of specific accounts. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html Because you are creating a new trail you need to modify bucket policy to allow cloudtrail write to s3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html
upvoted 1 times
...
dcasabona
2 years, 10 months ago
Selected Answer: AB
I go for A and B. Option D says "...folder created for the Organizations trail."and the question mention to use the same bucket, so this does not apply. On top of it, Encrypted and Decripted permission is also necessary.
upvoted 1 times
...
ideoignus
3 years, 3 months ago
Selected Answer: BD
B & D https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html
upvoted 1 times
...
NivNZ
3 years, 6 months ago
B & D B - "If you are using an existing S3 bucket with an S3 Bucket Key, CloudTrail must be allowed permission in the key policy to use the AWS KMS actions GenerateDataKey and DescribeKey. If cloudtrail.amazonaws.com is not granted those permissions in the key policy, you cannot create or update a trail." Reference: Note in https://docs.aws.amazon.com/awscloudtrail/latest/userguide/encrypting-cloudtrail-log-files-with-aws-kms.html D - obviously needs S3 bucket policy to allow PutObject call
upvoted 1 times
...
robbyyy
3 years, 7 months ago
I think is B,D B-If you chose Use existing S3 bucket, specify a bucket in Trail log bucket name, or choose Browse to choose a bucket. The bucket policy must grant CloudTrail permission to write to it. For information about manually editing the bucket policy https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-in-the-console.html D- https://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/create-kms-key-policy-for-cloudtrail.html#create-kms-key-policy-for-cloudtrail-encrypt
upvoted 1 times
...
Kdosec
3 years, 7 months ago
Hi Guy, I am still not clear why the point "However, the engineer noticed that logs recorded by the new trail were not delivered to the bucket." is related to CMK policy ? if a log record not delivered to the S3 bucket, it should be a S3 policy or IAM policy, so I can't see any sense to select B.
upvoted 1 times
babaseun
3 years, 7 months ago
S3 sends a GenerateDataKey request to AWS KMS on behalf of CloudTrail
upvoted 1 times
...
...
DerekKey
3 years, 7 months ago
B - OK - CMK policy statement: { "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": "kms:GenerateDataKey*", "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws:cloudtrail:arn": [ "arn:aws:cloudtrail:*:111111111111:trail/*", "arn:aws:cloudtrail:*:222222222222:trail/*" ] } } } D - OK - https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-set-bucket-policy-for-multiple-accounts.html
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...