Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-28 08:26:58

0001 // Licensed to the Apache Software Foundation (ASF) under one
0002 // or more contributor license agreements.  See the NOTICE file
0003 // distributed with this work for additional information
0004 // regarding copyright ownership.  The ASF licenses this file
0005 // to you under the Apache License, Version 2.0 (the
0006 // "License"); you may not use this file except in compliance
0007 // with the License.  You may obtain a copy of the License at
0008 //
0009 //   http://www.apache.org/licenses/LICENSE-2.0
0010 //
0011 // Unless required by applicable law or agreed to in writing,
0012 // software distributed under the License is distributed on an
0013 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
0014 // KIND, either express or implied.  See the License for the
0015 // specific language governing permissions and limitations
0016 // under the License.
0017 
0018 #pragma once
0019 
0020 #include "arrow/dataset/type_fwd.h"
0021 
0022 namespace parquet::encryption {
0023 class CryptoFactory;
0024 struct KmsConnectionConfig;
0025 struct EncryptionConfiguration;
0026 struct DecryptionConfiguration;
0027 }  // namespace parquet::encryption
0028 
0029 namespace arrow {
0030 namespace dataset {
0031 
0032 /// \brief Core configuration class encapsulating parameters for high-level encryption
0033 /// within Parquet framework.
0034 ///
0035 /// ParquetEncryptionConfig serves as a bridge, passing encryption-related
0036 /// parameters to appropriate components within the Parquet library. It holds references
0037 /// to objects defining encryption strategy, Key Management Service (KMS) configuration,
0038 /// and specific encryption configurations for Parquet data.
0039 struct ARROW_DS_EXPORT ParquetEncryptionConfig {
0040   ///  Shared pointer to CryptoFactory object, responsible for creating cryptographic
0041   ///  components like encryptors and decryptors.
0042   std::shared_ptr<parquet::encryption::CryptoFactory> crypto_factory;
0043 
0044   ///  Shared pointer to KmsConnectionConfig object, holding configuration parameters for
0045   ///  connecting to a Key Management Service (KMS).
0046   std::shared_ptr<parquet::encryption::KmsConnectionConfig> kms_connection_config;
0047 
0048   ///  Shared pointer to EncryptionConfiguration object, defining specific encryption
0049   ///  settings for Parquet data, like keys for different columns.
0050   std::shared_ptr<parquet::encryption::EncryptionConfiguration> encryption_config;
0051 };
0052 
0053 /// \brief Core configuration class encapsulating parameters for high-level decryption
0054 /// within Parquet framework.
0055 ///
0056 /// ParquetDecryptionConfig is designed to pass decryption-related parameters to
0057 /// appropriate decryption components within Parquet library. It holds references to
0058 /// objects defining decryption strategy, Key Management Service (KMS) configuration,
0059 /// and specific decryption configurations for reading encrypted Parquet data.
0060 struct ARROW_DS_EXPORT ParquetDecryptionConfig {
0061   ///  Shared pointer to CryptoFactory object, pivotal in creating cryptographic
0062   ///  components for decryption process.
0063   std::shared_ptr<parquet::encryption::CryptoFactory> crypto_factory;
0064 
0065   ///  Shared pointer to KmsConnectionConfig object, containing parameters for connecting
0066   ///  to a Key Management Service (KMS) during decryption.
0067   std::shared_ptr<parquet::encryption::KmsConnectionConfig> kms_connection_config;
0068 
0069   ///  Shared pointer to DecryptionConfiguration object, specifying decryption settings
0070   ///  for reading encrypted Parquet data.
0071   std::shared_ptr<parquet::encryption::DecryptionConfiguration> decryption_config;
0072 };
0073 
0074 }  // namespace dataset
0075 }  // namespace arrow