An Azure managed PostgreSQL database service for app development and deployment.
Hello @Duane Wald
No. Npgsql SslMode=VerifyFull does not cryptographically authenticate a specific Azure Resource Manager PostgreSQL server. It verifies two things:
- The server certificate chains to a trusted certificate authority.
- The certificate is valid for the hostname supplied in the connection string.
Npgsql describes VerifyFull as encryption, certificate validation, and verification against the specified hostname.
Therefore, VerifyFull protects against an untrusted endpoint or a certificate that doesn’t match the requested FQDN. It doesn’t validate the Azure subscription, resource group, ARM resource ID, database contents, or lifecycle identity of the server.
The connection reaches the intended resource through several independent controls:
- Private DNS must resolve the designated FQDN to the correct private address.
- The client VNet must be linked to the appropriate private DNS zone.
- VNet routing, NSGs, firewalls, and delegated-subnet controls must permit only the intended path.
- Azure’s service infrastructure must map the endpoint to the intended Flexible Server.
- PostgreSQL authentication must then authorize the supplied database identity.
I recommend always connecting with the server FQDN because the private IP address can change. Clients in other VNets must also be linked to the server’s private DNS zone or use an appropriately configured DNS forwarder.
If DNS is maliciously or incorrectly redirected, VerifyFull fails only when the endpoint cannot present a trusted certificate valid for the requested FQDN. Microsoft’s documentation doesn’t state that the TLS certificate uniquely identifies one Azure ARM resource, so it shouldn’t be treated as resource-level attestation.
Certificate rotation should continue to work as long as the replacement certificate remains valid for the FQDN and chains to a root trusted by the client. I recommend retaining the complete Azure root CA set to accommodate certificate changes.
A restore is different: point-in-time and geo-restore operations create a new Flexible Server rather than overwriting the original. Update the connection string to the restored server’s name and recreate the required networking controls.
Finally, VerifyFull does not guarantee continuity after deletion and server-name reuse. If a future resource legitimately owns the same DNS name and presents a trusted certificate valid for that name, hostname verification alone doesn’t distinguish it from the former resource. Use Azure RBAC, deletion protection or resource locks, controlled private DNS permissions, Azure Policy, and deployment governance where resource continuity matters.
References:
Configure TLS for PostgreSQL Flexible Server
Private networking for PostgreSQL Flexible Server
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.