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

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

After a recent security audit involving Amazon S3, a company has asked for assistance reviewing its S3 buckets to determine whether the data is properly secured. The first S3 bucket on the list has the following bucket policy:

In this bucket policy sufficient to ensure that the data is not publicly accessible?

  • A. Yes, the bucket policy makes the whole bucket publicly accessible despite how the S3 bucket ACL or object ACLs are configured.
  • B. Yes, none of the data in the bucket is publicly accessible, regardless of how the S3 bucket ACL or object ACLs are configured.
  • C. No, the IAM user policy would need to be examined first to determine whether any data is publicly accessible.
  • D. No, the S3 bucket ACL and object ACLs need to be examined first to determine whether any data is publicly accessible.
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
hk436
Highly Voted 3 years, 8 months ago
A is wrong as it mentions whole data is publicly accessible. B is wrong as it mentions none of the data is publicly accessible but its accessible from that IP range mentioned. C is wrong as it was nothing to do with IAM policy. D make sense, because even though having the bucket policy we can go ahead and make any object public by selecting the object and make public. In this case the object will be publicly accessible using the Object URL.
upvoted 16 times
Massoom
3 years, 1 month ago
The IP range mentioned is a private IP range and so publicly initiated connection can never have any of the IPs in that range
upvoted 5 times
...
...
1awssec
Highly Voted 3 years, 8 months ago
D Because a) bucket policy does not deny public access b) ACL not known ... if it allows, then the bucket is accessible publicly. ref: https://aws.amazon.com/blogs/security/iam-policies-and-bucket-policies-and-acls-oh-my-controlling-access-to-s3-resources/
upvoted 7 times
...
yorkicurke
Most Recent 1 year, 6 months ago
Selected Answer: A
i know this is old question but as of today december 2023; if you have configured S3 bucket or object ACLs to block public access, and the bucket policy contains a private CIDR range like 10.10.10.0/24 in the aws:sourceip condition, public access would still be allowed. Even though the ACLs block public access, the bucket policy overrides this. And specifying a private CIDR range in a policy does not actually restrict access as the aws:sourceip condition checks the public IP of the request, not the private IP. +Bucket policies override any access configuration set by ACLs. +Private IP ranges cannot be used to restrict public internet access as the request source IP seen will always be a public IP. + The policy containing the private CIDR range would not error, but would have no effect on access control since the CIDR cannot match public IP addresses. Peace:)
upvoted 2 times
yorkicurke
1 year, 6 months ago
oh yeah; https://repost.aws/knowledge-center/s3-block-public-access-setting
upvoted 1 times
...
...
sapien45
2 years, 12 months ago
Selected Answer: D
Whenever an AWS principal issues a request to S3, the authorization decision depends on the union of all the IAM policies, S3 bucket policies, and S3 ACLs that apply.
upvoted 1 times
...
TigerInTheCloud
3 years, 3 months ago
Selected Answer: D
First, the policy is invalid with the private IP CIDR in condition. A - the policy tries to grant access (assume public IP is used) to a specific IP range. not to make the bucket public accessible B: ACL can have the object public accessible (confirmed by testing) C: IAM user policy is for controlling IAM user access, not about public access D: Correct. refer to B
upvoted 2 times
...
rootblack
3 years, 3 months ago
The answer is A: IP Control should be NotIpAddress, not IpAddress.
upvoted 1 times
Massoom
3 years ago
NotIpAddress will be used with a 'Deny' not 'Allow'. This is a private IP range mentioned. An internet initiated connection would never have any IP in this IP range.
upvoted 1 times
...
...
DingjieDanielYang
3 years, 4 months ago
Is it C as if an IAM policy has an allow action, the user will be able to still access the bucket data.
upvoted 2 times
...
bull2
3 years, 5 months ago
Just do the sample test on AWS. You will get an error message when inputting the bucket policy as the question: "aws:SourceIp works only for public IP address ranges." which kicks A and B out. The answer is D. The global condition key aws:SourceIp works only for public IP address ranges. You receive this error when your policy allows only private IP addresses. In this case, the condition would never match. https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-policy-checks.html#access-analyzer-reference-policy-checks-error-private-ip-address
upvoted 1 times
...
LaLune
3 years, 5 months ago
When you create a bucket or put an object into it, the bucket or the object is private to you. Any other access to the bucket or the object is public access. The above policy allows public access from the 10.10.10.0/24 to examplebucket and its content, no matter what is the configuration of S3 ACL or object ACL! So, option A is the correct answer.
upvoted 1 times
...
NSF2
3 years, 5 months ago
I would go with B since there is a condition which can’t be bypassed. According to below page: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html Policies When evaluating a bucket policy, Amazon S3 begins by assuming that the policy is public. It then evaluates the policy to determine whether it qualifies as non-public. To be considered non-public, a bucket policy must grant access only to fixed values (values that don't contain a wildcard) of one or more of the following: A set of Classless Inter-Domain Routings (CIDRs), using aws:SourceIp. For more information about CIDR, see RFC 4632 on the RFC Editor website.
upvoted 1 times
...
cloudchica
3 years, 6 months ago
Is D the right answer?
upvoted 1 times
...
sam_live
3 years, 6 months ago
All options seem wrong to me. the mention condition doesn't even support private IP range. it only supports public IP address.
upvoted 2 times
...
argol
3 years, 7 months ago
Selected Answer: D
https://aws.amazon.com/blogs/security/iam-policies-and-bucket-policies-and-acls-oh-my-controlling-access-to-s3-resources/
upvoted 3 times
...
jtzt2003
3 years, 8 months ago
I think the answer is B. No matter what the ACLs permit, the Condition locks access down to the 10.10.10.0/24 network, which is an internal range. To me, internal means not public.
upvoted 2 times
dfranco76
3 years, 8 months ago
I think so, it is B. I guess 10.10.10.0/24 subnet is not by chance. :)
upvoted 1 times
dfranco76
3 years, 8 months ago
I change my opinion, after reading: The meaning of "public" Buckets ACLs Amazon S3 considers a bucket or object ACL public if it grants any permissions to members of the predefined AllUsers or AuthenticatedUsers groups. It is D. https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
upvoted 1 times
...
...
John129087
3 years, 8 months ago
B is wrong. Whenever an AWS principal issues a request to S3, the authorization decision depends on the union of all the IAM policies, S3 bucket policies, and S3 ACLs that apply.
upvoted 1 times
...
...
CloudMasterGuru
3 years, 8 months ago
Answer appears to be D.
upvoted 1 times
...
GabeDevOps
3 years, 8 months ago
The answer is D. "Public access is granted to buckets and objects through access control lists (ACLs), bucket policies, or both." https://aws.amazon.com/s3/features/block-public-access/
upvoted 5 times
...
dumma
3 years, 9 months ago
So is the answer C or D?
upvoted 1 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 ...