java.lang.Object
io.confluent.kafka.schemaregistry.encryption.local.LocalKmsClient
All Implemented Interfaces:
com.google.crypto.tink.KmsClient

public final class LocalKmsClient extends Object implements com.google.crypto.tink.KmsClient
An implementation of local KmsClient for testing.
  • Field Details

  • Constructor Details

  • Method Details

    • doesSupport

      public boolean doesSupport(String uri)
      Specified by:
      doesSupport in interface com.google.crypto.tink.KmsClient
      Returns:
      true either if this client is a generic one and uri starts with PREFIX, or the client is a specific one that is bound to the key identified by uri.
    • withCredentials

      @CanIgnoreReturnValue public com.google.crypto.tink.KmsClient withCredentials(String credentialPath) throws GeneralSecurityException
      Loads credentials from a properties file.
      Specified by:
      withCredentials in interface com.google.crypto.tink.KmsClient
      Throws:
      GeneralSecurityException - if the client initialization fails
    • withDefaultCredentials

      @CanIgnoreReturnValue public com.google.crypto.tink.KmsClient withDefaultCredentials() throws GeneralSecurityException
      Loads default credentials.
      Specified by:
      withDefaultCredentials in interface com.google.crypto.tink.KmsClient
      Throws:
      GeneralSecurityException - if the client initialization fails
    • getAead

      public com.google.crypto.tink.Aead getAead(String uri) throws GeneralSecurityException
      Specified by:
      getAead in interface com.google.crypto.tink.KmsClient
      Throws:
      GeneralSecurityException