This type of masking is useful if you want to mask the JSON data. The reason behind using this masking is to preserve the format of data, even after you have applied masking.
If you will mask the data using another masking option than JSON, then the format of the data is hampered, as every single character in the data will be treated as text while masking.
E.g., in the below image, when Character Masking is applied, then every character including Space in the JSON structure is treated as text and is masked using the ‘#’ (Hash) value.
In JSON masking, specify the key path based on which masking takes place in the JSON structure. A particular sub-element is selected by the means of keypath in JSON data. This is the reason when JSON masking is applied, the format of the data is preserved, as only selected information in the structure is masked.
Features of JSON masking:
This masking is supported for Clob, Varchar, Varchar (MAX), NVarchar(MAX) and Text datatypes.
CUPS and SL features are not supported.
*Note: To implement JSON masking for Oracle, make sure that the All-masking-functions-X.Y.Z-all.jar is loaded.
To apply JSON masking, enter the following:
The top panel displays the structure of JSON data with parent and child relationship. To view the sub elements, i.e., child, in the structure, click icon next to each element. This will display the detail of the text content all child’s or sub child’s have details and the attributes, if any.
To select a text content that needs to be masked, check the checkbox next to the attribute name displayed. On checking, this is added in the KeyPath textbox.
On checking the checkbox, the keypath is added in the KeyPath textbox. The keypath helps in navigating through sub-elements when masking is applied.
The Select Masking drop-down displays the list of masking options that can be applied on JSON structure. There are ten masking options:
Character – To know the working of this masking option, refer Character Masking.
FPM (Format Preserve masking) - To know the working of this masking option, refer Format Preserve Masking.
IntelliMask - To know the working of this masking option, refer IntelliMask.
NPI - To know the working of this masking option, refer NPI Masking.
Partial Field FPM - To know the working of this masking option, refer Partial FPM.
Random - To know the working of all the options under Random, refer Random.
Regular Expression - To know the working of this masking option, refer Regular Expression.
Static - To know the working of this masking option, refer Static Masking.
FP Encryption - To know working of this masking option, refer FP Encryption.
FP Decryption - To know working of this masking option, refer FP Decryption.
The bottom panel display the list of all selected keyPath opted for masking. This panel display the KeyPath and Selected Masking option.
To updated or edit the detail of the masking option, click the Edit button next to the KeyPath. To delete a Keypath, check the checkbox next to the record and click the Delete button. The Delete button is enabled only when you check the checkbox next to the Keypath.
E.g., with reference to below image, if you want to mask the employee details in JSON data such as its first name, last name, phone number and email address, then you can apply JSON masking with suitable option, as required.
Here, we’ve applied following masking options to mask the details of the employee Romin Irani.
The firstName is masked using First Name masking option in Random.
The lastName is masked using Last Name masking option in Random.
In this, we’ve generated Space separated telephone number using Telephone Numbers masking option under Random.
Similarly, an emailAddress is masked by Email Addresses masking option in Random.
On completion, the intended output will display the masked characters in the target database. In the below image, if you look closely, the firstName and lastName of Romin Irani has been masked to random name Corrin Carlill. In the same way, the actual phoneNumber ‘408-1234567’ is masked with space separated phoneNumber ‘281 631 9929’ and the emailAddress is changed from ‘firstname.lastname@example.org’ to ‘REID@ACQUAVIVA.com’
Also, note that the format of the data is preserved when JSON masking is applied which was not possible in any other masking option.