Sensitive data access
The sensitive data access feature records every access to sensitive data, including operation time, operator, and operation content. Security administrators can use these records to evaluate and track each access event, ensuring that data access activities comply with your organization's security policies and compliance requirements.
Limitations
-
Applicable users: This feature is available in DataWorks Standard, Professional, and Enterprise editions for users with the new data security features enabled in Security Center.
-
Supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, and Indonesia (Jakarta).
-
Supported compute engines: MaxCompute and Hologres.
Prerequisites
-
The account used to log on to DataWorks must have one of the following permissions or roles:
An account granted the AliyunDataWorksFullAccess policy.
An account assigned the DataWorks tenant security administrator role.
An account assigned the DataWorks tenant administrator role.
-
You have completed the instructions in Getting started.
Supported engines and latency
Sensitive data refers to the data identified by detection tasks in .
The Sensitive Data Access page provides tabs at the top for viewing access records of different data engines. The latency for each engine is as follows:
|
Data engine |
Latency |
|
MaxCompute |
T+1 |
|
Hologres |
T+2 |
|
EMR Hive |
Near real-time |
|
DLF |
Near real-time |
|
DLF Legacy |
Near real-time |
|
StarRocks |
Near real-time |
View sensitive data access
-
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. On the page that appears, click Go to Security Center.
-
In the left-side navigation pane, choose .
-
At the top of the page, select the tab for the engine that you want to view.
-
Filter records as needed:
-
In the filter area at the top of the page, you can filter by the following criteria:
-
Operation object: Select the operation object in order of the engine hierarchy. For example: for MaxCompute, select project, table, and column; for Hologres, select instance, database, table, and column; for EMR Hive, select instance, table, and column; for DLF, select catalog, database, table, and column.
-
Involving data types: Perform a fuzzy search by sensitive data type name.
-
Operation time: Filter by the time range in which the access occurred.
-
Download Scene: Filter by the business scenario of the data download operation. Multiple selections are supported. Valid values: Data Integration, PythonODPS, Data Development, Data Analysis, and Other.
-
-
Click the filter icon in the column header to further filter by Operator, Operation type, and Type of behavior.
-
-
View the access record list. The field descriptions are as follows:
Field
Description
Time
The date and time when the operator accessed the sensitive data.
Operator
The account used by the operator in the event, such as the logon account or the RAM user or Alibaba Cloud account specified as the default access identity for the data source.
Operation object
The sensitive data resource (such as project, table, or column) accessed in the event. The specific hierarchy depends on the selected engine.
Operation type
The type of operation performed by the operator on the sensitive data.
Download Scene
The business scenario of a data download access record. Valid values: Data Integration, PythonODPS, Data Development, Data Analysis, and Other. For other records, a hyphen (-) is displayed.
Involving data types
The types of sensitive data included in the access event.
Type of behavior
Valid values: System behavior and User Behavior. Data sampling performed during a sensitive data identification task is a System behavior.
Actions
Click Details to view details of the access record. For field descriptions, see View access record details below.
View access record details
In the sensitive data access list, click Details in the row of the target record to open the Sensitive Data Access Record Details dialog box and view the following fields:
-
Time: The date and time when the operator accessed the sensitive data.
-
Operator: The account information used by the operator.
-
Operation type: The type of operation performed by the operator on the sensitive data.
-
Download Scene: The business scenario of a data download access record. For other records, a hyphen (-) is displayed.
-
Operation content: The specific SQL statement executed by the operator.
The Sensitive data involved sub-table lists details of the sensitive data accessed in the operation:
|
Field |
Description |
|
Field Name |
The name of the column where the accessed sensitive data resides. |
|
Table Name |
The name of the table where the accessed sensitive data resides. |
|
Data type |
The name of the sensitive data type corresponding to the column. |
|
Engine type |
The engine to which the sensitive data belongs. |
Export sensitive data access records
Manually export filtered access records as needed, or configure global export to periodically save audit logs to OSS for offline analysis or long-term archiving.
Manual export
Use manual export to download filtered records for the current engine in XLSX format. Exported files are retained for 30 days. After a file expires, its name is grayed out and the file cannot be downloaded.
-
After you set the filter conditions, click Export in the toolbar above the record list.
-
In the Create Export Task dialog box that appears, confirm the information and click Create. The system creates an export task based on the current filter conditions.
-
Click Export Tasks in the toolbar above the record list. In the drawer, view the export task ID and creation time, and click the export file name to download the file.
Click Details in the task row to view the filter conditions used when the task was created.
Automatic export to OSS
For long-term archiving, configure global export to save audit logs from all engines to OSS at 01:00 every day. The export is independent of the selected engine tab and page filters.
Configure and enable export
Prepare an OSS bucket in the same region as DataWorks. If an authorization prompt appears, contact an administrator to authorize the AliyunServiceRoleForDataWorks service-linked role.
-
In the upper-right corner of the Sensitive Data Access page, click Global Export Configuration.
-
Select an OSS Bucket and enter a Destination Directory. The directory must start and end with
/, for example,/audit-logs/. -
Set the Minimum Sensitivity Level as needed. Enter an optional Configuration Description of up to 512 characters.
-
Click Save. Export is enabled when you first create the configuration. When enabled, DataWorks checks for unexported dates within the previous 180 days and asynchronously creates backfill tasks.
View results and download files
Click Global Export Records in the upper-right corner of the page. Find tasks by Status or Export Date. Copy the file path and download the file from the destination OSS bucket. For a failed task, click Retry. The export configuration must be enabled before you retry.
Each export generates two JSON Lines (JSONL) files: a main file with one operation per line, and a detail file containing only details of the sensitive data involved. Parse the exported JSON data line by line.
Adjust settings or disable export
Reopen Global Export Configuration, adjust the settings, and save. Changing the bucket or directory triggers historical backfill. Pending tasks and retries use the latest bucket and directory. Changes to the minimum sensitivity level affect only newly created tasks; pending tasks and retries retain the level set at creation. Existing export records are not deleted or rerun.
For an existing configuration, use the Enable Export switch. Turning it off takes effect immediately. Turning it back on requires confirmation of the historical backfill prompt. After either operation succeeds, the dialog box closes automatically. You do not need to click Save. Reopen the dialog box to modify other settings.