Skip to content

fix(cloudfront): truncate long ResponseHeaderPolicy names#21525

Merged
mergify[bot] merged 5 commits intoaws:mainfrom
blimmer:blimmer/truncate-response-headers-policy-name
Aug 10, 2022
Merged

fix(cloudfront): truncate long ResponseHeaderPolicy names#21525
mergify[bot] merged 5 commits intoaws:mainfrom
blimmer:blimmer/truncate-response-headers-policy-name

Conversation

@blimmer
Copy link
Copy Markdown
Contributor

@blimmer blimmer commented Aug 9, 2022

Fixes #21524


All Submissions:

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
Copy Markdown

gitpod-io bot commented Aug 9, 2022

@blimmer blimmer marked this pull request as ready for review August 9, 2022 20:38
@aws-cdk-automation aws-cdk-automation requested a review from a team August 9, 2022 20:39
@github-actions github-actions bot added bug This issue is a bug. p2 labels Aug 9, 2022
otaviomacedo
otaviomacedo previously approved these changes Aug 9, 2022
@mergify mergify bot dismissed otaviomacedo’s stale review August 9, 2022 21:05

Pull request has been modified.

Copy link
Copy Markdown
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

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

One quick question: does this have the potential to create breaking changes for existing resources? I think no, but I'm not 100% positive.

@blimmer
Copy link
Copy Markdown
Contributor Author

blimmer commented Aug 9, 2022

@TheRealAmazonKendra, the Name property can be updated without replacement, it looks like.

I think the only potential for breaking existing resources would be if someone managed to create a 129-character policy name (which appears to be allowed, but is not documented) and imported it outside of CDK by name somewhere else. It feels like 129 is so random (seems like it should be 128), so that's why I truncated to 128. IMO this scenario's pretty unlikely, but it is technically possible.

@TheRealAmazonKendra
Copy link
Copy Markdown
Contributor

@TheRealAmazonKendra, the Name property can be updated without replacement, it looks like.

I think the only potential for breaking existing resources would be if someone managed to create a 129-character policy name (which appears to be allowed, but is not documented) and imported it outside of CDK by name somewhere else. It feels like 129 is so random (seems like it should be 128), so that's why I truncated to 128. IMO this scenario's pretty unlikely, but it is technically possible.

Cool, thanks for the verification.

@mergify mergify bot dismissed TheRealAmazonKendra’s stale review August 10, 2022 02:00

Pull request has been modified.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 10, 2022

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).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 4c0ed3e
  • 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 a464ee1 into aws:main Aug 10, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 10, 2022

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a bug. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-cloudfront): ResponseHeadersPolicy policy name can exceed maximum

4 participants