Enhancement Request - Automatic Population of PostgreSQL application_name with Client Host Information - Mailing list pgadmin-support

From abhishek s
Subject Enhancement Request - Automatic Population of PostgreSQL application_name with Client Host Information
Date
Msg-id CAE3Vk9mocZ-uJU2XEhqq3GRbwT7P5HAgyMy4ibeOH5RyR2ucWg@mail.gmail.com
Whole thread
Responses Re: Enhancement Request - Automatic Population of PostgreSQL application_name with Client Host Information
List pgadmin-support
Hi team,

Background 
The current PostgreSQL audit logs in Azure record are below 

Database user

Database name

Client IP (appears as the Zscaler egress IP)

Application name (currently pgAdmin4)

Problem
Because the organization uses VPN or a similar proxy, PostgreSQL only sees the proxy's IP address instead of the actual user's workstation IP.

As a result:

The Client IP is not useful for identifying who accessed the database.

The application_name is always "pgAdmin4", which is static.

Security and audit teams cannot determine:

Which workstation connected

Which employee initiated the connection

Which machine executed the SQL statements

Proposed Enhancement:
The request suggests that pgAdmin should automatically populate PostgreSQL's application_name connection parameter with client metadata when establishing the database connection.

Examples shown in the document:

<hostname>
or

<hostname>|<logged-in-user>

Examples:

LAPTOP-abc
or

LAPTOP-hostname|username

Benefit
If PostgreSQL logs include this value, Azure Monitor, Log Analytics, or SIEM tools can immediately identify:

User workstation

Logged-in Windows user

Database user

Database name

Timestamp

SQL activity

This greatly improves:

Audit compliance

Security investigations

Traceability

Forensic analysis

Please review and let me know if we can do this enhancement 

Thanks for the support 
Abhishek S 
Attachment

pgadmin-support by date:

Previous
From: Ashesh Vashi
Date:
Subject: pgAdmin 4 v9.17 Released
Next
From: Dave Page
Date:
Subject: Re: Enhancement Request - Automatic Population of PostgreSQL application_name with Client Host Information