fix(cloudfront): warn when minimumProtocolVersion is set without a certificate#37250
fix(cloudfront): warn when minimumProtocolVersion is set without a certificate#37250
Conversation
… is set without a certificate Setting minimumProtocolVersion or sslSupportMethod without a custom certificate has no effect since the distribution falls back to the CloudFront default certificate with a fixed security policy. Previously these props were silently ignored. This adds Annotations.addWarningV2() warnings to let users know the settings won't take effect. Closes aws#35404
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request This change only adds Unit tests covering the new warning assertions have been added. |
Issue
Closes #35404
Reason for this change
Setting
minimumProtocolVersionorsslSupportMethodon aDistributionwithout also providing a customcertificatehas no effect — the distribution silently falls back to the CloudFront default certificate, which uses a fixed security policy. Users have no way of knowing their TLS configuration is being ignored.Description of changes
Added
Annotations.of(this).addWarningV2()warnings in theDistributionconstructor for bothminimumProtocolVersionandsslSupportMethodwhen they're set without acertificate.This follows the same pattern as the existing
emptyDomainNameswarning a few lines above.Description of how you validated changes
Added three test cases:
minimumProtocolVersionis set without a certificatesslSupportMethodis set without a certificateminimumProtocolVersionis set with a certificate presentAll existing CloudFront tests pass (419 tests, 28 suites).
Checklist