Splitter Mask
The Splitter mask allows using multiple masks to mask different parts of a single value of character type data.
The Splitter mask is intended to operate on character type data columns, such as CHAR, VARCHAR, NCHAR and NVARCHAR.
It can process fixed length and variable length fields within a column value. A field within a Splitter mask is referred to as a path.
If a NULL column value is found then NULL is preserved.
Create a Path and Mask
To define a path and its associated mask, click on the 'Add...' button. The following dialog shall be displayed:
DataVeil expects paths to be defined in ascending Position order otherwise an error shall be reported. This has been implemented to help the user avoid unexpected masking outcomes particularly when fixed length and variable length paths are defined within the same mask.
For example, consider two paths: the first is variable length path defined at offset position 1 and the second path is defined at fixed position 21. If at runtime the first path's variable length is determined to be 30 characters then an error shall be reported. This is because the the second path's start position of 21 overlaps the first path that ends at position 31.
Paths do not need to be contiguous. They simply need to be defined in the order in which they will appear in the column value.
Position
There are two options available, 'At' and 'Follow':
At
This specifies a fixed offset. The position is 1-relative as is normal for SQL, meaning that the first character in a column value is 1 (not 0).
Follow previous
This specifies that the position is to be calculated as immediately following the previously defined path. If this is the first path defined in the mask then 1 shall be used.
Align
This specifies whether a value can be expected to be Left or Right aligned in the path.
DataVeil will strip any trailing (if Left) or leading (if Right) Pad characters prior to passing the stripped value to the Mask. This may be important because if unstripped values are passed to the Mask then it may cause different deterministic values to be generated compared to stripped values.
DataVeil will include pad characters in the masked value only if the path has a fixed length. i.e. if the Length setting is For.
In other words, DataVeil will always strip leading or trailing Pad characters (depending on the Align setting) but will only write pad characters if the path is fixed length. DataVeil will never write pad characters for variable length paths.
Pad
This must be a single character. A 'space' character is the default.
Length
For
This specifies the character length of a fixed length path.
Until
This specifies that the path length will be determined by the next appearance of any of the Char(s) characters.
Char(s)
This may contain one or more characters.
If more than one character is used then it means that the path will be delimited by the appearance of any one of the characters. The example below shows that the path will be delimited by the appearance of a ; or # or @ or $.
If Char not found
This specifies the action DataVeil should take if the specified Char could not be found:
Error - DataVeil shall report a runtime masking error.
Preserve All - The entire value (not just this path) shall be preserved.
Until End - DataVeil shall consider this path Length as if it was defined as 'Until End' (described below).
Value - The entire value (not just this path) shall be replaced with the specified Value.
The Value can be an SQL expression that returns a single value.
If a literal is specified then it must be enclosed within single-quote characters.
The Value may contain DataVeil macros.
The Value may contain a SELECT query that returns only a single value. The query cannot use a join. Any join specified in the mask's Join tab shall not be considered in this Value query.
Until End
This specifies that the length of the current path extends until the end of this entire column value.
Mask
To configure a mask for the path, click on the 'Create...' button. The masks available for use within a Splitter mask are shown below.
Note: The Preserve mask can be useful to skip variable length paths that precede a path that does require masking.
For example, if a column value contains 3 variable length paths where it is required to mask only the third path with a Company Name mask, then the first two variable length paths can be configured with Preserve masks followed by the third path configured with a Company Name mask. i.e. The preceding two Preserve masks serve to calculate the variable offset of the third path that is to be masked.
Size Limitations
The following are the maximum character lengths of a value that can be processed and returned by a Splitter mask:
MySQL: 65,535
Oracle: 2,000
SQL Serve/Azure: 2GB