-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws-cdk/aws-s3: Unable to deploy CDK due to asset bucket request missing headers #31926
Closed
1 task done
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
p1
potential-regression
Marking this issue as a potential regression to be checked by team member
Comments
cedw93
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 29, 2024
github-actions
bot
added
@aws-cdk/aws-s3
Related to Amazon S3
potential-regression
Marking this issue as a potential regression to be checked by team member
labels
Oct 29, 2024
cedw93
changed the title
(module name): (short issue description)
aws-cdk/aws-s3: Unable to deploy CDK due to asset bucket request missing headers
Oct 29, 2024
mrgrain
added
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 29, 2024
Investigating. This seems possible with a non-standard bootstrapping setup. |
rix0rrr
added a commit
to cdklabs/cdk-assets
that referenced
this issue
Oct 30, 2024
We thought disabling a content checksum for S3 clients would work in all scenarios, so that we can use the same S3 client config for FIPS and non-FIPS environments. Turns out that yet another scenario requires content checksums: PutObject to an Object Lock-enabled S3 bucket. Again, there's no way to make this work with SDKv2. We do the best we can do: turn off MD5 signing only for FIPS environments. Result: it will not be possible to use Object Lock in FIPS environments. But at least we unbreak the scenario for non-FIPS customers. Relates to aws/aws-cdk#31926
This was referenced Oct 30, 2024
github-merge-queue bot
pushed a commit
to cdklabs/cdk-assets
that referenced
this issue
Oct 30, 2024
By default, the S3 client will use MD5 checksums. But in FIPS environments, those MD5 checksums will not work because Node will not have access to an M5 digest. Force the usage of SHA256 for these checksums instead. In SDKv3, this is as simple as configuring the algorithm to use, and the SDK itself will do the rest. Relates to aws/aws-cdk#31926
github-merge-queue bot
pushed a commit
to cdklabs/cdk-assets
that referenced
this issue
Oct 30, 2024
We thought disabling a content checksum for S3 clients would work in all scenarios, so that we can use the same S3 client config for FIPS and non-FIPS environments. Turns out that yet another scenario requires content checksums: PutObject to an Object Lock-enabled S3 bucket. Again, there's no way to make this work with SDKv2. We do the best we can do: turn off MD5 signing only for FIPS environments. Result: it will not be possible to use Object Lock in FIPS environments. But at least we unbreak the scenario for non-FIPS customers. Relates to aws/aws-cdk#31926
github-merge-queue bot
pushed a commit
to cdklabs/cdk-assets
that referenced
this issue
Oct 30, 2024
We thought disabling a content checksum for S3 clients would work in all scenarios, so that we can use the same S3 client config for FIPS and non-FIPS environments. Turns out that yet another scenario requires content checksums: PutObject to an Object Lock-enabled S3 bucket. Again, there's no way to make this work with SDKv2. We do the best we can do: turn off MD5 signing only for FIPS environments. Result: it will not be possible to use Object Lock in FIPS environments. But at least we unbreak the scenario for non-FIPS customers. Relates to aws/aws-cdk#31926
github-merge-queue bot
pushed a commit
to cdklabs/cdk-assets
that referenced
this issue
Oct 30, 2024
By default, the S3 client will use MD5 checksums. But in FIPS environments, those MD5 checksums will not work because Node will not have access to an M5 digest. Force the usage of SHA256 for these checksums instead. In SDKv3, this is as simple as configuring the algorithm to use, and the SDK itself will do the rest. Relates to aws/aws-cdk#31926
mergify bot
pushed a commit
that referenced
this issue
Nov 1, 2024
…et (#31937) Object Lock requires passing an object checksum. By default, SDKv2 only calculates MD5 checksums. We used to turn off checksums altogether and rely on SigV4 checksums to produce a workable setup for both FIPS and non-FIPS users, but in case of Object Lock this doesn't work: we must definitely have an S3 content checksum, and the the SigV4 checksum alone is not good enough. Since SDKv2 only supports MD5 checksums, we now only disable checksums for FIPS environments. The unfortunate result is that Object Lock will not work in a FIPS environment, but there's no way around that for now. When we migrate to SDKv3, which can be configured to checksum using SHA256, Object Lock + FIPS will work again. Relates to #31926 (This PR also adds tests for the PluginHost because otherwise the build fails due to coverage requirements) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Closed by #31937 |
Comments on closed issues and PRs are hard for our team to see. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
p1
potential-regression
Marking this issue as a potential regression to be checked by team member
Describe the bug
Dependabot recently updated our CDK to version
2.164.1
which has broken our deployments due an issue publishing to s3. The Error is (sensitive information removed):Our buckets have Governance Objects lock on them which we cannot remove.
It seems like it might be related to the FIPS configuration recently raised here: #31883
Reverting to a previous CDK version allowed the deployment to complete but this impacts our patch management if we cannot update CDK.
Regression Issue
Last Known Working CDK Version
2.162.1
Expected Behavior
CDK deploy works as expected
Current Behavior
CDK deployment fails when the asset buckets have an object lock
Reproduction Steps
Run CDK Deploy for our stack as normal
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.164.1
Framework Version
No response
Node.js Version
18.20.4
OS
Linux & Mac OS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: