MongoDB automate privacy requests, Integration
Automating your privacy requests fulfillment and data classification by integrating MineOS with MongoDB
This integration allows you to automate privacy requests for MongoDB. This integration supports content discovery allowing Mine to scan for PII inside your MongoDB collections.
Before you start
- Make sure your MineOS plan supports integrations.
- Make sure you have the correct information and connectionString to connect to your MongoDB
- [Optional] Enable Preview mode to view sample PII values alongside classification results. The sample values are stored encrypted and automatically deleted after 7 days. You must enable Preview mode before running the scan to see sample values. For more information about how to set up Preview mode go here.
Make sure to whitelist MineOS IPs in your database: IP Whitelist
Setting up
To connect the MongoDB integration, follow the steps below:
- On the left sidebar, click Data Inventory and then Data Sources
- Click on Add data source

- Select MongoDB from the catalog, then enter the MongoDB page from your data sources list
- Click the Integrations tab on the left, and select Integration as the handling method.
- If you want to use this integration for data classification, also check the Use source in Content Discovery.
- Enter your MongoDB cluster connection string.
The connection string should include the database URL as well as your username and password. -
To automate privacy requests, enter the Database Name & Collection Name in which user data should be searched when handling requests. If you are only using MongoDB for data classification, you can type an arbitrary name of a database and collection in your cluster, it will only be used to check the connection is working. Note: When using data classification, all databases and collections in the cluster will be scanned.
-
Lastly, enter the Parameter Name Field - this is the JSON path of the field that includes the email/user identifier that needs to be matched, when handling privacy requests. If you are only using MongoDB for data classification, you can just type 'na' in this field. Note that the identifier is matched using a case-insensitive search, so variations in capitalisation (e.g. User@Example.com vs user@example.com) will still be caught.
Note for deletion: When handling privacy requests, Mine only searches and deletes from the single Database / Collection configured here. If the data subject's records exist in multiple collections, you will need to set up a separate integration instance for each one.
Note: Make sure that the connection string is correct and that the MineOS IP is part of the IP access list for the MongoDB database.
In case of connection issues add ?retryWrites=true&w=majority options to the end of the connection string for privacy request deletions.
How deletion works
When a deletion request is processed, MineOS connects to the database and collection you configured and searches for all documents where the Parameter Name field matches the data subject's identifier (e.g. their email address). The match is case-insensitive. All matching documents are deleted in full — the entire document is removed, not just the identifier field. Only the configured collection is affected; other collections and databases in your cluster are not touched by the deletion.
Note: After deletion runs, MineOS will report how many documents were deleted. If no matching documents are found, the request will be marked as not found. If an error occurs (e.g. a connection failure), the request will be flagged for review.
What's next?
Read more about the deletion process using integrations here.
Read more about the get-a-copy process using integrations here.
Talk to us if you need any help with Integrations via our chat or at portal@saymine.com, and we'll be happy to assist!🙂