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

feat(cloudfront): use TLS_V1_2_2021 SecurityPolicy as default version (under feature flag) #15477

Merged

Conversation

SvenKirschbaum
Copy link
Contributor

@SvenKirschbaum SvenKirschbaum commented Jul 9, 2021

This pull request adds the new TLSv1.2_2021 security policy to the respective enum and adds the feature flag @aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021, which, when enabled, causes distributions to use the new security policy by default.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Jul 9, 2021

@peterwoodworth peterwoodworth added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Jul 20, 2021
Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, @fallobst22 !

Adding the new security policy is great; however, we can't change the default value for an existing construct. Existing users may rely on the behavior of TLSv1.2_2019 (e.g., use ECDHE-RSA-AES128-SHA256) and may break when upgrading. Unlikely, but possible.

We can suggest people use TLSv1.2_2021, but can't enforce it on existing customers. The standard way to do this would be to use a feature flag to allow users to opt-in to the new default.

I would be happy for this just to be adding the new enum value, and tackle the feature flag / new default later. If you'd like to tackle it now though, that's fine as well.

@mergify mergify bot dismissed njlynch’s stale review July 29, 2021 05:50

Pull request has been modified.

@SvenKirschbaum SvenKirschbaum changed the title chore(cloudfront): update SecurityPolicyProtocol enum and set TLS_V1_2_2021 as default version feat(cloudfront): update SecurityPolicyProtocol enum and set TLS_V1_2_2021 as default version (under feature flag) Jul 29, 2021
@SvenKirschbaum
Copy link
Contributor Author

Thanks for taking a look @njlynch

I have chosen to add a feature flag for the new default value as requested.
For the tests I decided to hardcode the security policy in the exhaustive props test, and split the ViewerCertificate tests into two, for the new and old default.

Please take a look again and tell me if you would like anything changed.

@SvenKirschbaum SvenKirschbaum requested a review from njlynch July 29, 2021 07:57
@njlynch njlynch changed the title feat(cloudfront): update SecurityPolicyProtocol enum and set TLS_V1_2_2021 as default version (under feature flag) feat(cloudfront): use TLS_V1_2_2021 SecurityPolicy as default version (under feature flag) Jul 29, 2021
njlynch
njlynch previously approved these changes Jul 29, 2021
Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the extra effort!

@SvenKirschbaum
Copy link
Contributor Author

Your change was missing a semicolon, which broke the linter.
I added it, but you will have to approve again.

Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

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

Thanks for fixing my mistake! :D

@SvenKirschbaum
Copy link
Contributor Author

SvenKirschbaum commented Jul 30, 2021

It looks to me like the pr linter disallows pull requests with a breaking changes section for stable modules, without checking if they are under a feature flag. However the Feature Flags section inside CONTRIBUTING.md explicitly states, that the breaking changes part should be included, so merging this is impossible without violating one of the two requirements.

In my eyes perhaps the linter should be adapted to check for the feature flag mark in the title, and allow the breaking changes in this case.

Would be great if you could take a look again @njlynch

@njlynch
Copy link
Contributor

njlynch commented Jul 30, 2021

I've reviewed this with my colleagues, and we agreed to just remove the BREAKING CHANGES notice, as it's not really a breaking change for existing customers.

@mergify
Copy link
Contributor

mergify bot commented Jul 30, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 63f2b02
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 7b64abf into aws:master Jul 30, 2021
@mergify
Copy link
Contributor

mergify bot commented Jul 30, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@SvenKirschbaum SvenKirschbaum deleted the update-cloudfront-security-policies branch July 30, 2021 16:27
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Aug 3, 2021
… (under feature flag) (aws#15477)

This pull request adds the new TLSv1.2_2021 security policy to the respective enum and adds the feature flag `@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021`, which, when enabled, causes distributions to use the new security policy by default.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
… (under feature flag) (aws#15477)

This pull request adds the new TLSv1.2_2021 security policy to the respective enum and adds the feature flag `@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021`, which, when enabled, causes distributions to use the new security policy by default.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
david-doyle-as24 pushed a commit to david-doyle-as24/aws-cdk that referenced this pull request Sep 7, 2021
… (under feature flag) (aws#15477)

This pull request adds the new TLSv1.2_2021 security policy to the respective enum and adds the feature flag `@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021`, which, when enabled, causes distributions to use the new security policy by default.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants