PostgreSQL DSR integration

Automate privacy request handling by integrating MineOS with PostgreSQL.

✓ Preview✓ Delete✓ Get a copy

Missing an action you need, or an integration we don't support yet? Contact your Customer Success Manager.

This integration automates privacy requests for PostgreSQL. MineOS runs the queries you define against your database, using the requester's email address, so you can preview, delete or copy their records.

To scan PostgreSQL for personal data, see PostgreSQL data classification integration.

How It Works

  • Preview: before MineOS deletes or copies anything, it runs your search query so you can preview the records it found for the requester.
  • Delete: MineOS runs your delete query for the requester's email address.
  • Get a copy: MineOS runs your copy query and sends the requester a copy of the records it returns. If the query returns no records, the task is reported as not found.

You write one query for each action. Each query must contain the {{endUserEmail}} variable, which MineOS replaces with the requester's email address. Instead of writing the SQL in MineOS, you can call a stored procedure in your own database.

Before You Start

  • The database user MineOS connects with needs SELECT on the tables you query, and permission to run your delete query.
  • MineOS must be able to reach your database. Whitelist the MineOS IPs in your database or firewall (IP & Email Whitelisting), or, if the database is on a private network, connect through a VPN tunnel.
📘

Test your queries first

MineOS runs your queries exactly as you write them and doesn't check them. Test each one in your own database before you save.

Setting Up

In the Request Handling section, make sure Handle this data source in privacy requests is selected.

Step 1: Grant permissions to the MineOS user

Grant the PostgreSQL user SELECT on the tables you want to scan. MineOS scans every database and table the user has access to, so you can grant access to all tables or only some.

Step 2: Connect in MineOS

Note: If you connect to an internal database through the MineOS VPN tunnel, add the database's IP as a route on the VPN settings page.

  1. Log in to MineOS. On the left sidebar, click Inventory → Data Sources. Click Add Data Source, search for PostgreSQL and click Add.

  2. Open the PostgreSQL data source → Integrations tab → Request Handling section → select Integration.

  3. Enter your database connection string, for example:
    Host=your-server-ip;Database=your-database;Username=your-user;Password=your-password;

  4. Click Test & Save.

Step 3: Add your privacy request queries

In the same Request Handling section, fill in the three query fields, then click Save:

  • Query used for search records & delete validation: finds the requester's records, for example SELECT name, phone, address FROM users WHERE email = '{{endUserEmail}}';
  • Copy Query: returns everything to include in the copy, for example SELECT * FROM users WHERE email = '{{endUserEmail}}';
  • Delete Query: deletes the requester's records, for example DELETE FROM users WHERE email = '{{endUserEmail}}';

You're done! MineOS has been connected to your PostgreSQL database.

Using the Integration in Requests

To handle requests automatically, add the PostgreSQL integration to the workflows of the privacy rights it should handle, such as deletion or get a copy.

Need Help?

If you need any help with this integration, please contact your Customer Success Manager. They will be happy to assist you!


Did this page help you?