An Azure managed PostgreSQL database service for app development and deployment.
How to Allow Azure AD-Authenticated Users to Interact with PostgreSQL FDW Tables through User Mapping
I am using PostgreSQL Foreign Data Wrappers (FDW) in an Azure Database for PostgreSQL - Flexible Server environment. My users authenticate to the database using Azure AD token-based authentication.
The issue arises when these users attempt to run UPDATE queries on a foreign table (using postgres_fdw). PostgreSQL requires a USER MAPPING for each user on the foreign server, which typically includes a username and password. However, since my users authenticate via Azure AD tokens, I cannot provide a static password in the user mapping.
Additionally, because this is an Azure Flexible Server instance, I do not have SUPERUSER privileges, meaning I cannot set password_required = false on the foreign server.
Users connect to the database server using PGAdmin.
Question:
How can I enable Azure AD-authenticated users who connect through PGAdmin to update foreign tables via FDW without requiring a static password in the user mapping?
Any insights would be greatly appreciated!