-
Notifications
You must be signed in to change notification settings - Fork 0
[Abandoned-Replaced] Machinery for loading of dynamic libraries. #36
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
…yptor related stuff. Begin moving things around.
…. It has its own .so file now.
…s is done to facilitate testing
…ry_wrapper now pass.
…ry_wrapper now pass.
…ader stuff - needed for refactoring
…of DBPALibraryWrapper
…f LoadableEncryptorInterface
…brary stuff with arrow-provided libraries.
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or See also: |
avalerio-tkd
left a comment
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 changes. The PR quite large. I gave it an initial look and we can discuss further offline for my comments or to dig dipper.
| ) | ||
|
|
||
| # DBPATestAgent configuration | ||
| target_link_libraries(DBPATestAgent PUBLIC |
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.
Are these "test" targets the unittests for the loading module or a temporary testing module we're adding as an intermediate step?
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 is a test target for unit testing. The library build here will never be 'released' (this is the reason that the library does not have an 'install' target)
| const KmsConnectionConfig& kms_connection_config, | ||
| const DecryptionConfiguration& decryption_config, const std::string& file_path, | ||
| const std::shared_ptr<::arrow::fs::FileSystem>& file_system) { | ||
| std::cout << "Getting file decryption properties!!" << std::endl; |
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.
Add TODO note to remove printouts or move to logging.debug. Same elsewhere.
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.
file should not be here, but will do where pertinent.
|
|
||
| int32_t ExternalDecryptorImpl::Decrypt(span<const uint8_t> ciphertext, span<const uint8_t> key, | ||
| span<const uint8_t> aad, span<uint8_t> plaintext) { | ||
| std::cout << "ExternalDecryptorImpl::Decrypt called" << std::endl; |
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.
Now that I'm thinking: Are these your comments or some printouts you inherited when rebasing your client. If these are not yours, may be you'd like to rebase again so the diff are only your changes?
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.
yeah. There was a bit of github trickery that went into this PR. There are a lot more diffs than I would have expected - not because of file changes, but because of my branching setup + added to this: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests
| std::cout << "Here I would call the external decryption service. Hold for params." << std::endl; | ||
| } | ||
|
|
||
|
|
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.
Nit: extra whitespaces. Same elsewhere.
| @@ -0,0 +1,47 @@ | |||
| // Licensed to the Apache Software Foundation (ASF) under one | |||
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'd remove the license note for now and replace with a TODO to find the right License note later. We can also put something in the backlog regarding this if you'd like.
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.
Good call. Will do. Both.
| @@ -0,0 +1,95 @@ | |||
| // Licensed to the Apache Software Foundation (ASF) under one | |||
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.
Same here for the license.
|
|
||
| // Interface for loadable encryptors that can be dynamically loaded from shared libraries | ||
| // This extends the base EncryptorInterface with initialization capabilities | ||
| class PARQUET_EXPORT LoadableEncryptorInterface : public parquet::encryption::EncryptorInterface { |
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.
Is this the EncryptorInterface from the mini-app initial refactor, or is this a new one? Should this be added when the refactor is done instead of here?
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 should not be here.
| encryption_properties->app_context(), false); | ||
| } else { | ||
| //TODO: move this elsewhere. | ||
| bool use_dll_encryptor = false; |
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 is a bit hardcoded at the moment it seems. It's ok if it is, let's just add a short comment on what should look like when integrated with dev_phase2 branch.
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.
will do.
|
Thanks for the comments, @avalerio-tkd. I'm closing this PR, as it contains more files than it should and the PR is a bit messy, I'll admit. (I'm blaming the tooling this time). Will address your comments and send out a new, cleaner PR. This is the new PR: #37 |
Rationale for this change
In this PR, I'm creating the machinery (utils classes) for
These changes are described in this doc
What changes are included in this PR?
io_util.cc- the same file which already contained functionality for dealing with dynamic libraries.Are these changes tested?
Additional Notes
DataBatchProtectionAgentInterfaceis still being worked on. I have created a temporary interface (parquet/encryption/external/DBPAInterface.h), which hopefully is close-enough to the final version. Once the interface is finalized, we will incorporate it here, and send the final PR.dev_dll_work(feature branch) anddev-miniappDockerfile.miniApp,build-clean.sh,build.sh,build-tests.shinternal_file_encryptor.cc- this diff will dissappear in the final (i.e. non-draft) PR.