PostgreSQL connector
Configure database settings, SSL and password, AWS IAM, Microsoft Entra ID, Kerberos or SSH-tunnel authentication for PostgreSQL connections.
PostgreSQL is enabled for saved source and destination connections. Use postgres for both connector_id and connector_type; its connector category is databases. It connects to PostgreSQL servers you run, Amazon RDS and Aurora PostgreSQL (including RDS Proxy), and Azure Database for PostgreSQL.
Database settings
| Field | Requirement |
|---|---|
host | Non-empty hostname or reachable database address. |
port | Integer from 1 to 65535; defaults to 5432. |
database | Non-empty database name. |
username | Non-empty database username. |
ssl_mode | disable, require, verify-ca or verify-full; defaults to disable. AWS IAM and Microsoft Entra ID sign-in require require, verify-ca or verify-full, and a connection that uses them with disable cannot be saved. |
ssh_tunnel | Optional SSH bastion used with any authentication branch except ssh_tunnel_auth. See SSH tunnel. |
Authentication
Choose exactly one authentication branch. Store credentials in a Secret Vault and select references containing namespace and key.
| Branch | Use it for |
|---|---|
password_auth | A database password. |
ssh_tunnel_auth | A database password, reached through an SSH bastion that is configured inside this branch. |
aws_iam_auth | Preview. Amazon RDS and Aurora PostgreSQL with IAM database authentication, including RDS Proxy. |
entra_service_principal_auth | Preview. Azure Database for PostgreSQL, signing in as a Microsoft Entra ID application. |
entra_access_token_auth | Preview. Azure Database for PostgreSQL, signing in with a Microsoft Entra ID access token you issue. |
kerberos_auth | A server that authenticates with Kerberos (GSSAPI), for example in an Active Directory or MIT Kerberos realm. |
Preview means the method is supported but has not yet been validated on every configuration of the cloud service. Its behavior may still change. Contact support if something does not work as described.
username is always required. For password sign-in it is the database user. For AWS IAM it is the database user that has been granted the rds_iam role. For Microsoft Entra ID it is the PostgreSQL role created for the Entra principal. For Kerberos it is both the user part of the Kerberos principal and the PostgreSQL role.
Connections saved with password_auth or ssh_tunnel_auth keep working unchanged.
Password authentication
Use password_auth.password_ref to reference the database password. This example is the connection configuration object:
{
"host": "db.example.internal",
"port": 5432,
"database": "analytics",
"username": "data_reader",
"ssl_mode": "verify-full",
"password_auth": {
"password_ref": {
"namespace": "production-data",
"key": "postgres-password"
}
}
}AWS IAM database authentication
VegaFlow signs a short-lived IAM authentication token each time it opens a database connection, so nothing expires between runs. The token is generated from access keys you store as secrets; VegaFlow never uses an AWS role or credentials of its own.
| Field | Requirement |
|---|---|
aws_iam_auth.access_key_id_ref | Required reference to the access key ID. |
aws_iam_auth.secret_access_key_ref | Required reference to the secret access key. |
aws_iam_auth.session_token_ref | Optional reference to a session token, for temporary credentials. |
aws_iam_auth.region | AWS Region of the database, such as eu-west-1. Optional when host is an *.rds.amazonaws.com endpoint name that contains the Region; required otherwise, for example when host is your own DNS name. |
{
"host": "analytics.cluster-abc123.eu-west-1.rds.amazonaws.com",
"port": 5432,
"database": "analytics",
"username": "vegaflow_reader",
"ssl_mode": "verify-full",
"aws_iam_auth": {
"access_key_id_ref": {
"namespace": "production-data",
"key": "aws-access-key-id"
},
"secret_access_key_ref": {
"namespace": "production-data",
"key": "aws-secret-access-key"
}
}
}Set up the database before you save the connection:
- Enable IAM database authentication on the RDS instance, Aurora cluster or RDS Proxy.
- Create the database user and grant it the
rds_iamrole:CREATE USER vegaflow_reader; GRANT rds_iam TO vegaflow_reader;, then grant the user the privileges the flow needs. - Attach an IAM policy that allows
rds-db:connecton the database user's resource ARN,arn:aws:rds-db:<region>:<account-id>:dbuser:<resource-id>/vegaflow_reader, to the IAM user or role whose access keys you store. For an RDS Proxy, use the proxy's resource ID. - Create the access key and store its parts in a Secret Vault.
Microsoft Entra ID
Azure Database for PostgreSQL accepts a Microsoft Entra ID access token as the password. Two branches are available. VegaFlow never uses an Azure identity of its own, and Entra user name and password sign-in is not offered.
Service principal. VegaFlow requests a fresh access token from Microsoft Entra ID each time it opens a database connection, using the application's client secret.
| Field | Requirement |
|---|---|
entra_service_principal_auth.tenant_id | Required directory (tenant) ID, as a GUID or as the tenant's domain name such as contoso.onmicrosoft.com. |
entra_service_principal_auth.client_id | Required application (client) ID, a GUID. |
entra_service_principal_auth.client_secret_ref | Required reference to the client secret. |
{
"host": "analytics.postgres.database.azure.com",
"port": 5432,
"database": "analytics",
"username": "vegaflow-app",
"ssl_mode": "verify-full",
"entra_service_principal_auth": {
"tenant_id": "11111111-2222-3333-4444-555555555555",
"client_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"client_secret_ref": {
"namespace": "production-data",
"key": "entra-client-secret"
}
}
}Access token. entra_access_token_auth.access_token_ref references a token you issued for the https://ossrdbms-aad.database.windows.net resource. VegaFlow does not refresh it, so the connection stops working when the token expires. Use it for tests; use the service principal for scheduled flows.
Set up the database before you save the connection:
- Enable Microsoft Entra authentication on the Azure Database for PostgreSQL server.
- Register an application in Microsoft Entra ID and create a client secret. Store the secret in a Secret Vault.
- As a Microsoft Entra administrator of the server, connect to the database and create a role for the application with
pgaadauth_create_principal, for exampleSELECT * FROM pgaadauth_create_principal('vegaflow-app', false, false);. The role name is the connection'susername. Then grant the role the privileges the flow needs.
Kerberos
Use Kerberos when your PostgreSQL server accepts gss authentication. VegaFlow signs in to your Kerberos key distribution centers (KDCs) as the user, asks for a ticket to the server's service principal, and presents it to PostgreSQL. No password is sent to the database.
| Field | Requirement |
|---|---|
username | Required. The user part of the Kerberos principal without the realm, for example vegaflow_reader, which must also be the PostgreSQL role name (see below). |
kerberos_auth.realm | Required. The Kerberos realm in upper case, for example CORP.EXAMPLE.COM. Only upper case letters, digits, dots and hyphens are accepted. |
kerberos_auth.kdc_hosts | Required list of one to three KDCs, each host or host:port. The port defaults to 88. VegaFlow talks to them over TCP only. |
kerberos_auth.password_ref or kerberos_auth.keytab_ref | Exactly one. A keytab secret holds the keytab file, base64 encoded. |
kerberos_auth.service_name | Optional. The service name of the server's principal; defaults to postgres. Set it when the server uses a different krb_srvname. |
{
"host": "db.corp.example.com",
"port": 5432,
"database": "analytics",
"username": "vegaflow_reader",
"ssl_mode": "verify-full",
"kerberos_auth": {
"realm": "CORP.EXAMPLE.COM",
"kdc_hosts": ["kdc1.corp.example.com", "kdc2.corp.example.com:88"],
"keytab_ref": {
"namespace": "production-data",
"key": "postgres-keytab"
}
}
}Kerberos does not require TLS, because the ticket is not a password, but TLS still protects your data; choose an ssl_mode as you would for any other connection. Kerberos works with the top-level ssh_tunnel object. Do not combine it with ssh_tunnel_auth.
To set it up:
-
Create the server's service principal. The server needs the principal
postgres/<host>@REALM, where<host>is the name you put inhost, spelled the way the principal is registered (VegaFlow lowercases it and does not look it up in DNS, so use the fully qualified name, not an alias). Export its keytab to the server and point PostgreSQL at it inpostgresql.conf:krb_server_keyfile = '/etc/postgresql/postgres.keytab'The keytab must be readable by the operating system user that runs PostgreSQL. Change
krb_srvnameon the server only if you also setkerberos_auth.service_name. -
Allow
gssinpg_hba.conf. Use ahostorhostsslline, nothostgssenc, because VegaFlow does not use GSS encryption (TLS is chosen withssl_mode):host analytics all all gss include_realm=0include_realm=0removes the realm from the principal, sovegaflow_reader@CORP.EXAMPLE.COMbecomes the rolevegaflow_reader. Without it, the role must be mapped from the full principal with apg_ident.confmap. Addkrb_realm=CORP.EXAMPLE.COMto accept only your realm. PostgreSQL compares principals case-sensitively unless you setkrb_caseins_users. -
Create the role.
CREATE ROLE vegaflow_reader LOGIN;, then grant it the privileges the flow needs. The role has no password. -
Let VegaFlow reach the KDCs.
kdc_hostsare network destinations likehost: they follow the connection's network access, so private KDCs need a private connection on dedicated compute, and TCP port 88 (or the port you give) must be open to it. If the database is reached through an SSH tunnel, the KDCs are reached through the same bastion, so the bastion must be able to reach them. The KDC address must be resolvable from VegaFlow compute, ashostis. -
Provide the credential. Use a password secret, or a keytab for the user's principal. With MIT Kerberos,
ktutilwrites one:ktutil addent -password -p vegaflow_reader@CORP.EXAMPLE.COM -k 1 -e aes256-cts-hmac-sha1-96 wkt vegaflow_reader.keytabThen store the base64 text of the file in your Secret Vault, for example
base64 -w0 vegaflow_reader.keytab, and reference it withkeytab_ref. Create a new keytab whenever the principal's key changes. -
Keep clocks in step. Kerberos rejects requests when the clocks of VegaFlow, the KDC and the database server differ by more than a few minutes (five by default). Keep all three on network time.
If a connection fails, the error tells you which step to check:
| Error | What to check |
|---|---|
| The KDC rejected the Kerberos sign-in | The username and realm, the password or keytab (a keytab must hold a key for exactly this principal), and that the account is enabled and has not expired. |
| Clock skew between the connector runtime and the KDC | Network time on the KDCs, and on the database server. |
| The KDC does not know the database's service principal | That postgres/<host> is registered in the realm for exactly the host you configured, or kerberos_auth.service_name. |
| The Kerberos KDC could not be reached | The kdc_hosts addresses, port 88 reachability from VegaFlow compute (or the bastion), and the connection's network access. |
| The database rejected the credentials | The pg_hba.conf gss line, the keytab the server uses, that the role exists, and the principal-to-role mapping. |
SSH tunnel
Use an SSH tunnel when the database is reachable through a bastion. There are two ways to configure it.
With ssh_tunnel_auth, the tunnel settings and the PostgreSQL password_ref live in one branch.
| Field | Requirement |
|---|---|
ssh_host | Required bastion hostname or address. |
ssh_port | Integer from 1 to 65535; defaults to 22. |
ssh_user | Required SSH username. |
ssh_host_fingerprint | Required, verified SSH host fingerprint. |
ssh_password_ref or ssh_private_key_ref | Exactly one SSH credential reference. |
ssh_private_key_passphrase_ref | Optional passphrase reference for an encrypted private key. |
{
"host": "db.private.internal",
"port": 5432,
"database": "analytics",
"username": "data_reader",
"ssl_mode": "require",
"ssh_tunnel_auth": {
"password_ref": {
"namespace": "production-data",
"key": "postgres-password"
},
"ssh_host": "bastion.example.internal",
"ssh_port": 22,
"ssh_user": "connector",
"ssh_host_fingerprint": "SHA256:replace-with-verified-fingerprint",
"ssh_private_key_ref": {
"namespace": "production-data",
"key": "ssh-private-key"
}
}
}To use a tunnel with password_auth, aws_iam_auth, entra_service_principal_auth or entra_access_token_auth, add the top-level ssh_tunnel object instead. Do not combine it with ssh_tunnel_auth.
| Field | Requirement |
|---|---|
ssh_tunnel.host | Required bastion hostname or address. |
ssh_tunnel.port | Integer from 1 to 65535; defaults to 22. |
ssh_tunnel.user | Required SSH username. |
ssh_tunnel.host_key_fingerprint | Required, verified SSH host fingerprint. |
ssh_tunnel.password_ref or ssh_tunnel.private_key_ref | Exactly one SSH credential reference. |
ssh_tunnel.private_key_passphrase_ref | Optional passphrase reference for an encrypted private key; needs private_key_ref. |
{
"host": "analytics.cluster-abc123.eu-west-1.rds.amazonaws.com",
"database": "analytics",
"username": "vegaflow_reader",
"ssl_mode": "require",
"aws_iam_auth": {
"access_key_id_ref": { "namespace": "production-data", "key": "aws-access-key-id" },
"secret_access_key_ref": { "namespace": "production-data", "key": "aws-secret-access-key" }
},
"ssh_tunnel": {
"host": "bastion.example.internal",
"user": "connector",
"host_key_fingerprint": "SHA256:replace-with-verified-fingerprint",
"private_key_ref": { "namespace": "production-data", "key": "ssh-private-key" }
}
}With AWS IAM, the token is signed for the host and port you configure, not for the tunnel's local end. With Kerberos, the server's principal is built from the host you configure. Through a tunnel the database certificate is checked against that same host, so verify-full works as it does without a tunnel.
Verify the bastion identity
Obtain the host fingerprint through a trusted channel before saving it. Investigate a mismatch instead of replacing the fingerprint with one from a failed, unauthenticated connection.
SSL modes
| Mode | Behavior |
|---|---|
disable | Does not require TLS; use only with an explicitly trusted network and database configuration. |
require | Encrypts the connection without full certificate identity verification. |
verify-ca | Requires a certificate chain trusted by the runtime. |
verify-full | Also verifies that the server identity matches the requested host. |
Choose the strongest mode supported by the database deployment. The default is disable, so set the intended mode explicitly.
AWS IAM and Microsoft Entra ID sign-in send a token as the database password, so a connection that uses them is refused with disable when you save it. Set ssl_mode to require, verify-ca or, preferably, verify-full.
Validate and save
- Create the database and any SSH secret references.
- Open VegaFlow → Connections → New connection and choose PostgreSQL.
- Enter database settings and select one authentication branch. For AWS IAM or Microsoft Entra ID, also set
ssl_modetoverify-full(at leastrequire). - Validate connectivity, authentication and the required source or destination privileges.
- Save and grant the QuickFlow operator permission to use the connection.
Revalidate after changes to credentials, database settings or network access. Use catalog discovery to select streams and supported sync modes for a flow.
Troubleshooting
| Failure | Check |
|---|---|
| Configuration rejected | Required fields, port range, SSL mode (not disable for AWS IAM and Microsoft Entra ID), exactly one authentication branch, a valid AWS Region or tenant, a Kerberos realm in upper case with one to three KDCs and exactly one of password or keytab, and exactly one SSH credential type. |
| Network unavailable | DNS, routing, firewall, database listener and bastion reachability. |
| Authentication failed | Database username/password, SSH identity and secret permissions. For AWS IAM: the rds_iam grant, the rds-db:connect policy on the exact database user, the Region and the access keys. For Microsoft Entra ID: the role created with pgaadauth_create_principal, the tenant and application IDs, and the client secret. For Kerberos: see the table under Kerberos. |
| Certificate rejected | Runtime CA trust, requested hostname (the host you configured, also through an SSH tunnel) and SSL mode. |
| Host fingerprint mismatch | Verify the bastion identity through a trusted channel before changing configuration. |