Package io.confluent.dekregistry.client
Class MockDekRegistryClient
java.lang.Object
io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient
io.confluent.dekregistry.client.MockDekRegistryClient
- All Implemented Interfaces:
DekRegistryClient,SchemaRegistryClient,SchemaVersionFetcher,Closeable,AutoCloseable
-
Field Summary
FieldsFields inherited from interface io.confluent.dekregistry.client.DekRegistryClient
LATEST_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionMockDekRegistryClient(Map<String, ?> configs) MockDekRegistryClient(Map<String, ?> configs, List<SchemaProvider> providers) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createDek(String kekName, String subject, int version, DekFormat algorithm, String encryptedKeyMaterial) createDek(String kekName, String subject, int version, DekFormat algorithm, String encryptedKeyMaterial, boolean deleted) createDek(String kekName, String subject, int version, DekFormat algorithm, String encryptedKeyMaterial, boolean deleted, boolean rewrap) createKek(String name, String kmsType, String kmsKeyId, Map<String, String> kmsProps, String doc, boolean shared) createKek(String name, String kmsType, String kmsKeyId, Map<String, String> kmsProps, String doc, boolean shared, boolean deleted) voidvoiddeleteDekVersion(String kekName, String subject, int version, DekFormat algorithm, boolean permanentDelete) voidprotected CryptorgetCryptor(DekFormat dekFormat) getDekLatestVersion(String kekName, String subject, DekFormat algorithm, boolean lookupDeleted) getDekVersion(String kekName, String subject, int version, DekFormat algorithm, boolean lookupDeleted) listDekVersions(String kekName, String subject, DekFormat algorithm, boolean lookupDeleted) listKeks(boolean lookupDeleted) protected Dekprotected DekmaybeGenerateRawDek(Dek key) voidreset()com.google.common.base.Tickerticker()voidundeleteDek(String kekName, String subject, DekFormat algorithm) voidundeleteDekVersion(String kekName, String subject, int version, DekFormat algorithm) voidundeleteKek(String kekName) Methods inherited from class io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient
addProviders, createAssociation, createOrUpdateAssociation, deleteAssociations, deleteSchemaVersion, deleteSchemaVersion, deleteSubject, deleteSubject, getAllContexts, getAllSubjects, getAllSubjectsById, getAllSubjectsByPrefix, getAllVersions, getAllVersionsById, getAssociationsByResourceId, getAssociationsByResourceName, getAssociationsBySubject, getByVersion, getConfig, getGuid, getGuid, getId, getId, getIdWithResponse, getLatestSchemaMetadata, getLatestWithMetadata, getMode, getMode, getProviders, getSchemaByGuid, getSchemaById, getSchemaBySubjectAndId, getSchemaMetadata, getSchemaMetadata, getSchemaRegistryDeployment, getSchemas, getVersion, getVersion, parseSchema, parseSchema, register, register, register, registerWithResponse, setMode, setMode, setMode, testCompatibility, testCompatibilityVerbose, updateConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.dekregistry.client.DekRegistryClient
testKekMethods inherited from interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
deleteCompatibility, deleteConfig, deleteMode, deleteSchemaVersion, deleteSchemaVersion, deleteSubject, deleteSubject, getAllSubjects, getAllVersions, getById, getByID, getBySubjectAndId, getBySubjectAndID, getCompatibility, getId, getSchemaRegistryServerVersion, getVersion, mutateAssociations, parseSchema, parseSchemaOrElseThrow, register, register, registerWithResponse, tenant, testCompatibility, testCompatibilityVerbose, updateCompatibility
-
Field Details
-
EMPTY_AAD
public static final byte[] EMPTY_AAD
-
-
Constructor Details
-
MockDekRegistryClient
-
MockDekRegistryClient
-
-
Method Details
-
getCryptor
-
ticker
public com.google.common.base.Ticker ticker()- Specified by:
tickerin interfaceDekRegistryClient- Specified by:
tickerin interfaceSchemaRegistryClient
-
listKeks
- Specified by:
listKeksin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
listKeks
public List<String> listKeks(List<String> subjectPrefix, boolean lookupDeleted) throws IOException, RestClientException - Specified by:
listKeksin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
listDekVersions
public List<Integer> listDekVersions(String kekName, String subject, DekFormat algorithm, boolean lookupDeleted) throws IOException, RestClientException - Specified by:
listDekVersionsin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
getKek
- Specified by:
getKekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
listDeks
public List<String> listDeks(String kekName, boolean lookupDeleted) throws IOException, RestClientException - Specified by:
listDeksin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
getDek
public Dek getDek(String kekName, String subject, DekFormat algorithm, boolean lookupDeleted) throws IOException, RestClientException - Specified by:
getDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
getDekVersion
public Dek getDekVersion(String kekName, String subject, int version, DekFormat algorithm, boolean lookupDeleted) throws IOException, RestClientException - Specified by:
getDekVersionin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
getDekLatestVersion
public Dek getDekLatestVersion(String kekName, String subject, DekFormat algorithm, boolean lookupDeleted) throws IOException, RestClientException - Specified by:
getDekLatestVersionin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
createKek
public Kek createKek(String name, String kmsType, String kmsKeyId, Map<String, String> kmsProps, String doc, boolean shared) throws IOException, RestClientException- Specified by:
createKekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
createKek
public Kek createKek(String name, String kmsType, String kmsKeyId, Map<String, String> kmsProps, String doc, boolean shared, boolean deleted) throws IOException, RestClientException- Specified by:
createKekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
createDek
public Dek createDek(String kekName, String subject, DekFormat algorithm, String encryptedKeyMaterial) throws IOException, RestClientException - Specified by:
createDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
createDek
public Dek createDek(String kekName, String subject, int version, DekFormat algorithm, String encryptedKeyMaterial) throws IOException, RestClientException - Specified by:
createDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
createDek
public Dek createDek(String kekName, String subject, int version, DekFormat algorithm, String encryptedKeyMaterial, boolean deleted) throws IOException, RestClientException - Specified by:
createDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
createDek
public Dek createDek(String kekName, String subject, int version, DekFormat algorithm, String encryptedKeyMaterial, boolean deleted, boolean rewrap) throws IOException, RestClientException - Specified by:
createDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
maybeGenerateEncryptedDek
- Throws:
IOExceptionRestClientException
-
maybeGenerateRawDek
- Throws:
IOExceptionRestClientException
-
updateKek
public Kek updateKek(String name, Map<String, String> kmsProps, String doc, Boolean shared) throws IOException, RestClientException- Specified by:
updateKekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
deleteKek
public void deleteKek(String kekName, boolean permanentDelete) throws IOException, RestClientException - Specified by:
deleteKekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
deleteDek
public void deleteDek(String kekName, String subject, DekFormat algorithm, boolean permanentDelete) throws IOException, RestClientException - Specified by:
deleteDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
deleteDekVersion
public void deleteDekVersion(String kekName, String subject, int version, DekFormat algorithm, boolean permanentDelete) throws IOException, RestClientException - Specified by:
deleteDekVersionin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
undeleteKek
- Specified by:
undeleteKekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
undeleteDek
public void undeleteDek(String kekName, String subject, DekFormat algorithm) throws IOException, RestClientException - Specified by:
undeleteDekin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
undeleteDekVersion
public void undeleteDekVersion(String kekName, String subject, int version, DekFormat algorithm) throws IOException, RestClientException - Specified by:
undeleteDekVersionin interfaceDekRegistryClient- Throws:
IOExceptionRestClientException
-
reset
public void reset()- Specified by:
resetin interfaceDekRegistryClient- Specified by:
resetin interfaceSchemaRegistryClient- Overrides:
resetin classMockSchemaRegistryClient
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceDekRegistryClient- Specified by:
closein interfaceSchemaRegistryClient
-