Repository navigation
Verify SQL Server certificates by default - #346
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQL Server connections sent
TrustServerCertificate=yesby default, so sqlit never checked the server's certificate, Azure SQL included. Anyone on the network path could pose as the server and receive the login.With the default TLS mode, sqlit now leaves verification on. The exceptions are servers on this machine (localhost, 127.0.0.1,
.\INSTANCE, LocalDB), where a self-signed certificate is normal and nobody can intercept. The trust option is hidden in default mode, so ayesstored on existing connections is just the old form default and is ignored. Connections where someone deliberately picked a TLS mode keep their settings.When a server's certificate can't be verified (typically a self-signed internal server), the connection error now asks "Trust this server?" instead of just failing. Yes switches that connection to encrypt-without-verify (
tls_mode=require, trustyes), saves it and reconnects, like SSH asking about a new host key.Heads-up for release notes: users with a self-signed SQL Server that isn't on their own machine get that one prompt the first time they connect after upgrading.