Class ApplicationPropertiesFileTransformer
java.lang.Object
org.apache.nifi.toolkit.config.transformer.ApplicationPropertiesFileTransformer
- All Implemented Interfaces:
FileTransformer
File Transformer supporting transformation of Application Properties with sensitive property values
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ApplicationPropertiesprivate static final intprivate final SensitivePropertyProviderprivate static final Patternprivate static final charprivate static final int -
Constructor Summary
ConstructorsConstructorDescriptionApplicationPropertiesFileTransformer(ApplicationProperties applicationProperties, SensitivePropertyProvider outputSensitivePropertyProvider, Set<String> sensitivePropertyNames) Application Properties File Transformer uses provided Application Properties as the source of protected values -
Method Summary
Modifier and TypeMethodDescriptionprivate voidtransform(BufferedReader reader, BufferedWriter writer) voidTransform input application properties using configured Sensitive Property Provider and write output propertiesprivate voidwriteProtectedProperty(BufferedWriter writer, String name, String value)
-
Field Details
-
PROPERTY_VALUE_PATTERN
-
NAME_GROUP
private static final int NAME_GROUP- See Also:
-
VALUE_GROUP
private static final int VALUE_GROUP- See Also:
-
PROPERTY_VALUE_SEPARATOR
private static final char PROPERTY_VALUE_SEPARATOR- See Also:
-
applicationProperties
-
outputSensitivePropertyProvider
-
sensitivePropertyNames
-
-
Constructor Details
-
ApplicationPropertiesFileTransformer
public ApplicationPropertiesFileTransformer(ApplicationProperties applicationProperties, SensitivePropertyProvider outputSensitivePropertyProvider, Set<String> sensitivePropertyNames) Application Properties File Transformer uses provided Application Properties as the source of protected values- Parameters:
applicationProperties- Application Properties containing decrypted source property valuesoutputSensitivePropertyProvider- Sensitive Property Provider encrypts specified sensitive property valuessensitivePropertyNames- Sensitive Property Names marked for encryption
-
-
Method Details
-
transform
Transform input application properties using configured Sensitive Property Provider and write output properties- Specified by:
transformin interfaceFileTransformer- Parameters:
inputPath- Input file path to be transformed containing source application propertiesoutputPath- Output file path for protected application properties- Throws:
IOException- Thrown on transformation failures
-
transform
- Throws:
IOException
-
writeProtectedProperty
private void writeProtectedProperty(BufferedWriter writer, String name, String value) throws IOException - Throws:
IOException
-