29#include <unordered_map>
45 static constexpr std::string_view kName =
"in-memory";
48 static constexpr std::string_view kKeyPropertyPrefix =
"encryption.in-memory-kms.key.";
51 explicit InMemoryKms(std::unordered_map<std::string, std::vector<uint8_t>> master_keys)
52 : master_keys_(
std::move(master_keys)) {}
59 const std::unordered_map<std::string, std::string>& properties)
override;
62 std::string_view wrapping_key_id)
override;
64 std::string_view wrapping_key_id)
override;
69 std::unordered_map<std::string, std::vector<uint8_t>> master_keys_;
KMS client with in-memory master keys. Not for production use.
Definition in_memory_kms.h:42
static void Register()
Register this client in KmsRegistry under kName.
Result< std::vector< uint8_t > > WrapKey(std::span< const uint8_t > key, std::string_view wrapping_key_id) override
Wrap (encrypt) a secret key with the master key wrapping_key_id.
Result< std::vector< uint8_t > > UnwrapKey(std::span< const uint8_t > wrapped_key, std::string_view wrapping_key_id) override
Unwrap a key returned by WrapKey.
Status Initialize(const std::unordered_map< std::string, std::string > &properties) override
Add master keys from encryption.in-memory-kms.key.<id> properties.
Wraps and unwraps secret keys with master keys kept in a KMS.
Definition key_management_client.h:45
Definition expected.h:1199
Define symbol visibility macros for bundled format integrations.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:34