API Calls for Managing Masking Job Driver Support Tasks
Enabling driver support tasks is possible for built-in Oracle and MSSQL connectors as well as extended connectors that have a JDBC driver that uses a driver support plugin at the following endpoints:
- Masking jobs -
POST /masking-jobs
andPUT /masking-jobs/{maskingJobId}
- Reidentification jobs -
POST /reidentification-jobs
andPUT /reidentification-jobs/{reidentificationJobId}
- Tokenization jobs -
POST /tokenization-jobs
andPUT /tokenization-jobs/{tokenizationJobId}
Disabling driver support tasks is possible for built-in Oracle and MSSQL connectors as well as extended connectors that have a JDBC driver that uses a driver support plugin at the following endpoints:
PUT /masking-jobs/{maskingJobId}
PUT /reidentification-jobs/{reidentificationJobId}
PUT /tokenization-jobs/{tokenizationJobId}
Info
The order of the tasks returned in enabledTasks
in the Job APIs' responses is not indicative of the task execution order. The task order is determined by the order the tasks are added to getTasks
in the Driver Support Plugin implementation.
The following instructions to enable driver support tasks on an Oracle masking job can be used to enable driver support tasks for applicable reidentification and tokenization jobs as well.
View the Tasks Implemented By Driver Support Plugin¶
- Select
GET /plugin
(orGET /plugin/{pluginId}
if the plugin ID of the driver support is known). - Change
`pluginType
query parameter toDRIVER_SUPPORT
(default isEXTENDED_ALGORITHM
). - The response should include the full list of driver support plugins on the masking engine. If the engine only has the builtin Oracle driver support plugin installed, the response will look as follows:
{
"_pageInfo": {
"numberOnPage": 1,
"total": 1
},
"responseList": [
{
"pluginId": 8,
"pluginName": "dlpx-oracle-driver-support",
"pluginAuthor": "Delphix Engineering",
"pluginType": "DRIVER_SUPPORT",
"originalFileName": "delphix-oracle-driver-support-plugin-1.0.0.jar",
"originalFileChecksum": "17b06f2fd888888e26a634d501b4ac9be5a91a7f50000a995934145c7afe7e12",
"installDate": "2021-10-24T18:08:50.868+00:00",
"builtIn": true,
"pluginVersion": "1.0.0",
"description": "This plugin provides built-in driver support functionality for the Oracle JDBC driver that ships with the Delphix Masking Engine.",
"pluginObjects": [
{
"objectIdentifier": "1",
"objectName": "Disable Constraints",
"objectType": "DRIVER_SUPPORT_TASK"
},
{
"objectIdentifier": "2",
"objectName": "Drop Indexes",
"objectType": "DRIVER_SUPPORT_TASK"
},
{
"objectIdentifier": "3",
"objectName": "Disable Triggers",
"objectType": "DRIVER_SUPPORT_TASK"
}
]
}
]
}
Create Masking Job That Enables Tasks¶
Info
This assumes a ruleset using the desired connector already exists. The following example demonstrates the creation of an in-place masking job on a built-in Oracle connector. This also assumes you know the ID of the task that you want to enable and have execute as part of a given masking job. To enable tasks to execute as part of a masking job on an extended connector, you need to ensure the ruleset points to an extended connector that is using a JDBC driver with a driver support and include the property enabledTasks
in your request.
- Select
POST /masking-jobs
to create a masking job using the ruleset you created earlier that targets the desired connector. - Format the request body as follows to enable Disable Constraints, Drop Indexes and Disable Triggers per the
objectIdentifier
values returned from the GET Plugin API endpoint:
{
"jobName": "Oracle IP job",
"rulesetId": 1,
"jobDescription": "Job description",
"enabledTasks": [
{
"taskId": 1
},
{
"taskId": 2
},
{
"taskId": 3
}
]
}
The response will look similar to the following with a return status of 200:
{
"maskingJobId": 1,
"jobName": "Oracle IP job",
"rulesetId": 1,
"rulesetType": "table",
"createdBy": "admin",
"createdTime": "2021-04-27T21:29:46.043+00:00",
"feedbackSize": 50000,
"jobDescription": "Job description",
"maxMemory": 1024,
"minMemory": 1024,
"multiTenant": false,
"numInputStreams": 1,
"onTheFlyMasking": false,
"databaseMaskingOptions": {
"batchUpdate": true,
"commitSize": 10000,
"disableConstraints": false,
"dropIndexes": false,
"disableTriggers": false,
"numOutputThreadsPerStream": 1,
"truncateTables": false
},
"failImmediately": false,
"enabledTasks": [
{
"taskId": 1
},
{
"taskId": 2
},
{
"taskId": 3
}
],
"streamRowLimit": 20000
}
Disable Tasks¶
To disable the Disable Triggers task on an Oracle masking job, the request body to PUT /masking-jobs/1
should exclude the taskId of the task to disable. Using the above request body as an example, Disable Triggers has a task ID of 3 so the request body to PUT /masking-job/1
should exclude the object in enabledTasks with "taskId": 3
. The request body should thus be:
{
"jobName": "Oracle IP job",
"rulesetId": 1,
"jobDescription": "Job description",
"onTheFlyMasking": false,
"enabledTasks": [
{
"taskId": 1
},
{
"taskId": 2
}
]
}
The Oracle masking job will now only have Disable Constraints and Drop Indexes enabled (in this example, their respective task IDs are 1 and 2). The response will look similar to the following with a return status of 200:
{
"maskingJobId": 1,
"jobName": "Oracle IP job",
"rulesetId": 1,
"rulesetType": "table",
"createdBy": "admin",
"createdTime": "2021-04-27T21:29:46.043+00:00",
"feedbackSize": 50000,
"jobDescription": "Job description",
"maxMemory": 1024,
"minMemory": 1024,
"multiTenant": false,
"numInputStreams": 1,
"onTheFlyMasking": false,
"databaseMaskingOptions": {
"batchUpdate": true,
"commitSize": 10000,
"disableConstraints": false,
"dropIndexes": false,
"disableTriggers": false,
"numOutputThreadsPerStream": 1,
"truncateTables": false
},
"failImmediately": false,
"enabledTasks": [
{
"taskId": 1
},
{
"taskId": 2
}
],
"streamRowLimit": 20000
}