Modify LogReader to print just the crypto params#2935
Merged
milleruntime merged 1 commit intoapache:mainfrom Sep 22, 2022
Merged
Modify LogReader to print just the crypto params#2935milleruntime merged 1 commit intoapache:mainfrom
milleruntime merged 1 commit intoapache:mainfrom
Conversation
* Added the -e option to LogReader to not read the whole WAL and just print the crypto params * Added a new check to PerTableCryptoIT that calls the LogReader to check for encryption present in the WALs * Also make the LogReader options extend ConfigOpts to allow passing in properties * Rename a test in CryptoTest
dlmarion
reviewed
Sep 20, 2022
| try { | ||
| input.readFully(magicBuffer); | ||
| if (Arrays.equals(magicBuffer, magic4)) { | ||
| byte[] cryptoParams = CryptoUtils.readParams(input); |
Contributor
There was a problem hiding this comment.
I wonder if you should throw a CryptoException here instead of letting this fall through to a RuntimeException. If you caught the CryptoException in the call to this method, then you could continue processing the next file after logging the error.
Contributor
Author
There was a problem hiding this comment.
It would be nice to throw a CryptoException when we are expecting a file to be encrypted and get an IOException. I am not sure if this is the best place though.
Contributor
Author
There was a problem hiding this comment.
I think improvements to the exception handling would be good to look at with the follow on task "Make CryptoException extend GeneralSecurityException" I mentioned in #2930
Contributor
Author
|
Full ITs passed in my fork. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.