Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set viewer_certificate.ssl_support_method to a non-empty value #208

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

syphernl
Copy link
Contributor

what

  • Sets the viewer_certificate.ssl_support_method to a non-empty value

why

  • Since AWS Provider 3.71.0 the viewer_certificate.ssl_support_method is being validated on plan-time and can no longer be an empty string but must be sni-only or vip (of which the latter incurs costs)

references

@syphernl syphernl requested review from a team as code owners January 11, 2022 13:19
@syphernl syphernl requested review from Gowiem and Benbentwo and removed request for a team January 11, 2022 13:19
Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bridgecrew has found infrastructure configuration errors in this PR ⬇️

@@ -439,7 +439,7 @@ resource "aws_cloudfront_distribution" "default" {

viewer_certificate {
acm_certificate_arn = var.acm_certificate_arn
ssl_support_method = local.use_default_acm_certificate ? "" : "sni-only"
ssl_support_method = "sni-only"
Copy link

@bridgecrew bridgecrew bot Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW   Ensure CloudFront distribution has a strict security headers policy attached
    Resource: aws_cloudfront_distribution.default | ID: BC_AWS_NETWORKING_65

@@ -439,7 +439,7 @@ resource "aws_cloudfront_distribution" "default" {

viewer_certificate {
acm_certificate_arn = var.acm_certificate_arn
ssl_support_method = local.use_default_acm_certificate ? "" : "sni-only"
ssl_support_method = "sni-only"
Copy link

@bridgecrew bridgecrew bot Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW   Verify CloudFront Distribution Viewer Certificate is using TLS v1.2
    Resource: aws_cloudfront_distribution.default | ID: BC_AWS_NETWORKING_63

How to Fix

resource "aws_cloudfront_distribution" "pass" {
...

  viewer_certificate {
    cloudfront_default_certificate = false
    minimum_protocol_version = "TLSv1.2_2018"
  }
}

Description

This policy identifies AWS CloudFront web distributions which are configured with TLS versions for HTTPS communication between viewers and CloudFront. As a best practice, use TLSv1.1_2016 or later as the minimum protocol version in your CloudFront distribution security policies

Dependent Resources



Calculating...

🎉   Fixed by commit bb27c86 - Updated README.md

@syphernl syphernl mentioned this pull request Jan 11, 2022
@korenyoni
Copy link
Member

/rebuild-readme

korenyoni
korenyoni previously approved these changes Jan 12, 2022
@korenyoni korenyoni added the no-release Do not create a new release (wait for additional code changes) label Jan 12, 2022
Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️   Due to bb27c86 - Updated README.md - 1 error was fixed.

Change details

Error ID Change Path Resource
BC_AWS_NETWORKING_63 Fixed /main.tf aws_cloudfront_distribution.default

@korenyoni
Copy link
Member

/test all

@korenyoni
Copy link
Member

korenyoni commented Jan 12, 2022

Going to merge with BC "errors" unresolved because I have them fixed in #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants