public class KeyProviderFactory extends Object
KeyProvider instances. Currently supports StaticKeyProvider and FileBasedKeyProvider.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
KeyProviderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static KeyProvider |
buildKeyProvider(RepositoryEncryptionConfiguration rec,
SecretKey masterKey)
Returns a key provider instantiated from the configuration values in a
RepositoryEncryptionConfiguration object. |
static KeyProvider |
buildKeyProvider(String implementationClassName,
String keyProviderLocation,
String keyId,
Map<String,String> encryptionKeys,
SecretKey masterKey)
Returns a key provider instantiated from the configuration values in a
RepositoryEncryptionConfiguration object. |
static boolean |
requiresMasterKey(String implementationClassName)
Returns true if this
KeyProvider implementation requires the presence of the master key in order to decrypt the available data encryption keys. |
public static KeyProvider buildKeyProvider(RepositoryEncryptionConfiguration rec, SecretKey masterKey) throws KeyManagementException
RepositoryEncryptionConfiguration object.rec - the data container for config values (usually extracted from NiFiProperties)masterKey - the master key used to decrypt wrapped keysKeyManagementException - if the key provider cannot be instantiatedpublic static KeyProvider buildKeyProvider(String implementationClassName, String keyProviderLocation, String keyId, Map<String,String> encryptionKeys, SecretKey masterKey) throws KeyManagementException
RepositoryEncryptionConfiguration object.implementationClassName - the key provider class namekeyProviderLocation - the filepath/URL of the stored keyskeyId - the active key idencryptionKeys - the available encryption keysmasterKey - the master key used to decrypt wrapped keysKeyManagementException - if the key provider cannot be instantiatedpublic static boolean requiresMasterKey(String implementationClassName) throws KeyManagementException
KeyProvider implementation requires the presence of the master key in order to decrypt the available data encryption keys.implementationClassName - the key provider implementation classKeyManagementException - if the provided class name is not a valid key provider implementationCopyright © 2020 Apache NiFi Project. All rights reserved.