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

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

A company has an IAM group. All of the IAM users in the group have been assigned a multi-factor authentication (MFA) device and have full access to Amazon
S3.
The company needs to ensure that users in the group can perform S3 actions only after the users authenticate with MFA. A security engineer must design a solution that accomplishes this goal with the least maintenance overhead.
Which combination of actions will meet these requirements? (Choose two.)

  • A. Add a customer managed Deny policy to users in the group for s3:*actions.
  • B. Add a customer managed Deny policy to the group for s3:*actions.
  • C. Add a customer managed Allow policy to the group for s3:*actions.
  • D. Add a condition to the policy: ג€Conditionג€ : { ג€BoolIfExistsג€ : { ג€aws:MultiFactorAuthPresentג€ : false } }
  • E. Add a condition to the policy: ג€Conditionג€ : { ג€Boolג€ : { ג€aws:MultiFactorAuthPresentג€ : false } }
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
dumma
Highly Voted 3 years, 6 months ago
Sorry it's B and D https://aws.amazon.com/premiumsupport/knowledge-center/enforce-mfa-other-account-access-bucket/
upvoted 29 times
NSF2
3 years, 3 months ago
But can you attach policy or role to a group?
upvoted 2 times
Tesla_0011
2 years, 11 months ago
yes : https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_attach-policy.html
upvoted 1 times
...
Tofu13
1 year, 11 months ago
U can attach a policy to a group, that's the whole point of groups. It is easy to get confused though, as groups cannot be set as a principal within a policy. https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html You cannot use the Principal element in an identity-based policy. Identity-based policies are permissions policies that you attach to IAM identities (users, groups, or roles). In those cases, the principal is implicitly the identity where the policy is attached.
upvoted 2 times
...
...
...
1awssec
Highly Voted 3 years, 5 months ago
A, D. A over B because you cannot specify IAM groups as principals in a policy. ref: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
upvoted 10 times
Raphaello
1 year, 2 months ago
Who said this is a resource policy? It's an identity policy attached to IAM group, which is legit.
upvoted 1 times
...
...
frankzeng
Most Recent 1 year ago
AD, group can not be the principle of resource policy
upvoted 1 times
...
Raphaello
1 year, 2 months ago
Selected Answer: BD
Deny if MultiFactorAuthPresent=false (not present)..if applicable (if exists). Note The condition check for MultiFactorAuthPresent in the Deny statement should not be a {"Bool":{"aws:MultiFactorAuthPresent":false}} because that key is not present and cannot be evaluated when MFA is not used. So instead, use the BoolIfExists check to see whether the key is present before checking the value. For more information, see ...IfExists condition operators. BD.
upvoted 1 times
...
howchan
1 year, 5 months ago
Selected Answer: BE
https://docs.aws.amazon.com/ko_kr/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-multifactorauthpresent BoolIfExists makes MFA be optional
upvoted 1 times
Raphaello
1 year, 2 months ago
##### WARNING: NOT RECOMMENDED ##### "Effect" : "Deny", "Condition" : { "Bool" : { "aws:MultiFactorAuthPresent" : "false" } }
upvoted 1 times
...
...
XXX2021
1 year, 11 months ago
Answer - BD reference for bool and boolifexist https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_ec2_require-mfa.html#:~:text=The%20condition%20check,condition%20operators.
upvoted 1 times
...
ITGURU51
2 years ago
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html The answer is BD
upvoted 1 times
...
Cyp
2 years ago
Selected Answer: BD
To sum up: If you use deny policy, you should use boolifexists with mfapresent:false else on an allow policy, you should use bool with mfapresent:true.
upvoted 1 times
...
peddyua
2 years, 1 month ago
Selected Answer: BE
it's BE, arguments for E: The "BoolIfExists" element is used when the policy condition can be optional. he requirement is to ensure that users in an IAM group can perform Amazon S3 actions only after authenticating with MFA. This is a mandatory requirement, not an optional one. Therefore, the "Bool" element should be used instead of "BoolIfExists". Using "BoolIfExists" would make the MFA authentication condition optional, which would defeat the purpose of the policy. If "BoolIfExists" were used, a user could potentially bypass the MFA requirement by not using their MFA device when accessing S3, which would create a security vulnerability.
upvoted 3 times
peddyua
2 years, 1 month ago
while using BoolIfExists makes the MFA requirement optional, it is not recommended to make MFA optional in security policies. It is better to require MFA and use Bool to explicitly enforce the requirement.
upvoted 2 times
...
...
arpgaur
2 years, 3 months ago
A, D is the right answer. the question specifically mention the restriction for MFA should be there for the users in the IAM group, not the whole IAM group intself.
upvoted 2 times
...
sakibmas
2 years, 3 months ago
Selected Answer: BD
https://aws.amazon.com/premiumsupport/knowledge-center/mfa-iam-user-aws-cli/
upvoted 3 times
...
Mimikabs
2 years, 4 months ago
Selected Answer: BD
I think the confusion on this question is due to this: - You cannot use groups as principals in resource based policies - But you can attach IAM user policies to groups.
upvoted 3 times
...
AdamWest
2 years, 5 months ago
Selected Answer: BD
Who ever said AD - You're on crack. The answer is BD of course you can add policy to groups. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_attach-policy.html AWS CLI: aws iam attach-group-policy AWS API: AttachGroupPolicy
upvoted 3 times
...
HieuTT
2 years, 6 months ago
A.D can't attach iam group to s3 bucket policy . https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
upvoted 1 times
...
dcasabona
2 years, 9 months ago
Selected Answer: BD
Since the policy can be applied to a group, option B seems to be the best option.
upvoted 2 times
...
sapien45
2 years, 9 months ago
Selected Answer: BD
The first part can explicitly deny those actions when the user doesn't authenticate using MFA (the condition "aws:MultiFactorAuthPresent": "false" is met), similar to the following: "s3:PutObject", "s3:PutObjectAcl", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::example.accounta.bucket/*", "Condition": { "BoolIfExists": { "aws:MultiFactorAuthPresent": "false" } } }, For thoses who say that you cannot attach persmission policies to group. How about trying ? it takes 10 seconds to verify than you can Attach permissions policies - Optional (758)Info You can attach up to 10 policies to this user group. All the users in this group will have permissions that are defined in the selected policies.
upvoted 3 times
...
rootblack
3 years, 1 month ago
Depending on the bool value of aws:MultiFactorAuthPresent should be different as follows: 1. "Effect": "Deny", ....., "Condition": {"BoolIfExists": {"aws:MultiFactorAuthPresent": "false"}} 2. "Effect": "Allow", ....., "Condition": {"Bool": {"aws:MultiFactorAuthPresent": "true"}}
upvoted 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago