Add decryption functionality to presto#17728
Add decryption functionality to presto#17728shangxinli wants to merge 1 commit intoprestodb:masterfrom
Conversation
18e2f98 to
3535aa3
Compare
|
@beinan @zhenxiao I just opened this new PR because of the conflict. I close the old PR. BTW, the CI build sometime has the error 'No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration.', which seems unrelated to my change. Please let me know if this is not the case. |
4932cb3 to
3283ad8
Compare
zhenxiao
left a comment
There was a problem hiding this comment.
nice work, @shangxinli
mostly looks good. A few minor things
There was a problem hiding this comment.
is it possible we import MAGIC and EMAGIC from Parquet code?
There was a problem hiding this comment.
I think we can do.
There was a problem hiding this comment.
how about we add comment for aad:
additional authenticated data for AES cipher
There was a problem hiding this comment.
Good idea! Just added for this one and PageReader.java
There was a problem hiding this comment.
the comment is misleading, how about:
detect files not encrypted but with fileDecryptor set
There was a problem hiding this comment.
Changed it to 'Detect that the file is not encrypted by mistake'.
There was a problem hiding this comment.
how about adding comment to this case:
plaintext footer, with file is crypt
There was a problem hiding this comment.
Added the comments "Reader attached fileDecryptor. The file could be encrypted with plaintext footer or the whole file is plaintext".
There was a problem hiding this comment.
keep this line before encryptedFooter and fileDecryptor check
There was a problem hiding this comment.
shall we add a log in case of KeyAccessDeniedException?
There was a problem hiding this comment.
Yeah, Let me figure out how to add it. Not see log4j being used in Presto-Parquet project.
There was a problem hiding this comment.
It seems we need to add the following dependency to the subproject if we want to log in presto-parquet. I am afraid of doing that because just for adding this line of log, we need to add a new dependency. Please let me know you. thoughts
com.facebook.airlift logThere was a problem hiding this comment.
static import AesCipher.NONCE_LENGTH and AesCipher.GCM_TAG_LENGTH?
There was a problem hiding this comment.
put final variables together
There was a problem hiding this comment.
s/colDecSetup/columnDecryption/g
beinan
left a comment
There was a problem hiding this comment.
lgtm except a couple of very minor issues
There was a problem hiding this comment.
unnecessary this
| return this.fileName; | |
| return fileName; |
There was a problem hiding this comment.
inline fileSize?
| long fileSize = path.getFileSystem(new Configuration()).getFileStatus(path).getLen(); | |
| return fileSize; | |
| return path.getFileSystem(new Configuration()).getFileStatus(path).getLen(); |
There was a problem hiding this comment.
unnecessary this
| throw new HiddenColumnException(this.path.toArray(), this.filePath); | |
| throw new HiddenColumnException(path.toArray(), filePath); |
There was a problem hiding this comment.
| if (null != headerBlockDecryptor) { | |
| if (headerBlockDecryptor != null) { |
|
I just created a very simple PR and then revert it. So everything should pass, but I still get the same error "ci/circleci: Build Error". I assume this error is not related to my change. Given all other tests and checks passed, I assume my change should be clean now. Let me know if this is not the case. |
|
hi @shangxinli I think your code should be good. While, we do require all tests passed before any code could merge. Could you please squash all commits into one, and submit under this PR again? |
Co-authored-by: ggershinsky <ggershinsky@users.noreply.github.com> Summary: This is to port parquet-mr decryption funtionality. The main commits in parquet-mr for encryption/decryption are apache/parquet-java@65b95fb and several other fixes. This change only port the decryption only.
56031ca to
475c896
Compare
|
the ci/circleci is still failing, hmmm I cannot rerun this one. But the code looks good to me. @zhenxiao are you able to rerun the ci/circleci? |
|
the same to me. Could not rerun it. maybe we submit the code as a new PR, and see how it goes? @shangxinli @beinan |
|
@zhenxiao I have created another PR with no change. The ci/circleci still failed. @aweisberg Can you help with the ci/circleci issue? @mshang816 Do you think it could be related to 59f86ca? |
|
Re-created a new PR #17791 |
Co-authored-by: ggershinsky ggershinsky@users.noreply.github.com
Summary: This is to port parquet-mr decryption funtionality. The main commits in parquet-mr for encryption/decryption is apache/parquet-java@65b95fb and several other fixes. This change only port the decryption only.
Test plan - (Please fill in how you tested your changes)
Please make sure your submission complies with our Development, Formatting, and Commit Message guidelines. Don't forget to follow our attribution guidelines for any code copied from other projects.
Fill in the release notes towards the bottom of the PR description.
See Release Notes Guidelines for details.
If release note is NOT required, use: