public class SecurePassConfigProvider
extends java.lang.Object
implements org.apache.kafka.common.config.provider.ConfigProvider
ConfigProvider
that represents a Properties file.
SecurePassConfigProvider decrypts the 'values' in the properties file using EncryptionEngine.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_ENCRYPTION_KEY |
static java.lang.String |
MASTER_KEY_ENV_VAR |
static java.lang.String |
METADATA_KEY_LENGTH |
static java.lang.String |
METADATA_PREFIX |
Constructor and Description |
---|
SecurePassConfigProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(java.util.Map<java.lang.String,?> configs) |
org.apache.kafka.common.config.ConfigData |
get(java.lang.String path)
Retrieves the data at the given Properties file and decrypts the values using the CONFLUENT_MASTER_KEY.
|
org.apache.kafka.common.config.ConfigData |
get(java.lang.String path,
java.util.Set<java.lang.String> keys)
Retrieves the data with the given keys at the given Properties file and decrypts the values using the CONFLUENT_MASTER_KEY.
|
protected DecryptionEngine |
initializeDecryptionEngine(java.util.Properties properties) |
protected java.io.Reader |
reader(java.lang.String path) |
public static final java.lang.String DATA_ENCRYPTION_KEY
public static final java.lang.String MASTER_KEY_ENV_VAR
public static final java.lang.String METADATA_KEY_LENGTH
public static final java.lang.String METADATA_PREFIX
public void configure(java.util.Map<java.lang.String,?> configs)
configure
in interface org.apache.kafka.common.Configurable
protected DecryptionEngine initializeDecryptionEngine(java.util.Properties properties)
public org.apache.kafka.common.config.ConfigData get(java.lang.String path)
get
in interface org.apache.kafka.common.config.provider.ConfigProvider
path
- the file where the data residespublic org.apache.kafka.common.config.ConfigData get(java.lang.String path, java.util.Set<java.lang.String> keys)
get
in interface org.apache.kafka.common.config.provider.ConfigProvider
path
- the file where the data resideskeys
- the keys whose values will be retrievedprotected java.io.Reader reader(java.lang.String path) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable