Skip to main content

Community

Option to auto-trust a changed certificate when a sync failure triggers a retry

Answered

Please sign in to leave a comment.

Comments

1 comment

  • Official comment

    Hi Ajit, 

    Thanks for the detailed write-up, and for flagging this on behalf of the Q2 team.

    We looked into this closely, and it turns out there's a way to eliminate the underlying issue. The root cause is that when no persistent certificate is installed on a SQL Server instance, SQL Server falls back to generating a fresh self-signed certificate every time the service starts. Because that certificate is regenerated on each restart, its thumbprint changes, and that's what triggers Fivetran's TLS revalidation requirement, forcing a manual re-trust step.

    Rather than adding an auto-trust option (which would mean Fivetran silently accepting a new, unverified certificate on every restart, something that may create issues from a security standpoint), we'd recommend installing a persistent certificate (CA-signed, or a stable self-signed one you control) on your SQL Server instances. Once that's in place, the thumbprint stays stable across restarts, and you won't hit this revalidation prompt at all.

    A few pointers that should help, especially given you're managing this at scale via Terraform:

    1. Start here: Microsoft's guide to encrypting SQL Server connections by importing a certificate walks through installing the cert into the Windows cert store, granting the SQL Server service account access to the private key, and selecting it in SQL Server Configuration Manager.

    2. Certificate requirements: the cert must sit in the local computer certificate store (not the service account store), use the AT_KEYEXCHANGE KeySpec, and its SAN needs to cover every hostname your clients use to connect. Using the local computer store specifically means you won't need to reconfigure the cert if the SQL Server startup account ever changes, which matters for a fleet of your size.

    3. If you're on SQL Server 2019 or later, certificate management is built directly into SQL Server Configuration Manager, which simplifies deploying and managing certs across failover cluster instances and availability groups compared to the manual approach.

    Since you're already managing 1000+ connections via Terraform, this should be a one-time cert deployment you can roll into your existing provisioning rather than an ongoing operational burden.

    Let us know if this works for your team. Happy to dig in further if you hit any snags.

    Best,
    Rean Rodrigues - Product Manager, Fivetran