Class LocalKmsClient
java.lang.Object
io.confluent.kafka.schemaregistry.encryption.local.LocalKmsClient
- All Implemented Interfaces:
com.google.crypto.tink.KmsClient
An implementation of local
KmsClient for testing.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoesSupport(String uri) com.google.crypto.tink.Aeadcom.google.crypto.tink.KmsClientwithCredentials(String credentialPath) Loads credentials from a properties file.com.google.crypto.tink.KmsClientLoads default credentials.
-
Field Details
-
PREFIX
The prefix of all keys stored in Local KMS.- See Also:
-
-
Constructor Details
-
LocalKmsClient
- Throws:
GeneralSecurityException
-
-
Method Details
-
doesSupport
- Specified by:
doesSupportin interfacecom.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 byuri.
-
withCredentials
@CanIgnoreReturnValue public com.google.crypto.tink.KmsClient withCredentials(String credentialPath) throws GeneralSecurityException Loads credentials from a properties file.- Specified by:
withCredentialsin interfacecom.google.crypto.tink.KmsClient- Throws:
GeneralSecurityException- if the client initialization fails
-
withDefaultCredentials
@CanIgnoreReturnValue public com.google.crypto.tink.KmsClient withDefaultCredentials() throws GeneralSecurityExceptionLoads default credentials.- Specified by:
withDefaultCredentialsin interfacecom.google.crypto.tink.KmsClient- Throws:
GeneralSecurityException- if the client initialization fails
-
getAead
- Specified by:
getAeadin interfacecom.google.crypto.tink.KmsClient- Throws:
GeneralSecurityException
-