Offset Reporting for Database Tables

Note:

This feature is currently under Private Preview. Please contact your account representative to learn more about eligibility requirements.

This guide walks you through the steps required to configure the environment, initiate the scan, and validate the offset report generated for a database table. Ensure that the environment variables are set correctly and that the table has a primary key for successful report generation.

If you encounter any issues or need assistance, please contact OneTrust Support.

Important:

Please note that offset reports can only be generated for database tables and not views, and the database tables must have a primary key to be eligible for offset report generation.

Prerequisites

Primary Key

The database table must have a primary key to generate an offset report.

Worker Node Configuration

The environment variables for the worker node must be properly set.

To generate offset report

1. Set the Environment Variables

To configure the worker node to generate the offset report, you need to update the .guided.envs file or set the variables directly in the guided environments.

The following environment variables must be set:

Variable

Description

IS_AUDIT_MODE_ENABLED='true'

Enables audit mode, allowing the generation of the offset report.

AUDIT_OUTPUT_DIRECTORY='/tmp/audit'

Specifies the directory where the audit reports will be saved.

AUDIT_MIN_FIELD_SIZE='1'

Defines the minimum size of a field to be included in the audit report.

AUDIT_MAX_FIELD_SIZE='40000'

Defines the maximum size of a field to be included in the audit report.

AUDIT_FIELD_TYPES='VARCHAR,VARCHAR2,TEXT,text,Number,Date,CHAR'

Specifies the types of fields to be audited.

AUDIT_FILE_MAX_SIZE='10KB'

Sets the maximum size for each audit file.

AUDIT_MAX_ROWS='0'

Controls the maximum number of rows to be audited. 0 means no limit.

Example Environment Variable Set

CODE
IS_AUDIT_MODE_ENABLED='true'
AUDIT_OUTPUT_DIRECTORY='/tmp/audit'
AUDIT_MIN_FIELD_SIZE='1' 
AUDIT_MAX_FIELD_SIZE='40000' 
AUDIT_FIELD_TYPES='VARCHAR,VARCHAR2,TEXT,text,Number,Date,CHAR' 
AUDIT_FILE_MAX_SIZE='10KB' AUDIT_MAX_ROWS='0'

2. Verify the Environment Variables

After setting the environment variables, verify that they are correctly configured using the following command:

CODE
kubectl exec -it <rdbms-scanner-pod> -n <namespace> -- sh

#Example
$ kubectl exec -it rdbms-scanner-5bc887b564-2qm5h -n app-qa-dd-scanner -- sh $ env | grep AUDIT AUDIT_MAX_ROWS=0 AUDIT_MIN_FIELD_SIZE=1 AUDIT_FIELD_TYPES=VARCHAR,VARCHAR2,TEXT,text,Number,Date,CHAR AUDIT_OUTPUT_DIRECTORY=/tmp/audit AUDIT_MAX_FIELD_SIZE=40000 AUDIT_FILE_MAX_SIZE=10KB IS_AUDIT_MODE_ENABLED=true

Ensure that the above environment variables are correctly set.

3. Initiate the Scan

Once the environment variables are updated, initiate the scan to start the process of generating the offset report.

4. Wait for the Scan to Complete

Allow the scan to complete. Once the scan finishes, the offset reports will be generated and saved to the directory specified in AUDIT_OUTPUT_DIRECTORY.

5. Locate the Generated Offset Report

  1. Navigate to the Audit Directory:
    CODE
    kubectl exec -it <rdbms-scanner-pod> -n <namespace> -- sh 
    $ cd /tmp/ $ cd audit/ $ ls -
  2. Locate the folder associated with the specific scan ID and navigate to it.
    CODE
    $ cd <scan-id> $ ls
    
    #Example
    $ cd 706ca6be-bd42-4819-bb94-d1a1bf3d0eba
  3. The offset report will be generated as a .csv file in this folder. The file will be named according to the scan details.
    CODE
    audit_report_15k_db.integris_15k_table.audit-table-text.1.csv

6. Open the Offset Report

To view the generated offset report, open the .csv file using the following command:

CODE
$ cat audit_report_15k_db.integris_15k_table.audit-table-text.1.csv

You can now review the contents of the report, which contains the details of the audit for the specified database table.

7. Validate the Offset Report

The report consists following format: databasename, schemaname, columnname, primarykeycolumn, primarykeyvalue, position, piilength, claiifier, piivalue.