Class GcpKeyManagementClient

java.lang.Object
org.apache.iceberg.gcp.GcpKeyManagementClient
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, org.apache.iceberg.encryption.KeyManagementClient

public class GcpKeyManagementClient extends Object implements org.apache.iceberg.encryption.KeyManagementClient
Key management client implementation that uses Google Cloud Key Management. To be used for encrypting/decrypting keys with a KMS-managed master key (by referencing its key ID)

Uses GcpKeyManagementClient.ByteStringShim to ensure this class works with and without iceberg-gcp-bundle. Since the bundle relocates ByteString, all related methods need to be loaded dynamically. During runtime if the relocated class is observed, it will be preferred over the original one.

See Also:
  • Constructor Details

    • GcpKeyManagementClient

      public GcpKeyManagementClient()
  • Method Details

    • initialize

      public void initialize(Map<String,String> properties)
      Specified by:
      initialize in interface org.apache.iceberg.encryption.KeyManagementClient
    • wrapKey

      public ByteBuffer wrapKey(ByteBuffer key, String wrappingKeyId)
      Specified by:
      wrapKey in interface org.apache.iceberg.encryption.KeyManagementClient
    • unwrapKey

      public ByteBuffer unwrapKey(ByteBuffer wrappedKey, String wrappingKeyId)
      Specified by:
      unwrapKey in interface org.apache.iceberg.encryption.KeyManagementClient
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.iceberg.encryption.KeyManagementClient