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 308 discussion

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

A company's engineering team is developing a new application that creates AWS Key Management Service (AWS KMS) CMK grants for users. Immediately after a grant is created, users must be able to use the CMK to encrypt a 512-byte payload. During load testing, a bug appears intermittently where
AccessDeniedExceptions are occasionally triggered when a user first attempts to encrypt using the CMK.
Which solution should the company's security specialist recommend?

  • A. Instruct users to implement a retry mechanism every 2 minutes until the call succeeds.
  • B. Instruct the engineering team to consume a random grant token from users, and to call the CreateGrant operation, passing it the grant token. Instruct users to use that grant token in their call to encrypt.
  • C. Instruct the engineering team to create a random name for the grant when calling the CreateGrant operation. Return the name to the users and instruct them to provide the name as the grant token in the call to encrypt.
  • D. Instruct the engineering team to pass the grant token returned in the CreateGrant response to users. Instruct users to use that grant token in their call to encrypt.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
Radhaghosh
Highly Voted 3 years, 4 months ago
You need the Grant Token (not a random generated) Answer is D
upvoted 9 times
...
Raphaello
Most Recent 1 year, 4 months ago
Selected Answer: D
D is actually what makes sense out of all options.
upvoted 1 times
...
yorkicurke
1 year, 5 months ago
Selected Answer: D
eliminating B & C: --> The grant token is generated by AWS KMS as a response to the CreateGrant operation. A: It will cause unnecessary delays and still does not address the root cause of the issue. you can not expect user to retry every 2 min and hope for it to succeed. That could turn into infinite loop.
upvoted 1 times
...
Toptip
2 years ago
Selected Answer: D
D - is correct Grant Token should be used this case
upvoted 1 times
...
awsec2
2 years, 5 months ago
D. The grant token returned in the CreateGrant response should be used by the users in their call to encrypt. This will ensure that the grant token is valid and can be used to encrypt the payload.
upvoted 1 times
...
bazoch78
2 years, 5 months ago
Selected Answer: D
as per the doc (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html#create-grant and https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/kms.html#KMS.Client.create_grant) CreateGrant returns a grant token.
upvoted 1 times
...
D2
2 years, 6 months ago
Selected Answer: A
Answer A The grantee principal can use the permissions that the grant gives them without specifying the grant, just as they would if the permissions came from a key policy or IAM policy. However, when you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the operation achieves eventual consistency. To use the permissions in a grant immediately, use a grant token. https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
upvoted 1 times
captainpike
1 year, 10 months ago
Your statement does nothing but confirm it's D. "To use the permissions in a grant immediately, use a grant token."
upvoted 1 times
...
...
sapien45
2 years, 9 months ago
Selected Answer: D
To use the permissions in a new grant immediately, use the grant token for the grant. Save the grant token that the CreateGrant operation returns. Then submit the grant token in the request for the AWS KMS operation. D
upvoted 3 times
...
ude
2 years, 10 months ago
Selected Answer: D
it's D
upvoted 1 times
...
lotfi50
3 years ago
D is the good answer
upvoted 1 times
...
Jonfernz
3 years, 1 month ago
Selected Answer: D
When you apply a grant, the effect is not immediate. It takes time for all of KMS to learn it. So if you want the grant to work immediately, you need to use the CreateGrant operation and use the grant token that it returns. You can use this token to GenerateDataKey and Decrypt. # Create a grant; save the grant token token=$(aws kms create-grant \ --key-id 1234abcd-12ab-34cd-56ef-1234567890ab \ --grantee-principal arn:aws:iam::111122223333:user/appUser \ --retiring-principal arn:aws:iam::111122223333:user/acctAdmin \ --operations GenerateDataKey Decrypt \ --query GrantToken \ --output text) # Use the grant token in a request aws kms generate-data-key \ --key-id 1234abcd-12ab-34cd-56ef-1234567890ab \ –-key-spec AES_256 \ --grant-tokens $token
upvoted 2 times
...
mongiam
3 years, 1 month ago
Selected Answer: D
D refer: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
upvoted 2 times
...
TigerInTheCloud
3 years, 2 months ago
Selected Answer: A
A - When you create a grant, the grant might not be effective immediately. There's likely to be a brief interval, less than five minutes, until the grant achieves eventual consistency, that is, before the new grant is available throughout AWS KMS. https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token B - Grantor does not need information from grantee C - Token not name is used D - That is the action which run into issue.
upvoted 2 times
MoreOps
3 years, 2 months ago
Hi @Tiger, its D
upvoted 1 times
...
sapien45
2 years, 11 months ago
In ther same link you posted : To use the permissions in a new grant immediately, use the grant token for the grant. Save the grant token that the CreateGrant operation returns. Then submit the grant token in the request for the AWS KMS operation. D
upvoted 2 times
...
...
argol
3 years, 5 months ago
https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token D is the answer
upvoted 4 times
...
argol
3 years, 5 months ago
To use the permissions in a new grant immediately, use the grant token for the grant. Save the grant token that the CreateGrant operation returns. Then submit the grant token in the request for the AWS KMS operation. You can submit a grant token to any AWS KMS grant operation and you can submit multiple grant tokens in the same request.
upvoted 2 times
...
aguijap
3 years, 5 months ago
D - CreateGrant is the only operation that returns a grant token. You cannot get a grant token from any other AWS KMS operation
upvoted 2 times
...
babaseun
3 years, 5 months ago
D......pass the grant token returned in the CreateGrant response to users
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 ...