|
iceberg-cpp
|
Creates KMS clients by name. More...
#include <key_management_client.h>
Public Types | |
| using | Properties = std::unordered_map< std::string, std::string > |
| using | Factory = std::function< Result< std::unique_ptr< KeyManagementClient > >()> |
Static Public Member Functions | |
| static void | Register (std::string name, Factory factory) |
Register a client factory under name, replacing any previous one. | |
| static Result< std::shared_ptr< KeyManagementClient > > | Load (std::string_view name, const Properties &properties) |
Create and initialize the client registered under name. | |
| static Result< std::shared_ptr< KeyManagementClient > > | FromCatalogProperties (const Properties &properties) |
| Create the KMS client configured by catalog properties. | |
Creates KMS clients by name.
Catalogs create their KMS client from the catalog properties, with the same property names as Java:
encryption.kms-type: a built-in client, aws, gcp or azure;encryption.kms-impl: the name a custom client was registered under.Java has no built-in clients yet and rejects every encryption.kms-type (EncryptionUtil.createKmsClient); here the type names resolve through the same registry, so a client registered under one of them is used.
Built-in clients register themselves when their library is linked and initialized; applications register custom clients before creating catalogs.
|
static |
Create the KMS client configured by catalog properties.
encryption.kms-type nor encryption.kms-impl is set.
|
static |
Register a client factory under name, replacing any previous one.
An empty factory is accepted here but makes the corresponding Load fail with an invalid-argument error rather than being invoked.