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 rootKey)
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 rootKey)
Returns a key provider instantiated from the configuration values in a
RepositoryEncryptionConfiguration object. |
static boolean |
requiresRootKey(String implementationClassName)
Returns true if this
KeyProvider implementation requires the presence of the root key in order to decrypt the available data encryption keys. |
public static KeyProvider buildKeyProvider(RepositoryEncryptionConfiguration rec, SecretKey rootKey) throws KeyManagementException
RepositoryEncryptionConfiguration object.rec - the data container for config values (usually extracted from NiFiProperties)rootKey - the root 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 rootKey) throws KeyManagementException
RepositoryEncryptionConfiguration object.implementationClassName - the key provider class namekeyProviderLocation - the filepath/URL of the stored keyskeyId - the active key idencryptionKeys - the available encryption keysrootKey - the root key used to decrypt wrapped keysKeyManagementException - if the key provider cannot be instantiatedpublic static boolean requiresRootKey(String implementationClassName) throws KeyManagementException
KeyProvider implementation requires the presence of the root 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 © 2021 Apache NiFi Project. All rights reserved.