-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-31603: [C++] Wrap Parquet encryption keys in SecureString #46017
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
5f73a1f
Wrap encryption keys in SecureString
EnricoMi 0456be4
Rename non-trivial SecureString methods
EnricoMi 689bc8d
Add mutable as_span method, add as_view
EnricoMi 42d7319
More tests
EnricoMi 01ab190
Change SecureClear(std::string&) to SecureClear(std::string*)
EnricoMi f3f4087
Decrypt key directly intoSecureString
EnricoMi f90f196
Remove const from KeyWithMasterId members
EnricoMi 0e74be5
Replace call-by-ref with call-by-value when copied
EnricoMi 29bc5e9
Use const for constants and construct SecureString from consts in tests
EnricoMi 75c1f0a
Inline IntegerKeyIdRetriever::GetKey(std::string) implementation
EnricoMi d3670d4
Add comment to `no_key`
EnricoMi adbbfc8
Revert `InternalFileDecryptor::RetrieveColumnKeyIfEmpty`
EnricoMi fe79da0
Remove `noexcept`
EnricoMi 6f5ef6c
Merge remote-tracking branch 'origin/main' into secure-string
EnricoMi db70c19
More secure cleared assertions on construction and assignment
EnricoMi d6f9ea9
Improve SecureString assignment tests
EnricoMi 510349c
More context on SecureClear code
EnricoMi 92a7980
Add SecureString implementation to arrow/util/
EnricoMi ec3c7c6
Merge branch 'main' into secure-string
EnricoMi d69f354
Merge branch 'secure-string-util' into secure-string
EnricoMi 219d207
Move to arrow::util::SecureString
EnricoMi 20d67b3
Fix import for memset_s, improve for loops in tests
EnricoMi 15f94c6
Address code review comments
EnricoMi 2a2ae81
Merge branch 'secure-string-util' into secure-string
EnricoMi 973b233
Test secure SecureString deconstruction
EnricoMi 9c88744
Test correctness of AssertSecurelyCleared
EnricoMi f3562f8
Rename SecureString argument to other
EnricoMi 9ee3e2c
Move std::move into secure_move, assert string ptr
EnricoMi 77e4e20
Add comments, fix linting
EnricoMi 1f42383
Improve assertions
EnricoMi 8d9c4f9
Use testing::AssertionResult rather than capturing assertions through…
EnricoMi 4297f0d
Expect string buffers larger than requested size
EnricoMi 064dfe7
Handle string buffers larger than init size
EnricoMi d4faa4f
Don't access deallocated memory in ASAN / Valgrind mode
EnricoMi 267626c
Fix SecureClear for non-local strings, stabalize mem assertions
EnricoMi 6995d36
Avoid assigning short string to long string in test
EnricoMi 03b1fef
Fix memory issues in tests
EnricoMi e7470cd
Improve comments
EnricoMi 8639235
Apply code review comments
EnricoMi 7f827ed
Merge remote-tracking branch 'origin/main' into secure-string-util
EnricoMi 0ec848c
Move SecureClear(std::string*) up in source file as well
EnricoMi 4336801
Merge branch 'secure-string-util' into secure-string
EnricoMi e11d223
Add back std::string methods as deprecated
EnricoMi ee284be
Merge remote-tracking branch 'origin/main' into secure-string
EnricoMi efd7cb9
Merge branch 'main' into secure-string
EnricoMi fb41244
Fix merge
EnricoMi fa9abed
Use const in favour of inline strings
EnricoMi 290449a
Remove deprecations to move users to more secure methods
EnricoMi 184afcf
Move no_key_ into encryption.cc
EnricoMi edd97b8
Rename no_key_
EnricoMi 0a31f50
Revert "Remove deprecations to move users to more secure methods"
EnricoMi 1987cda
Merge branch 'main' into secure-string
pitrou 04b15e2
Update deprecation notices
pitrou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This looked suspicious, all other setter methods check if the member is unset.
Here, the check is always true as it checks the input.
This is a breaking change if user code calls this setter twice with non-empty keys.
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.
I think you've corrected a bug; the intention with these setter methods seems to be one-time setting