PostgreSQL¶
This guide demonstrates a basic Fudo Enterprise configuration for monitoring and controlling PostgreSQL database access through a secure proxy connection.
Note
PostgreSQL connections use native client support only. The connection command is available through the User Access Gateway portal after configuration.
Prerequisites¶
Before starting this configuration:
System must be initialized (see System initiation)
PostgreSQL server must be accessible from Fudo Enterprise
PostgreSQL client (
psql) must be installed on your workstation
Architecture Overview¶
The following diagram illustrates the PostgreSQL connection flow:
Connection Flow:
User authenticates to User Access Gateway (https://10.31.134.220)
User receives connection command with One-Time Password (OTP)
Native
psqlclient connects through Fudo Enterprise proxyFudo Enterprise authenticates and forwards connection to PostgreSQL server
Configuration Steps¶
Step 1: Create PostgreSQL Server
Define the target PostgreSQL server in Fudo Enterprise.
Navigate to >
Click
Configure the server with following settings:
General
Name:PostgreSQL_ServerDescription:Production PostgreSQL DatabaseBlocked: ☐ UncheckedSettings Tab: Protocol
Protocol:PostgreSQLTLS enabled: ✓ Checked (recommended for security)Legacy crypto: ☐ UncheckedUse SSH tunnel: ☐ UncheckedSettings Tab: Bind Address
Bind address:AnySettings Tab: Destination
Type:IPv4Address:10.0.100.7Mask:32Port:5432Settings Tab: Server Verification
Method:Server certificateorNone
Click .
Step 2: Create User
Create a user who will access the PostgreSQL server.
Select > .
Click .
Provide essential user information:
General
Name:john_smithBlocked: ☐ UncheckedAccount validity:IndefiniteSettings Tab
Authentication failures: ☐ UncheckedEnforce password complexity: ☐ UncheckedAdd authentication method:Static passwordPasswordjohnUser Data Tab
Full name:John SmithEmail:john@smith.comRoles Tab
Assign Role: e.g.,admin
Click .
Step 3: Create Listener
Configure the proxy endpoint for PostgreSQL connections.
Navigate to >
Click
Configure the listener:
General Settings
Name:PostgreSQL_ListenerProtocol:PostgreSQLBlocked: ☐ UncheckedConnection Settings
Mode:proxyLocal address:10.31.134.220Port:5432TLS enabled: ✓ Checked (required for PostgreSQL)Legacy crypto: ☐ UncheckedAccess Control
Granted users: Leave empty (configured via safe)
Click .
Step 4: Create Account
Define database credentials for authentication.
Navigate to >
Click
Configure the account:
General
Name:PostgreSQL_AccountSession recording:allNotes:PostgreSQL admin accountSettings Tab: Type
Account type:REGULARSettings Tab: Target
Server:PostgreSQL_Server(select from dropdown)Settings Tab: Credentials
Replace secret with:PasswordSecret: Your PostgreSQL passwordLogin: Your PostgreSQL loginPassword Changers Tab: General
Password change policy:Static, without restrictions
Click .
Step 5: Create Safe Configure access control and bind all components together.
Navigate to >
Click
Configure the safe:
General
Name:PostgreSQL_SafeBlocked: ☐ UncheckedGeneral Tab: Connection
Login reason: ✓ Checked (optional, for audit trail)General Tab: Access
OTP in Access Gateway: ✓ CheckedWeb Client: ☐ Unchecked
Click .
Add users to the safe:
Select Users tab
Click
Find and add your user (e.g.,
John)Click
Add account to the safe:
Select Accounts tab
Click
Find and add
PostgreSQL_AccountClick
Assign listener to the account:
Click in the Listeners column for
PostgreSQL_AccountFind and add
PostgreSQL_ListenerClick
Click
Establishing PostgreSQL Connection¶
Step 1: Access User Portal
Open your browser and navigate to the User Access Gateway address. Example:
https://10.31.134.220
Login with the credentials used while creating User:
Login:john_smithPassword:john
Step 2: Get Connection Command
Locate
PostgreSQL_Accountin the resources listClick on the Native client dropdown arrow
You’ll see:
Fingerprint: Server identification hash
One Time Password: Valid for 5 minutes
Connection command: Ready-to-use psql command
Step 3: Connect Using psql
Copy the connection command and replace <database_name> with your target database:
# Template format
psql postgres://[OTP]:empty@10.31.134.220:5432/<database_name>
# Example: Connect to custom database
psql postgres://85156504qLOOtF4bWesSntHHvQoTIjED:empty@10.31.134.220:5432/myapp_db
Note
Important Connection Details:
The OTP (One-Time Password) expires after 5 minutes
Password field is always
empty- authentication uses the OTP tokenYou MUST specify the database name at the end of the connection string
Related topics: