Oracle DATA MASKING WITH ORACLE ENTERPRISE MANAGER 12C DATA MASKING PACK FOR Oracle Database

OBJECTIVE

The objective of this POC is to obfuscate sensitive data in a Oracle database using Oracle Data Masking Pack.

 

For this the below activities need to be completed in order to accomplish the objective:

  1. Existing EM12c pre-requisites in place for Data Masking
  2. Install EM Agent (Plugin 12.1.0.3 or Higher )
  3. Create Data Masking Definition for the application TESTMAPS
  4. Execute masking

 

OVERVIEW

Oracle database masking requires Oracle Enterprise Manager (OEM) 12c, Oracle Data Masking Pack, an Oracle database. The target Oracle Database TESTMAPS can be created using duplicate database of RMAN or using normal backup restore capabilities of RMAN.

OracleDB-1

For the POC we have used the TESTMAPS for Application Data Model (ADM) creation, Data Masking Definition and subsequently masking the same Database. This was done were provided access only to test Database.

In theory you will need to create ADM and Data Masking Definition in production Database and execute the mask script in the staging/test database.

ASSUMPTIONS

  • EM12c ( 12.1.0.2 or higher )
  • DB Plugin 12.1.0.3 with Patch 16438087 or higher for Agents
  • The Oracle Database server TESTMAPS is already discovered in EM12c

DATA MASKING DEFINITION CREATION

We will now work on creating the data masking definition.

Login to EM

EM12c-ADM1

Navigate to Data Discovery and Modeling

Enterprise -> Quality Management ->Data Discovery and Modeling

EM12c-ADM2

 

Create the Application Model with name TESTMAPS the source database will be ORACLE DATABASE server TESTMAPS

EM12c-ADM3

EM12c-ADM4

EM12c-ADM5

 

ADD the schema MAPSPROD which has the tables that are required for Masking.

EM12c-ADM6

 

Submit Job for Metadata Collection

EM12c-ADM7

 

Next we edit the ADM TESTMAPS to add tables to it if required, also add any dependent columns if they do not have referential integrity at Oracle level.

EM12c-ADM8

EM12c-ADM9

 

To add tables manually ( at a later Stage post discovery)

Example Mps_daily_txn_poc1

EM12c-ADM10

EM12c-ADM11

 

Add and mark the required columns as sensitive (THIS IS IMPORTANT if not done then columns will not be visible during masking definition step.)

EM12c-ADM12

EM12c-ADM13

EM12c-ADM14.jpg

EM12c-ADM15

EM12c-ADM16

EM12c-ADM17

SAVE and RETURN

 

Navigate to Data Masking Definition

Enterprise ->Quality Management ->Data Masking Definition

EM12c-ADM18

 

Click Create for New Masking Definition

EM12c-ADM19

 

Provide name of Masking Definition, ADM and Reference Database

EM12c-ADM20

 

Click Add to Add relevant columns

EM12c-ADM21

 

Choose Schema Name, Table Name and Column Name and click the relevant column and click define format.

EM12c-ADM23

Next Select the sensitive column and click define format and add

EM12c-ADM24

For POC the column MDT_CRD_NUM had mix of 16 and 19 digit credit card number with Master ,Visa ,Maestro and Rupay Formats, therefore we used condition using ADD Condition.

EM12c-ADM25

Here condition is MDT_CRD_NUM like ‘4%’  for Visa Credit Card Numbers

EM12c-ADM26

Then we import the VISA Format using IMPORT FORMAT Button.

EM12c-ADM27

EM12c-ADM28

EM12c-ADM29

EM12c-ADM30

Similar step for Master Card

MDT_CRD_NUM like ‘5%’ and MDT_CRD_NUM not like ‘5044%’

For Default condition use Preserve Original Data from FORMAT ENTRY

EM12c-ADM31

Click OK

For faster masking of large tables we can add parallel clause

I.e. Use parallel execution when possible value 8

Parallel degree will depend on number of cores and threads available in the Target Oracle Database server.

Example if 4 core and 2 threads we can have parallel degree of 8.

EM12c-ADM32

Click OK to Save Masking Definition

Next Step is to generate the Script as shown below

EM12c-ADM33

EM12c-ADM34

EM12c-ADM35

One can view the generate script job details using View Job Details.

EM12c-ADM36

EM12c-ADM37

To save Script for manually masking use save script option of Actions or to view script use view script option from Actions.

EM12c-ADM38

Next Step is to Schedule Job for Masking Execution

EM12c-ADM39

Click Schedule job , provide named credentials ( Host and Database ) and click submit.

EM12c-ADM40

You can click view job details to see the progress.

EM12c-ADM41

Once the job is successfully completed, you can go and select the columns to check the masked data.

 

                                                            END OF DOCUMENT

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

 

 

 

Leave a comment