- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.3k
feat(opensearch): update default TLS security policy to TLS 1.2 for OpenSearch domains #34660
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
Conversation
- no TLS security policy set, allowing the service to use its default policy
| updating integ tests snapshots | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
        
          
                ...ges/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...s/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.https.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...k-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ges/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | domainEndpointOptions: { | ||
| enforceHttps, | ||
| tlsSecurityPolicy: props.tlsSecurityPolicy ?? TLSSecurityPolicy.TLS_1_0, | ||
| tlsSecurityPolicy: props.tlsSecurityPolicy, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a risk of breaking existing customers who intentionally did not provide a security policy with the assumption that it would use Policy-Min-TLS-1-0-2019-07? This change will implicitly update the TLS security policy (by using the OpenSearch default) without customers knowing, which could break their existing setups which rely on the specific version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will. To avoid this, I guess the only option for us is to introduce a new FF. Should we do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the update in the User Impact section (and the testing done as well - thank you!):
Existing users with tlsSecurityPolicy undefined won't be impact, changing tlsSecurityPolicy from a cdk defined TLS 1.0 to undefined won't update the existing deployment. See Description of how you validated changes below.
After this PR, for all new deployments, the default will be TLS 1.2 if undefined. Users have to explicitly opt in TLSSecurityPolicy.TLS_1_0 if they need to stick to this version.
Do you think there is value in publishing a notice/informing customers somehow about this change? It seems safe to me, based on your testing, but it is possible that we are not thinking about a particular customer setup which can break.
| Comment on the commit message: 
 Might be better to say: 
 | 
| 
 Definitely not a  
 Yes, but just because the issue has a certain title doesn't mean that title should be used. The bug isn't really "remove default TLS policy" but would be something like "cannot use OpenSearch default TLS policy because of outdated CDK-specified default TLS policy" 
 FWIW I'd probably classify it as a feature. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
| Exemption Request for the README update | 
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
| AWS CodeBuild CI Report
 Powered by github-codebuild-logs, available on the AWS Serverless Application Repository | 
| Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). | 
| Comments on closed issues and PRs are hard for our team to see. | 
Description
This PR fixes the issue where OpenSearch domains were not getting a default TLS security policy, causing inconsistent behavior between the CDK construct and the actual AWS service default.
Previous behavior:
tlsSecurityPolicyspecified →TLSSecurityPolicy.TLS_1_0New behavior:
tlsSecurityPolicyspecified → CDK explicitly sets TLSSecurityPolicy:Policy-Min-TLS-1-2-2019-07Changes Made
domain.ts: Modified theDomainEndpointOptionsconfiguration to useTLSSecurityPolicy.TLS_1_2as the default whenprops.tlsSecurityPolicyis undefined:- Default TLS 1.2 behavior when no policy is specified
- Explicit TLS policy values (1.0, 1.2, 1.2 PFS)
- Interaction with enforceHttps setting
- Backward compatibility scenarios
TLSSecurityPolicyassertion, ensuring they reflect the new default behavior.Approach Rationale
This approach is simpler and more predictable:
TLSSecurityPolicy: Policy-Min-TLS-1-2-2019-07Testing
Related Issues
Closes #34658
Breaking Changes
OpenSearch Domain TLS Security Policy Default Changed
tlsSecurityPolicy: TLSSecurityPolicy.TLS_1_0By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license