Overview of the mask
rules
Overview
The mask
rule generates values using input sources.
- In an
update
, the rules replaces existing column values - In a
create
, the rules populate new rows of values
ANO Structure
...
task <task-name> {
<update-or-create> <table> <task-name?>
mask <column-name> <rule-name?> // ´?´ means optional
format <format>
transform? <transformation?>
unique?
<input-sources>
convert? <conversion?>
map? <mapping-file?> <mapping-rule?>
}
...
Explained
- The
mask
keyword is followed by the column that is being anonymized by the rule format
describes the output of the mask ruletransform
refers to a java transformation function in the DBmasker project that will transform the output of the mask rule before storing back to databaseunique
will make the rule respect the unique constraint of the table columninput-sources
define where input where the values are sourced fromconvert
refers to a java conversion function in the DBmasker project that will take the input source values as inputs before passing it to the rulemap
refers to a mapping file that may be used as aninput
,output
orinput-output
of the rule
Mask Input Sources
- random-[type]
- File
- Column
- Sequence
random-[type]
The random-[type]
input source is used to insert a value drawn from a
random sequence as defined by the <from>
and <to>
properties. The random-[type]
is one of
file
The file
input source is used to insert a string value taken from the file defined in the location string.
It picks a line from the file sequentially or randomly depending on the random-order
property.
A conversion class can be selected to manipulate the string selected from the text file. See convert.
column
The column
input source is used to insert the specified column value into the masked column.
You can only specify a column from the same table. If a column being anonymized is not a string,
you can use one of the conversions defined to convert the data type. See convert
.
sequence
The sequence
input source is used to insert a sequence of integers into the column starting with the first INTEGER value
and incremented by the second INTEGER value. If -1 is selected,
the sequence starts with the highest value stored in the column plus the increment.