This type of masking is useful if you want to mask the XML 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 XML, 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 in the XML structure is treated as text and is masked using the ‘#’ (Hash) value.
In XML masking, specify the key path based on which masking takes place in the XML structure. A keypath in XML document helps in navigating through elements and attributes. This is the reason when XML masking is applied, the format of the data is preserved, as only selected information in the structure is masked.
Features of XML masking:
This masking is supported for Clob, XML, XMLType, Varchar, Varchar(MAX), NVarchar(MAX) and Text datatypes.
CUPS and SL features are not supported.
*Note: To implement XML masking for Oracle, make sure that the All-masking-functions-X.Y.Z-all.jar is loaded.
To apply XML masking, enter the following:
The top panel displays the structure of XML 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 #text checkbox. On checking, this is added in the KeyPath textbox.
On checking the #text checkbox, the keypath is added in the KeyPath textbox. The keypath helps in navigating through elements and attributes when masking is applied.
The Select Masking drop-down displays the list of masking options that can be applied on XML structure. There are eight 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 (FPM).
IntelliMask - To know the working of this masking option, refer IntelliMask.
NPI - To know the working of this masking option, refer NPI masking (National Provider Identifier).
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 credit card details in XML data such as Credit Card Number and CVV. You can simply apply XML masking with suitable option, as required.
Here, we’ve applied following masking options:
The CCN are generated using Credit Card Numbers masking option in Random.
The CVV numbers are masked using the Number masking in Random. Using this masking option, random three-digit numbers are generated as per the range specified, i.e., 100 – 999.
On completion, the intended output will display the masked characters in the target database. In the below image, the card number is masked with random number which looks real but not valid. In the similar manner, CVV number is masked with random data.
Also, note that the format of the data is preserved when XML masking is applied.