Create or Edit Masking Formats

You can create your own masking formats by using the basic masking formats in Oracle Data Safe as your starting point.

About Creating User-Defined Masking Formats

When creating user-defined masking formats, you select basic masking formats and then customize them to meet your specific requirements. The results of the masking formats are concatenated together. You can also choose to start with an existing masking format, edit it, and then save it under a different name.

You cannot apply conditions when creating a masking format. You can create conditions when you modify a masking format from within a masking policy.

Suppose you want to mask a national identifier that has ten digits. You can create a new masking format, say My National Identifier, using the Random Number masking format. Random Number takes two inputs: Start Number and End Number. You can provide 1000000000 as the Start Number and 9999999999 as the End Number, and then save your masking format. In the future, to mask a column containing that national identifier, you can simply choose the My National Identifier masking format. Input is not required. If you have a sensitive type to discover your national identifier, you can also set My National Identifier as the default masking format for that sensitive type. This way, whenever you discover columns using this sensitive type, Data Masking selects the mapped masking format by default.

Supported Data Types for User-Defined Masking Formats

Before creating a masking format for a sensitive column, first determine the column's data type. The data type dictates which basic masking formats you can use.

Character Data Types

The following character types can use Delete Rows, Deterministic Encryption, Deterministic Substitution, Fixed Number, Fixed String, Group Shuffle, Null Value, Post Processing Function, Preserve Original Data, Random Decimal Number, Random Digits, Random List, Random Number, Random String, Random Substitution, Regular Expression, Shuffle, SQL Expression, Substring, Truncate Data, and User Defined Function masking formats:

  • CHAR
  • NCHAR
  • VARCHAR2
  • NVARCHAR2

Numeric Data Types

The following numeric types can use Delete Rows, Deterministic Encryption, Deterministic Substitution, Fixed Number, Group Shuffle, Null Value, Post Processing Function, Preserve Original Data, Random Decimal Number, Random Digits, Random List, Random Number, Random Substitution, Regular Expression, Shuffle, SQL Expression, Truncate Data, and User Defined Function masking formats:

  • NUMBER
  • FLOAT
  • RAW
  • BINARY_FLOAT
  • BINARY_DOUBLE

Date Data Types

The following date types can use Delete Rows, Deterministic Encryption, Deterministic Substitution, Group Shuffle, Null Value, Post Processing Function, Preserve Original Data, Random Date, Random List, Random Substitution, Shuffle, SQL Expression, Truncate Data, and User Defined Function masking formats:

  • DATE
  • TIMESTAMP

Large Object (LOB) Data Types

The following LOB data types can use Fixed Number, Fixed String, Null Value, Regular Expression, and SQL Expression masking formats:

  • BLOB
  • CLOB
  • NCLOB

Unsupported Objects

Oracle Data Safe does not support masking for the following:

  • External tables
  • Queue tables
  • Long columns
  • XML-type columns
  • Virtual columns
  • ROWID columns
  • JSON columns
  • Graph tables

Create a User-Defined Masking Format

  1. Under Data Safe - Database Security, select Data masking.
  2. Under Data masking, select Masking formats.
  3. Click Create masking format.
  4. Enter a name for your masking format.
  5. Select a compartment in which to store your masking format.
  6. (Optional) Enter a description for your masking format.
  7. Configure the masking format.
    1. From the Masking Format Entry drop-down list, select a basic masking format and configure its parameters.
    2. To add another masking format, click Add format entry and configure its parameters. If you enter more than one masking format, the results of individual masking formats will be the concatenated to result in the final masked value.
    3. To delete a masking format, click the X button next to it.
  8. Click Create masking format.
    Your new masking format is now displayed on the Masking Formats page. You can select your masking format whenever you create a data masking job.

Edit a User-Defined Masking Format

  1. Under Data Safe - Database Security, select Data masking.
  2. Under Data masking, select Masking formats.
  3. Search for and click the name of your masking format.
    The Masking Format Details page is displayed.
  4. To edit the name or description select the appropriate action from the Actions menu.
  5. To edit the masking format, select Edit format entries.
  6. Click Update.
    The masking format is immediately updated.