Handling Single Character Encryption¶
The FPE algorithm is not capable of encrypting single characters (such as 'a', '8', 'ñ'), and attempting to do so will result in an error. This limitation can cause issues for ETL processes, such as Databricks jobs, Streamsets pipelines reading data through Kafka or MongoDB and FEU & Discovery large files processing.
To address this problem, PEG can be updated to skip or ignore single characters and either return an empty value or the original input value after encryption/decryption when FPE is used. By default, the configuration setting is enabled to return the original value. If the return value is set to empty for encryption/decryption, then it will be non-recoverable. However, the behavior can be changed by modifying a configuration variable in the vars.peg.yml file.
Setup¶
To configure the handling of single characters in FPE, you can set the following properties in the vars.peg.yml
file:
Add or update the following properties:
YAML | |
---|---|
Property Name | Default | Description |
---|---|---|
PEG_V2_NATIVE_FPE_SKIP_SINGLE_CHAR | true | When value is true, skip encryption for single char when algo is FPE |
PEG_V2_NATIVE_FPE_SINGLE_CHAR_REPLACE | ORIGINAL | Configure return value for single char: - ORIGINAL: Return input value back after encryption/decryption - EMPTY: Return empty string which is not recoverable |