Skip to content

CloudFront MinimumProtocolVersion silently ignored with default certificate #195

Description

@giordafrancis

The CDK code in lib/features/web.ts explicitly sets minimumProtocolVersion on the CloudFront distribution (both custom domain and default certificate branches). However, when using the default CloudFront certificate (no custom domain configured), the deployed distribution shows TLSv1 as the minimum protocol instead of the value specified in the code.

Environment:

  • AWS region: eu-west-2
  • Default CloudFront certificate (no custom domain)
  • CDK aws-cdk-lib 2.153.0

Steps to reproduce:

  • Deploy the app without a custom domain
  • Run aws cloudfront get-distribution-config --id --query 'DistributionConfig.ViewerCertificate'
  • Observe MinimumProtocolVersion shows TLSv1 despite the code setting TLS_V1_2_2021

Expected behaviour: MinimumProtocolVersion should reflect the value set in the CDK code. That is my asumption even if using cloudfront custom domain.

Additional context: Flagged during penetration testing ; the distribution accepts TLS connections below 1.2, which does not meet organisational security requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions