Forum Discussion
Unable to connect MS Fabric and Azure database for Postgres using copy activity
- 9 months ago
Hi All,
Thanks for your support , the issue has now been resolved. With the same tech stack, the on-premises data gateway works as expected.
Below is the additional action required:
Microsoft Fabric currently does not support mutual TLS (mTLS) when connecting to PostgreSQL. It only supports standard TLS with username/password authentication and cannot present the client certificate and key required by our mTLS-enabled PgBouncer endpoint. Due to this limitation, Fabric fails during the handshake phase, resulting in the error observed.
To enable Fabric connectivity while preserving our existing security posture, we will proceed with Alternative 1 from our internal analysis:
✅Planned Approach
We will relax mTLS enforcement only for Fabric by setting up a dedicated PgBouncer listener/pool that:does not require client certificates,
is accessible from Fabric’s data gateway public IP range, and IP address of on prem data gateway.
retains full mTLS enforcement for all other traffic.This approach allows us to maintain strong security controls while ensuring Fabric can connect successfully.
Hi Kash10 I read thru your message and there're something I would like to clarify that I think will help figuring this issue out 🤞 ... so, let first enumerate the conditions:
#1. You have a PostgreSQL Database hosted in Azure AND you do NOT WANT that server to have Public access that is allowing all IP addresses.
#2. You said 👉"Fabric does not expose any fixed outbound IP that I can whitelist", and that's true because Fabric is a platform with hundreds of VNET's and whitelisting Fabric traffic is not possible.
#3. Then, you created a on-prem data gateway to funnel your traffic via one VM (the gateway) and whitelist your VM IP address on your Azure PostgreSQL, and it did not work.
If all of what I just said is true, some conclusions:
#1. Witelist Fabric traffic is not a solution
#2. You On-prem gateway IS NOT GOING TO WORK, because your PostgreSQL database IS NOT ON PREM... is it in Azure! You're trying to use On-prem gateway as a "workaround" to reach azure, but this is not the suggested approach for your escenario, you need something different: Virtual network data gateway
#3. And from your PostgreSQL, you need to configure a Network with private access (virtual network integration) for Azure Database for PostgreSQL https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking-private ; of course this bring a WHOLE NEW TOPIC, that is Networking in Azure, but this depends a lot of your company confirguration, policies, restrictions, topology, etc. etc. etc. that is out of the scope for this forum (unless specific implementation questions)
The solution to your issue can be summarized as follow:
#1. You are using an incorrect gateway in Fabric
#2. You need to choose, or you allows public access on your postgresql for Fabric to communicate, or you configure Network with private access in PostgreSQL in combination with a Virtual network data gateway in Fabric.
Hope I did capture your scenario 😅 and this information has been useful, i would appreciate a kudos and for to mark this as "solution" of your issue, I know you have lots to do to acctually get this working, but I hope you consider my analysis as the actual solution for this post.... best of lucks.