Register a custom data source for Protect
Protect offers APIs that allow integration with custom data sources. These APIs help in keeping your data policies synchronized across different sources and ensure that the policies are enforced consistently. You can use these APIs to build custom integration solutions, enabling you to fetch policies from Protect and enforce them in your own data sources.
Registering a custom data source for Protect involves the following steps:
- Add the custom data source using the Collibra Protect Data Sources API.CopyExample: POST /dataSources
{
"name": "Custom Data Source",
"dataSourceName": "CustomDataSource",
"dataSourceAliases": [
"Custom Data Source Alias"
]
}Descriptions of keys- name: Unique name to identify the custom data source in Collibra.
- dataSourceName: Primary name that is used to identify the data source. This value is typically the same as the one in the Data Source Type attribute on the Database asset in Collibra, for example, GoogleBigQuery. The value is also used for creating a Protect group.
- dataSourceAliases (optional): List of alternative names that might also be used to identify the data source. Aliases should be provided if the Data Source Type attribute on the Database asset contains a different value than the primary name of the data source, for example, BigQuery.
- Create a Protect group for the custom data source.
- Create standards and rules that are specific to assets from your custom data source. Tip You can also preview a rule to ensure that it is correctly configured. To preview a rule, in the Data Access Rule dialog box, click Generate Preview.
- Access the synchronization data
for the custom data source via the following API.Copy
GET /synchronizations/byDataSource?dataSource={dataSourceName}
Note You can't access the synchronization data if the policies in Protect involve more than 100,000 columns.
Example
The following steps describe how to register a custom data source, Oracle, for Protect.
- On the environment where you want to register Oracle, click → API Documentation.
The APIs Documentation page opens. - In the REST APIs section, click REST Protect API.
The Collibra Protect API page is shown. - Send a POST request to the /dataSources endpoint:
- Click Data Sources → POST → Try it out.
- Edit the request body.
Copy
{
"name": "My Oracle Data Source",
"dataSourceName": "Oracle",
"dataSourceAliases": []
} - Click Execute.
Protect can now recognize Oracle as a data source.
- Send a POST request to the /groups endpoint:
- Click Groups → POST → Try it out.
- Edit the request body.
Copy
{
"name": "My Oracle Group",
"mappings": [
{
"provider": "Oracle",
"identity": "My_Oracle_User"
}
]
}Tip The value in the "provider" key must match the value in the "dataSourceName" key provided in Step 3. - Click Execute.
The Protect group is created in Collibra for Oracle. Standards and rules can be created to protect the data in Oracle.
- Access the synchronization data via the following API to apply and enforce the policies in Oracle.
Copy
GET /synchronizations/byDataSource?dataSource=Oracle