Visual Studio Code - SQL Server (mssql) Version 1.17.0 - Encryption By Default

  • Microsoft is warning of a "BREAKING CHANGE" and indeed this little update took my dev work down for a bit. Hopefully these notes can save someone a lot of time tinkering around.

    Starting with this update encryption is enabled by default, unluckily the wizard to set up a new connection does not feature an option to switch this off, so creation of a new profile to a server that does not allow encrypted connections (e.g., lacking a certificate), fails and no profile is created.

    If you have a lot of connections that cannot use encryption the best way I found was to edit the settings (c.f. here how to find them: https://github.com/microsoft/vscode-mssql/wiki/manage-connection-profiles) and insert a line of

    "encrypt": false,

    into all such definitions, BEFORE updating to version 1.17.0. When you update all these will be changed to

    "encrypt": "Optional",

    for the new format. Note that prior versions want the boolean, the new version wants a string (Problems indication on the JSON file will show this up).

    Since the "Add Connection" walkthrough fails where no encryption is available, I now add a new connection for version 1.17.0 by editing the settings file, copying over a reasonably suitable other connection and applying the required changes.

    Note: if you are using authentication by "SqlLogin" and want to store a password, you need to give the actual password for that connection in the configuration set. It will be removed (and stored elsewhere) once the file is processed by the extension again. This stymied me for a bit since I did not find another way to update a password, if this file specifies an empty string for a connection that is being changed.

    Thanks for reading!

  • This encrypt by default has been a pain, since lots connection strings need altering. thanks for posting the note.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply