Integrating with Bitbucket to Collect Evidence
You can set up the Bitbucket collectors to automatically collect evidence. Adding a collector will connect Bitbucket with an evidence task so that evidence collection can begin. For information on managing your collector, see Managing Collectors .
To set up and activate collectors
Collectors are integrations that are set up to pull evidence from third-party systems. To integrate OneTrust with a third-party system, you must set up the credentials that OneTrust will use to connect to the system. You have the ability to create a new credential when setting up the collector.
Add Details Screen Reference
|
Step |
Field |
Description |
|---|---|---|
|
Add Details |
Collector Name |
Enter a unique and descriptive name for the collector that will be used to create the integration. This name will help you to identify the collector in future interactions.
Note:
Once you advance to the next screen, you cannot change the collector name. |
|
Collector Assignee Email |
Enter the email address that will receive notifications related to this collector. Create a distribution list if you would like to notify multiple users. Email notifications are sent in the following situations:
|
|
|
Choose Credentials |
Select Credential |
Select the existing credential you would like to use to share data securely. The collector will use credentials to access and gather data from the desired source. You can create a new credential by clicking the Add new credential option. The Add new credential modal will appear.
Note:
You can also create a new credential in the Integrations menu. Once the new credential is created, it will appear as a saved credential. For more information, see Configuring Integration Credentials. |
|
Add New Credential Modal |
Credential Name |
Enter a name to identify the credentials.
Note:
This field and all fields below only appear when you select the Add new credential option. |
|
Description |
Enter a description of the credentials. |
|
|
Callback URL |
The Callback URL field will be completed for you. The callback URL specifies the URL of an app that is designated to receive an authorization code on behalf of the client app. |
|
|
Authentication URL |
The Authentication URL field will be completed for you. The authentication URL provides a simple mechanism for authenticating users by referencing a custom identity provider. |
|
|
Access Token URL |
The Access Token URL field will be completed for you. Access tokens are a secure way to use scripts and to integrate external applications with Bitbucket. |
|
|
Client Id |
Enter the Client Id. To locate the Client Id, see Access Requirements. |
|
|
Client Secret |
Enter the Client Secret. To locate your Client Secret, see Access Requirements. |
|
|
Generate Token button |
Click the Generate Token button to create the access token. |
|
|
Access Token |
The access token will appear when you click the Generate Token button. |
|
|
Save Credential |
Click the Save Credential button to create and save the new credential.
Note:
If the credential is unable to collect evidence, you will need to select or create another credential. |
|
|
Test Credential |
Click the Test Credential button to test the credentials ability to collect evidence. |
Define Evidence Collection Screen Reference
|
Step |
Field |
Description |
|---|---|---|
|
Choose Evidence Tasks |
Evidence Task List |
Select one or more evidence tasks for this collector. You can filter the evidence tasks list by recommended, all evidence tasks, and selected tasks. |
|
Assign Collection Intervals |
Collection Interval |
Select a collection interval to determine how often this collector will sync and collect evidence. The collection interval will apply to all selected evidence tasks.
Tip:
OneTrust recommends you choose the most frequent option. For example, if the evidence tasks you selected have a frequency of Monthly, Quarterly, and Yearly - you should choose Monthly as your collection interval. |
|
Time of Day |
Select the time of day that evidence will be collected. All times are in UTC. |
|
|
Day of the Week |
Select the day of the week that evidence will be collected.
Note:
This option only appears if the Weekly collection interval is selected. |
|
|
Day of the Month |
Select the day of the month that evidence will be collected.
Note:
This option only appears if the Monthly, Quarterly or Biannually collection interval is selected. |
|
|
Interval Start Month |
Select the month when evidence will start being collected. This will set the cadence of evidence collection.
Note:
This option only appears if the Quarterly or Biannually collection interval is selected. |
|
|
Date and Time of Day |
Select the date and time that evidence will be collected. All times are in UTC.
Note:
This option only appears if the Yearly collection interval selected. |
|
|
Configuration Details |
Repository Name |
Enter the name of the repository where pull requests are created. |
|
Targeted Branch |
Enter the branch name. Only pull requests targeting this branch will be collected. |
|
|
Days to Sync |
Enter the number of days to collect the pull requests for the repository/branch. For example, to collect data for the last 30 days, enter "30". |
Access Requirements
You can register the authorized redirect URI in Bitbucket to capture the Client Id and Client Secret needed to create credentials. Bitbucket uses the security credentials to authenticate and authorize your requests.
To Generate a Client ID and Secret
-
Log into Bitbucket.
-
Select Bitbucket Settings > Workplace Settings.
-
Select OAuth Customers and click the Add Consumer button.
-
In the Callback URL field, paste the generated URL from the Callback URL field in the OneTrust application.
-
In the Permissions section, enable the Email and Read options in the Account section.
-
Click the Save button.
-
Expand the section for the new consumer to display the Key and Secret.
-
Copy the Key from Bitbucket Cloud and paste it into the Client ID field in the OneTrust application.
-
Copy the Secret from Bitbucket Cloud and paste it into the Client secret field in the OneTrust application.