Skip to main content

PostgreSQL

The PostgreSQL connector for rudol allows you to connect your PostgreSQL 14+ databases.

info

Your PostgreSQL server instance must be publicly available through a resolvable DNS hostname or public IPv4, see Security Guidelines to know more on how to apply firewall restrictions

Connection parameters

NameTypeDescription
HostnametextPublicly accesible PostgreSQL server DNS hostname
PortnumberServer port number (5432 by default)
UsertextPostgreSQL user name, see User permissions
PasswordpasswordPostgreSQL user password

User permissions

In order to grant rudol the necessary permissions to fetch your database metadata we recommend you to create a new PostgreSQL user with access restricted only to the pg_catalog database.

caution

Keep in mind that the created user would have the public Role by default so it will inherit its default permissions

Here is a sample code to create a new user for rudol with minimal permissions for metadata scan:

CREATE ROLE rudol_user WITH PASSWORD 'super-secret-password';

GRANT SELECT ON TABLE pg_catalog.pg_namespace TO rudol_user;
GRANT SELECT ON TABLE pg_catalog.pg_class TO rudol_user;
GRANT SELECT ON TABLE pg_catalog.pg_description TO rudol_user;
GRANT SELECT ON TABLE pg_catalog.pg_attribute TO rudol_user;
info

If you want to use Observability features these permissions won't be enough: you'll have to grant SELECT to each table you'd like to run tests for.

Restrict connections by IP Address

You can also restrict access to only accept incoming connections from the rudol public IP Address 52.6.101.83.

To do this you will probably have to add a new record to your PostgreSQL pg_hba.conf. You can read more about this here.