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

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

A company has a web-based application using Amazon CloudFront and running on Amazon Elastic Container Service (Amazon ECS) behind an Application Load
Balancer (ALB). The ALB is terminating TLS and balancing load across ECS service tasks. A security engineer needs to design a solution to ensure that application content is accessible only through CloudFront and that it is never accessible directly.
How should the security engineer build the MOST secure solution?

  • A. Add an origin custom header. Set the viewer protocol policy to HTTP and HTTPS. Set the origin protocol policy to HTTPS only. Update the application to validate the CloudFront custom header.
  • B. Add an origin custom header. Set the viewer protocol policy to HTTPS only. Set the origin protocol policy to match viewer. Update the application to validate the CloudFront custom header.
  • C. Add an origin custom header. Set the viewer protocol policy to redirect HTTP to HTTPS. Set the origin protocol policy to HTTP only. Update the application to validate the CloudFront custom header.
  • D. Add an origin custom header. Set the viewer protocol policy to redirect HTTP to HTTPS. Set the origin protocol policy to HTTPS only. Update the application to validate the CloudFront custom header.
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
lycan
Highly Voted 3 years, 7 months ago
Answer D - this is the only way to ensure that the end user is not getting a HTTP 403 forbidden message when tried using HTTP as it will use HTTP to HTTPS redirect 303, and also ensures OAI through origin custom header, and the origin protocol policy will ensure that the traffic is negotiated to the ALB only via TLS
upvoted 20 times
afantict
3 years, 6 months ago
The ALB is terminating TLS doesn not mean from cloudfront to origin is http?
upvoted 2 times
rhinozD
3 years, 5 months ago
No. It means traffic from ALB to ECs service tasks is http.
upvoted 2 times
...
...
...
Hungdv
Highly Voted 3 years, 7 months ago
D is answer https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/restrict-access-to-load-balancer.html
upvoted 7 times
...
Raphaello
Most Recent 1 year, 2 months ago
Selected Answer: B
Both options B & D are equally secure. Viewer policy either initiated over HTTP or HTTPs, will always reached CloudFront as HTTPS. B. Only accepts HTTPS, and origin protocol matches viewer's (HTTPS). D. Redirecting HTTP to HTTPS, and origin protocol is HTTPS. Equally secure. I can't see why picking one over the other in the question context.
upvoted 1 times
Raphaello
1 year, 1 month ago
Viewer Protocol Policy can be either "Redirect HTTP to HTTPS" or "HTTPS Only" https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesViewerProtocolPolicy Similarly, Origin Protocol Policy can be either "HTTPS Only" or "Match Viewer" https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-cloudfront-to-custom-origin.html#using-https-cloudfront-to-origin-distribution-setting I cannot see a reason to favour one option over the other.
upvoted 1 times
...
...
s50600822
1 year, 9 months ago
B is the most secure. With D, the subsequent requests are secured but the first HTTP would have given out some data on the line.
upvoted 2 times
...
Green53
1 year, 10 months ago
Selected Answer: B
While I would personally implement D (and redirect HTTP to HTTPS), they have asked for the *most* secure solution. The answer is therefore B, drop HTTP support completely and only serve HTTPS.
upvoted 2 times
...
samCarson
1 year, 10 months ago
Selected Answer: D
D. Add an origin custom header. Set the viewer protocol policy to redirect HTTP to HTTPS. Set the origin protocol policy to HTTPS only. Update the application to validate the CloudFront custom header. This option is the most secure solution. By setting the viewer protocol policy to redirect HTTP to HTTPS, it ensures that all requests are encrypted. Setting the origin protocol policy to HTTPS only ensures end-to-end encryption between CloudFront and the ALB. Updating the application to validate the CloudFront custom header adds an additional layer of security to ensure that content is accessed only through CloudFront.
upvoted 2 times
...
pal40sg
1 year, 11 months ago
Selected Answer: B
B. Add an origin custom header. Set the viewer protocol policy to HTTPS only. Set the origin protocol policy to match viewer. Update the application to validate the CloudFront custom header. This solution ensures the highest level of security
upvoted 1 times
...
cloud_collector
2 years, 7 months ago
Selected Answer: D
In the question said " build the MOST secure solution?" To improve the security of this solution, you can configure your CloudFront distribution to always use HTTPS when sending requests to your Application Load Balancer. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/restrict-access-to-load-balancer.html#restrict-alb-improve-security
upvoted 1 times
...
Jonfernz
2 years, 11 months ago
Selected Answer: D
tell the ALB to redirect http requests to https.
upvoted 2 times
...
shiptyeyes
3 years, 2 months ago
Answer C "HTTP Only is the default setting when the origin is an Amazon S3 static website hosting endpoint, because Amazon S3 doesn’t support HTTPS connections for static website hosting endpoints. The CloudFront console does not support changing this setting for Amazon S3 static website hosting endpoints." https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html
upvoted 1 times
...
DerekKey
3 years, 5 months ago
D - i believe is correct. We are cutting out HTTP Viewer will be switched to HTTPS. Cloud front will use HTTPS to connect to ALB. ALB will check origin and terminate TLS. Request will be passed to ECS
upvoted 4 times
...
AwsSuperTrooper
3 years, 6 months ago
Answer B. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/restrict-access-to-load-balancer.html#restrict-alb-improve-security To improve the security of this solution, you can configure your CloudFront distribution to always use HTTPS when sending requests to your Application Load Balancer. Remember, this solution only works if you keep the custom header name and value secret. Using HTTPS can help prevent an eavesdropper from discovering the header name and value. We also recommend rotating the header name and value periodically.
upvoted 1 times
rhinozD
3 years, 5 months ago
How about viewer uses http? Can they access?
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago