Static Masking Polices

Data Security provides the static masking function for enterprises to prevent sensitive data leakage. Enterprises can use this function to protect their privacy and comply with the regulatory compliance. Sensitive data is masked, truncated, and hashed based on the built-in masking algorithms, and the processed data can be written to the target data table. For security purpose, it is the target data table that can be used to provide services for external requirements. The following part describes how to manage masking policies.

Prerequisites

Constraints

  • The Spark component must be installed in the MRS cluster where the MRS Hive service is located.
  • Table 1 describes the constraints for compute engines.
    Table 1 Constraints for compute engines

    Data Source (Source)

    Data Source (Target)

    Computing Engine

    DWS

    DWS

    The compute engine (2.1.0) specified when you create the masking task will be used.

    DWS

    MRS Hive

    The MRS cluster built in MRS Hive will be used.

    MRS Hive

    MRS Hive

    The MRS cluster built in MRS Hive at the source end will be used.

    MRS Hive

    DWS

    The MRS cluster built in MRS Hive at the source end will be used.

  • For DWS and MRS Hive data sources, select the timestamp field or the Date field to determine the incremental range.

Create a Static Masking Task

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Static Masking from the left navigation bar, and click Create in the upper part of the displayed page.

    Figure 1 Creating a static masking task

  4. Enter basic information and click Next.

    For parameter details, see Table 2.

    Figure 2 Parameter settings
    Table 2 Parameters

    Parameter

    Description

    Task Name

    The name of the task to be created. Task names can include only letters, numbers, underscores (_), and hyphens (-), and cannot exceed 64 characters.

    Description

    A description of the task to be created. A task description cannot exceed 1,024 characters.

    Workspace

    The workspace to which the data belongs.

    Data Source Type

    Currently, only DWS and MRS Hive are supported.

    Data Connection

    Currently, only proxy can be used to connect data.

    Database

    Select a database to be masked from the drop-down list.

    Source Table

    Select a source table to be masked from the drop-down list.

    Dataset Scope

    If Dataset Scope is set to Incremental, you can set Time Field to Timestamp or Date.

    Masking Policy

    Select a created masking policy from the drop-down list.

    Data Source Type

    Currently, only DWS and MRS Hive are supported.

    Data Connection

    Currently, only proxy can be used to connect data.

    Database

    Select a database for storing masked data from the drop-down list.

    Target Table

    Enter a unique table name.

    The table is automatically created when the table name entered does not exist.

    Compute Engine

    This parameter is displayed when both the source and target data sources are DWS. Set the engine for running the masking task. Currently, MRS 3.0.0 is supported.

  5. Click Next to configure the schedule properties. For example, set Repeat to Once.

    Figure 3 Schedule properties

    For schedule property details, see Table 3.

    Table 3 Parameters

    Parameter

    Description

    Date

    Period during which a task is executed.

    Period

    The frequency at which a task is executed. The options are:

    • Minute
    • Hour
    • Day

      The task is scheduled at the specified time every day.

    • Week

      If Period is Week or Month, the task will be scheduled on the specified day of the week or month.

      For example, if Period is set to Week and the task is scheduled from 2020-06-30 15:52:43 to 2020-08-01 17:20:21, the task is executed at 15:52:43 every Tuesday in the scheduling interval.

    Start now

    If you select Start now, the task is scheduled immediately.

  6. After all settings are complete, click OK.

Editing a Static Masking Task

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Static Masking from the left navigation bar.
  4. In the static masking list, select a task and click Edit to the right of it in the Operation column.

    Tasks that are running or being scheduled cannot be edited.

    Figure 4 Editing a static masking task

Scheduling/Running a Static Masking Task

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Static Masking from the left navigation bar.
  4. In the masking task list, select a task and click Run or Schedule to the right of it in the Operation column. For details on the scheduling mechanism, see Figure 6.

    Figure 5 Scheduling/Running a static masking task

Deleting a Static Masking Task

  1. Log in to the DGC console, select an instance, and click Access on it.
  2. Click the Workspaces tab. In the workspace list, find the required workspace. In the Quick Entry column, choose Data Security to access the management console.
  3. Choose Static Masking from the left navigation bar.
  4. In the static masking list, select a task and click Delete to the right of it in the Operation column.

    Figure 6 Deleting a static masking task

    Tasks that are running or being scheduled cannot be deleted.