Updated on 2024-04-11 GMT+08:00

Creating and Running an Elasticsearch Data Masking Task

Create an Elasticsearch data masking task to mask sensitive information in tables or columns in a specified Elasticsearch data source.

This section describes how to create an Elasticsearch data masking task.

Prerequisites

Constraints

Currently, only Elasticsearch is supported.

Creating and Running an Elasticsearch Data Masking Task

  1. Log in to the management console.
  2. Click in the upper left corner and select a region or project.
  3. In the navigation tree on the left, click . Choose Security and Compliance > Data Security Center .
  4. In the left navigation pane, choose Data privacy protection > Perform static data masking and click the Elasticsearch tab. The Elasticsearch masking page is displayed.
  5. Click and set Elasticsearch to to enable Elasticsearch masking.
  6. Click Create Task. On the displayed Configure Data Source page, configure parameters according to Table 1.

    Table 1 Datas source parameters

    Parameter

    Description

    Task Name

    You can create a custom name for a data masking task.

    The task name must meet the following requirements:
    • It can contain 1 to 255 characters.
    • Only letters, numbers, underscores (_), and hyphens (-) are allowed.

    Select Data Source

    Select a data source. Currently, the value can only be Elasticsearch.

    Data Source

    NOTE:

    If no Elasticsearch instance is available, click Add to add Elasticsearch indexes. For details, see Authorizing Access to Big Data Assets.

    Elasticsearch: Select the Elasticsearch instance where the data to be masked is.

    Index: Select the index where the data to be masked is.

    Type: Select the type of the data to be masked.

  7. Click Next.

    Figure 1 Configuring a masking algorithm
    1. Select the data columns you want to mask.
    2. Select a data masking algorithm. For details about data masking algorithms, see Configuring a Data Masking Rule.

  8. Click Next.

    Figure 2 Masking period

    Select and set the execution period of a masking task.

    • Manual: Manually enable a masking task and execute it based on masking rules.
    • Hourly: A data masking task is executed every several hours.

      For example, to execute a data masking task every two hours, set this parameter to 02:00.

    • Daily: A data masking task is executed at a specified time every day.

      For example, to execute a data masking task at 12:00 every day, set this parameter to 12:00:00.

    • Weekly: A data masking task is executed at a specified time every week.

      For example, to execute a data masking task at 12:00 every Monday, set this parameter to 12:00:00 every Monday.

    • Monthly: A data masking task is executed at a specified time on a specified day every month.

      For example, to execute a data masking task at 12:00 on the 12th day of each month, set this parameter to 12:00:00 12th day of every month.

      If you need to execute a data masking task on the 31st day of each month and the month has fewer than 31 days, the system automatically executes the task on the last day of the month.

  9. Click Next.

    Figure 3 Setting target data
    1. Select an Elasticsearch instance and index, and set Type.

      If the type you entered already exists, the system updates the data of the type in the target data source.

      If the type you entered does not exist, the system automatically creates a type with the same name in the target data source.

      If you want to use an existing type, do not set Type. Otherwise, services may be affected.

    2. Set the column name of the target data type.

      By default, the system generates the same name as the data source column. You can retain the default name or change it as needed.

  10. Click Finish.
  11. Click the Elasticsearch tab. Locate the row containing the target data masking task and click Execute in the Operation column.

    Figure 4 Executing an Elasticsearch data masking task

  12. The system starts to execute the data masking task as configured.

    If is displayed in the Enable/Disable column, the task is disabled, and you are not allowed to click Execute.

Viewing the Status of an Elasticsearch Data Masking Task

  • On the Elasticsearch tab page, click of the target data masking task to view it execution status.
    The statuses are as follows:
    • Completed: The data masking task has been successfully executed.
    • Running: The data masking task is being executed.
    • Pending execution: The data masking task is not executed.
    • Stopped: The data masking task has been manually stopped.
    • Failed: The data masking task fails to be executed.
    Figure 5 Data masking task statuses

Editing and Deleting an Elasticsearch Data Masking Task

A data masking task in the Pending execution or Running state cannot be edited or deleted.

  • In the Elasticsearch data masking task list, locate the row containing the target data masking task and click Edit in the Operation column to modify masking task information. For details, see Creating and Running an Elasticsearch Data Masking Task.
    Figure 6 Editing an Elasticsearch data masking task
  • In the Elasticsearch data masking task list, locate the row containing the target data masking task and click Delete in the Operation column.
    Figure 7 Deleting an Elasticsearch data masking task

    Deleted data masking tasks cannot be recovered.