Skip to content
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

fix(s3): KMS encryption works fine for server access logging target buckets #25350

Merged
merged 7 commits into from
May 24, 2023

Conversation

zdf1230
Copy link
Contributor

@zdf1230 zdf1230 commented Apr 28, 2023

The previous changes(#23514 & #23385) about failing early when certain encryption type being used is not correct. In fact, KMS encryption works fine for server access logging target buckets with proper permission being setup.

So this change is removing the condition failing for the SSE-KMS with customized encryption key case.

However, it is not possible to know which encryption type for the server access logging bucket, so the only checking can be applied after this change merged is failing when logging to self case using BucketEncryption.KMS_MANAGED.

After this fix, the only condition would be failed pre-checking is Log to self and using KMS_MANAGED encryption type

This change only fix the checking condition, so this change won't affect snapshot at all. Hence, Exemption Request.


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

gitpod-io bot commented Apr 28, 2023

@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Apr 28, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team April 28, 2023 04:22
@github-actions github-actions bot added the p2 label Apr 28, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

@zdf1230 zdf1230 marked this pull request as ready for review April 28, 2023 04:24
@zdf1230
Copy link
Contributor Author

zdf1230 commented Apr 28, 2023

As described in the description, this change only fix the checking condition, and won't affect snapshot generation at all. Hence, Exemption Request.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Apr 28, 2023
Copy link
Contributor

@corymhall corymhall left a comment

Choose a reason for hiding this comment

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

I think since we've had a couple of PRs that assert different behavior we need some more documentation/testing. Can you provide links to documentation the states that you can set up logging with a KMS encrypted bucket?

If it is indeed possible then can we somehow automatically setup the correct permissions to allow it? Can we also add an integration test to assert that it works?

@aws-cdk-automation aws-cdk-automation dismissed their stale review May 8, 2023 01:46

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mergify mergify bot dismissed corymhall’s stale review May 8, 2023 01:47

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 8, 2023
@zdf1230
Copy link
Contributor Author

zdf1230 commented May 8, 2023

I think since we've had a couple of PRs that assert different behavior we need some more documentation/testing. Can you provide links to documentation the states that you can set up logging with a KMS encrypted bucket?

If it is indeed possible then can we somehow automatically setup the correct permissions to allow it? Can we also add an integration test to assert that it works?

Thanks for the response. It is a very good point that we can automatically setup the correct permissions. Added that and the integration tests as well. Deployed in my personal account and verified it works.

Though I cannot find any doc shown that SSE-KMS works. But the reason I know it works fine because we original use SSE-KMS approach in our services. The previous change caused error when we build with newer version of aws-cdk. Hence I am here to fix this to enable us using latest version of aws-cdk

@mergify
Copy link
Contributor

mergify bot commented May 24, 2023

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 aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 24, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b547f75
  • 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 6c5b67e into aws:main May 24, 2023
@mergify
Copy link
Contributor

mergify bot commented May 24, 2023

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
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants