-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(s3-deployment): implement new signContent option #24713
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. 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.
9699e3f
to
de8e69e
Compare
de8e69e
to
cafb3bf
Compare
(Removed keyword): I do not believe that this commit requires a new integration test because this feature is a property of the custom resource lambda and not a CloudFormation feature. The unit tests provide 100% coverage by
|
@AMZN-hgoffin because the feature is a property of the custom resource lambda is exactly why we do need an integration test. We need an integration test that creates a bucket with the specific bucket policy in order to confirm that these changes allow the user to write to the bucket. |
Understood, I will put together a complete integration test. I have entirely too much faith in the aws-cli and botocore test suites, I suppose :) |
91b2955
to
9136983
Compare
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
569f96e
to
f4f9dec
Compare
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.
Thank you for your contribution! Please see my comments inline.
packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-signcontent.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment-signcontent.ts
Outdated
Show resolved
Hide resolved
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
1 similar comment
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
f4f9dec
to
40c09f8
Compare
Pull request has been modified.
I think I've addressed the feedback with better comments in the integration test. I rebuilt the change with the new CDK directory structure. Please let me know if there's anything else required to get this functionality landed! |
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). |
de82328
to
40c09f8
Compare
IAM resource policy may prohibit PutObject calls with unsigned payloads. This enables a new 'signContent: true' option to enable sigv4 signing of a computed x-amz-content-sha256 header. The option directly corresponds to the CLI option `aws configure set s3.payload_signing_enabled true`.
40c09f8
to
d5bf7b3
Compare
Auto-merge was refusing to merge because of workflow configuration files being edited on main since my branch, and auto-merge not having permission to modify workflow files in my remote branch. I have rebased the change to latest main. Diff is identical. |
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 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). |
This adds a new boolean option 'signPayload' to the BucketDeployment construct, so that it can be used with buckets whose IAM policy denies PutObject when x-amz-content-sha256 is not set properly. (See https://docs.aws.amazon.com/AmazonS3/latest/API/bucket-policy-s3-sigv4-conditions.html for example constructions that use this IAM condition key.)
Closes #24711.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license