adamreeve commented on code in PR #40329:
URL: https://github.com/apache/arrow/pull/40329#discussion_r1523960201
##########
cpp/src/parquet/encryption/crypto_factory.cc:
##########
@@ -172,8 +201,8 @@ std::shared_ptr<FileDecryptionProperties>
CryptoFactory::GetFileDecryptionProper
const KmsConnectionConfig& kms_connection_config,
const DecryptionConfiguration& decryption_config, const std::string&
file_path,
const std::shared_ptr<::arrow::fs::FileSystem>& file_system) {
- auto key_retriever = std::make_shared<FileKeyUnwrapper>(
- &key_toolkit_, kms_connection_config,
decryption_config.cache_lifetime_seconds,
+ auto key_retriever = std::make_shared<CryptoFactoryFileKeyRetriever>(
Review Comment:
My comment might have been a bit unclear, I didn't mean to suggest that it's
an issue that the decryption properties can be reused without cloning first.
The comment here might clarify things:
https://github.com/apache/arrow/blob/bd3fab4333f9e95680f5ed0cd931455e323e6e27/cpp/src/parquet/encryption/encryption.h#L365-L371
When using `FileDecryptionProperties` from a `CryptoFactory`, the condition
that "this object keeps the keyRetrieval callback only, and no explicit keys or
aadPrefix" is met, so using `DeepClone` isn't necessary and one instance of
`FileDecryptionProperties` can be used for multiple files, but I don't think
that's a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]