-
Notifications
You must be signed in to change notification settings - Fork 361
(WIP) Remove KMS policies when KMS is not configured #3445
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
Conversation
| if (hasCurrentKey || hasAllowedKeys) { | ||
| policyBuilder.addStatement(allowKms.build()); | ||
| } else if (!canWrite) { | ||
| } else if (!canWrite && region != null && accountId != null) { |
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.
It looks like this else condition will now be evaluated when hasCurrentKey == true and hasAllowedKeys == false, but it was not evaluated in that case before 🤔 WDYT?
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.
Thanks for the quick review @dimas-b and that is a fair point which I missed. It appears this is really specific for handling s3 and s3-compatible and I am not sure if the above logic will break or not due to lack of infra to test. I had made the needed code changes to preserve this workflow. Please take another look when you get a chance.
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.
thx - LGTM 👍
|
CC: @fabio-rizzo-01 |
| if (currentMetadata != null) { | ||
| tableFileIO = | ||
| loadFileIOForTableLike( |
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.
How is that related to KMS policies?
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.
If it's just a parallel bugfix, I'd prefer to make it in a separate PR for the sake of clarity 🤔 WDYT?
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.
Appear to be a parallel bug. I am waiting for testing from reporter then I can split this into two PRs. Currently if we merged current PR, it will trigger diff error from reporter.
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.
sounds good - thx!
|
Close this one and opened three different PRs for easier review: |
This PR addressed issues reported in #3440 where when end-user is not using KMS encryption for S3, Polaris still enforces in-lines policies which contains KMS related policies. While fixing this issue, I noticed our read-only policy for kMS is a bit too wide where
GenerateDataKeyandGenerateDataKeyWithoutPlaintextshould be belongs to write operation instead of read. Thus, this PR also addresses this issue.Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)