@@ -44,12 +44,19 @@ class PARQUET_EXPORT FileKeyUnwrapper : public DecryptionKeyRetriever {
4444 // / KmsClient in the cache.
4545 // / If the file uses external key material then the Parquet file path and file
4646 // / system must be specified.
47+ FileKeyUnwrapper (std::shared_ptr<KeyToolkit> key_toolkit,
48+ const KmsConnectionConfig& kms_connection_config,
49+ double cache_lifetime_seconds, const std::string& file_path = " " ,
50+ const std::shared_ptr<::arrow::fs::FileSystem>& file_system = NULLPTR );
51+
52+ // / Constructor overload that takes a raw pointer to the KeyToolkit
4753 FileKeyUnwrapper (KeyToolkit* key_toolkit,
4854 const KmsConnectionConfig& kms_connection_config,
4955 double cache_lifetime_seconds, const std::string& file_path = " " ,
5056 const std::shared_ptr<::arrow::fs::FileSystem>& file_system = NULLPTR );
5157
52- // / Constructor overload that accepts an existing key_material_store rather than using
58+ // / Constructor overload that takes a raw pointer to the KeyToolkit and
59+ // / accepts an existing key_material_store rather than using
5360 // / the file path and file system to create one when needed. This is useful for key
5461 // / rotation to allow accessing the key material store after it is used.
5562 FileKeyUnwrapper (KeyToolkit* key_toolkit,
@@ -69,6 +76,7 @@ class PARQUET_EXPORT FileKeyUnwrapper : public DecryptionKeyRetriever {
6976
7077 // / A map of Key Encryption Key (KEK) ID -> KEK bytes, for the current token
7178 std::shared_ptr<::arrow::util::ConcurrentMap<std::string, std::string>> kek_per_kek_id_;
79+ std::shared_ptr<KeyToolkit> key_toolkit_owner_ = NULLPTR ;
7280 KeyToolkit* key_toolkit_;
7381 KmsConnectionConfig kms_connection_config_;
7482 const double cache_entry_lifetime_seconds_;
0 commit comments