PostgreSQL connector
This page describes how to use OpenIAM PostgreSQL Connector
The PostgreSQL connector synchronizes users, groups, and group memberships from a PostgreSQL database to OpenIAM, and manages standard PostgreSQL role privileges.
Synchronize users, groups, and memberships
✅
Add / revoke PostgreSQL privileges (CREATEDB, INHERIT, LOGIN, REPLICATION, CREATEROLE, SUPERUSER)
✅
Test connection
✅
Use cases
Importing PostgreSQL database roles (users, groups, memberships) into OpenIAM for visibility and access review.
Managing PostgreSQL privileges through OpenIAM roles.
Versions and compatibility
The end application is a PostgreSQL database, reached over JDBC. The connector manages database roles and their privileges, so it has no API version of its own — what it supports is what the server and the JDBC driver support.
Platform
PostgreSQL
Interface
JDBC
Managed objects
Database roles, and the privileges granted to them
Connection
Connection string and driver, set on the managed system
Prerequisites
A PostgreSQL admin account for the connector.
Network access from the connector host to the database host/port.
Installing the connector
Kubernetes
Enable the connector in your deployment configuration; no separate installation is required.
RPM
Use the connector service unit (openiam-connector@postgresql-connector-rabbitmq) or run the connector JAR — see Connectors via RPM.
Starting, stopping, and restarting
RPM (systemd)
systemctl start|stop|restart openiam-connector@postgresql-connector-rabbitmq
Kubernetes
kubectl rollout restart the connector deployment.
Command-line parameters and properties
The connector is a Spring Boot application. Its defaults ship inside the jar, and you override them in either of two places:
An external property file, read at
${confpath}/conf/properties/postgresql-connector.properties. The file is optional, andconfpathis itself a system property, set with-Dconfpath=/data/openiam/.Directly on the command line, as
-Darguments, which win over the file.
org.openiam.connector.queue
PostgreSQL_1_Request
⚠️ The default queue name lacks the usual _Connector_ infix (it is PostgreSQL_1_Request, not POSTGRESQL_Connector_1_Request). The connector record in OpenIAM must match this exact string.
org.openiam.connector.queueResponseName
PostgreSQL_1_Response
The connection details themselves are not set here — they are managed system parameters, covered under Configuring the managed system.
Verifying the connector is running
In the Webconsole, open the managed system — the Running connector status indicator must be green.
Click Test Connection — it must return success.
In the RabbitMQ management console, confirm the PostgreSQL_1_Request queue exists and has a consumer.
Troubleshooting
Connector never receives messages
Queue-name mismatch — the non-standard default name is the usual culprit
The connector record's queue must equal PostgreSQL_1_Request exactly (no _Connector_ infix).
Test connection fails
Wrong connection string or credentials
Verify the jdbc:postgresql://host:port/db format and the admin account.
Privilege changes don't apply
Custom field missing or misnamed
The custom field must be called "PostgreSQL privilege" and set on the role.
Search returns nothing
Search filter
Use rolname=? as the user search filter.
See also: general connector troubleshooting and the connector error-code reference.
Registering the connector in OpenIAM
For first usage, configure the connector:
Go to Webconsole → Provisioning → Connectors → PostgreSQL Connector.
Check the rows "Connection string" and "Search Filter for User".
Press Save.
Configuring the managed system
Go to Webconsole → Provisioning → Managed System → PostgreSQL Managed system and configure the fields for your environment:
Host
Database host
Port
Database port
Connection string
"jdbc:postgresql://database_host:database_port/database_name"
LoginId / Password
Credentials for an admin user of the database
Search filter for user
rolname=?
Attribute mapping and policy map
To manage PostgreSQL privileges (CREATEDB, INHERIT, LOGIN, REPLICATION, CREATEROLE, SUPERUSER):
Create a custom field called PostgreSQL privilege — Webconsole → Administration → Custom Fields → Create New Custom Field. Give it the type Text Field and mark it public.

Give the field a Metadata Type from the ROLE_TYPE grouping, and add it to a Role Page Template. A custom field that is created but never added to a template renders nowhere, so without this the Role screen has no PostgreSQL privilege field to fill in. See Page templates and custom fields.
Create a role for the PostgreSQL managed system and put the privilege you want in that field.

The connector reads these from a policy-map attribute named privileges, and derives the revoke form by prefixing NO — so removing SUPERUSER is sent as NOSUPERUSER. Map the custom field to privileges on the managed system's policy map, or the role is granted in OpenIAM and nothing reaches the database.
Reconciliation and synchronization
Configure a sync against the managed system as described in Configuring synchronization — the connector supplies users, groups, and memberships as source records (search filter rolname=?).
Last updated
Was this helpful?