Register a PostgreSQL Connection
Requirements
Immuta supports the following PostgreSQL versions:
PostgreSQL 16
PostgreSQL 17
Data consumers must access data directly through PostgreSQL. Immuta governs PostgreSQL data for consumers accessing data directly through PostgreSQL. Transactional use cases where users access data through downstream applications that are writing data from PostgreSQL are outside of the scope of Immuta’s governance.
Permissions
The user registering the connection must have the permissions below.
APPLICATION_ADMIN
Immuta permission to register the connectionThe account credentials you provide to register the connection must have these PostgreSQL privileges:
Ownership of the database, schemas, and tables registered in Immuta OR all of the privileges listed below.
CONNECT
on the database to be protectedUSAGE
on the schema to be protectedThe following privileges on tables to be protected with
GRANT OPTION
:SELECT
DELETE
INSERT
TRUNCATE
UPDATE
ALTER TABLE
Database superuser OR
CREATEROLE
privilege
For descriptions and explanations of privileges Immuta needs to enforce policies and maintain state in PostgreSQL, see the PostgreSQL connection reference guide.
Register a PostgreSQL connection
In your PostgreSQL environment, create an Immuta database that Immuta can use to connect to your PostgreSQL instance to register the connection and maintain state with PostgreSQL.
Having this separate database for Immuta prevents custom ETL processes or jobs deleting the database you use to register the connection, which would break the connection.
In Immuta, click Data and select Connections in the navigation menu.
Click the + Add Connection button.
Select the PostgreSQL tile.
Select your deployment type:
Neon
Self Managed
Enter the host connection information:
Display Name: This is the name of your new connection. This name will be used in the API (
connectionKey
), in data source names from the host, and on the connections page.Hostname
Port
Database: Enter the name of the Immuta database you created in your PostgreSQL environment.
Click Next.
Enter privileged credentials to register the connection. Select your deployment method below for guidance.
Click Save Connection.
Copy the provided script and run it in PostgreSQL as a user with the privileges listed above.
Click Validate Connection.
If the connection is successful, click Next. If there are any errors, check the connection details and credentials to ensure they are correct and try again.
Ensure all the details are correct in the summary and click Complete Setup.
Map users
Requirement: USER_ADMIN
Immuta permission
Map AWS IAM principals or PostgreSQL usernames to each Immuta user account to ensure Immuta properly enforces policies.
The instructions below illustrate how to do this for individual users, but you can also configure user mapping in your IAM connection on the app settings page.
Click People and select Users in the navigation menu.
Click the user's name to navigate to their page and scroll to the External User Mapping section.
Select your deployment method below for guidance on mapping users.
Last updated
Was this helpful?