|
| 1 | +# Release Notes |
| 2 | + |
| 3 | +## Microsoft.Data.SqlClient 2.1.0-preview2.20297.7 released 23 October 2020 |
| 4 | + |
| 5 | +This update brings the below changes over the previous release: |
| 6 | + |
| 7 | +### Added |
| 8 | +- Added support for Azure Active Directory Managed Identity authentication [#730](https://github.com/dotnet/SqlClient/pull/730) [[Read more](#Azure-Active-Directory-Managed-Identity-authentication)] |
| 9 | +- Added support to provide a user-defined application client ID when using Active Directory authentication [#740](https://github.com/dotnet/SqlClient/pull/740) [[Read more](#Azure-Active-Directory-authentication-using-an-application-client-ID)] |
| 10 | +- Added the "Command Timeout" connection string property to set a default timeout for all commands executed with the connection [#722](https://github.com/dotnet/SqlClient/pull/722) [[Read more](#Command-Timeout-connection-string-property)] |
| 11 | +- Added support for Always Encrypted on all supported platforms for .NET Standard 2.0 [#756](https://github.com/dotnet/SqlClient/pull/756) [[Read more](#Increased-support-for-Always-Encrypted)] |
| 12 | + |
| 13 | +### Fixed |
| 14 | +- Fixed unobserved exception issue when a timeout occurs before a faulted task completes with an exception [#688](https://github.com/dotnet/SqlClient/pull/688) [#773](https://github.com/dotnet/SqlClient/pull/773) |
| 15 | +- Fixed an issue where driver continues to prompt for credentials when using Azure Active Directory authentication [#770](https://github.com/dotnet/SqlClient/pull/770) |
| 16 | + |
| 17 | +### Changes |
| 18 | +- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET Core/Standard dependency) version to `v2.1.1` and removed symbols from `Microsoft.Data.SqlClient.SNI.runtime`, which are now published to Microsoft Symbols Server [#764](https://github.com/dotnet/SqlClient/pull/764) [[Read more](#Removal-of-symbols-from-Native-SNI)] |
| 19 | +- Updated `Microsoft.Identity.Client` dependency version to `v4.21.1` [#765](https://github.com/dotnet/SqlClient/pull/765) |
| 20 | +- Performance improvements when establishing an encrypted channel by removing sync over async method calls [#541](https://github.com/dotnet/SqlClient/pull/541) |
| 21 | +- Performance improvements by replacing heap-allocated arrays with Spans [#667](https://github.com/dotnet/SqlClient/pull/667) |
| 22 | +- Moved common files to shared folder between .NET Framework and .NET Core implementation [#734](https://github.com/dotnet/SqlClient/pull/734) [#753](https://github.com/dotnet/SqlClient/pull/753) |
| 23 | + |
| 24 | +## New features over Preview release v2.1.0-preview1 |
| 25 | + |
| 26 | +### Azure Active Directory Managed Identity authentication |
| 27 | +This preview release introduces support for Azure Active Directory authentication using [managed identities](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview). |
| 28 | + |
| 29 | +The following authentication mode keywords are supported: |
| 30 | +- Active Directory Managed Identity |
| 31 | +- Active Directory MSI (for cross MS SQL drivers compatibility) |
| 32 | + |
| 33 | +Connection string examples: |
| 34 | + |
| 35 | +```cs |
| 36 | +// For System Assigned Managed Identity |
| 37 | +"Server:{serverURL}; Authentication=Active Directory MSI; Initial Catalog={db};" |
| 38 | + |
| 39 | +// For System Assigned Managed Identity |
| 40 | +"Server:{serverURL}; Authentication=Active Directory Managed Identity; Initial Catalog={db};" |
| 41 | + |
| 42 | +// For User Assigned Managed Identity |
| 43 | +"Server:{serverURL}; Authentication=Active Directory MSI; User Id={ObjectIdOfManagedIdentity}; Initial Catalog={db};" |
| 44 | + |
| 45 | +// For User Assigned Managed Identity |
| 46 | +"Server:{serverURL}; Authentication=Active Directory Managed Identity; User Id={ObjectIdOfManagedIdentity}; Initial Catalog={db};" |
| 47 | +``` |
| 48 | + |
| 49 | + |
| 50 | +### Azure Active Directory authentication using an application client ID |
| 51 | +This preview release introduces support for passing a user-defined application client ID to the Microsoft Authentication Library, which will be used when authenticating with Azure Active Directory. |
| 52 | + |
| 53 | +The following new APIs are introduced: |
| 54 | + |
| 55 | +1. A new constructor has been introduced in ActiveDirectoryAuthenticationProvider:\ |
| 56 | +_[Applies to all .NET Platforms (.NET Framework, .NET Core and .NET Standard)]_ |
| 57 | + |
| 58 | +```csharp |
| 59 | +public ActiveDirectoryAuthenticationProvider(string applicationClientId) |
| 60 | +``` |
| 61 | + |
| 62 | +Usage: |
| 63 | +```csharp |
| 64 | +string APP_CLIENT_ID = "<GUID>"; |
| 65 | +SqlAuthenticationProvider customAuthProvider = new ActiveDirectoryAuthenticationProvider(APP_CLIENT_ID); |
| 66 | +SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, customAuthProvider); |
| 67 | + |
| 68 | +using (SqlConnection sqlConnection = new SqlConnection("<connection_string>") |
| 69 | +{ |
| 70 | + sqlConnection.Open(); |
| 71 | +} |
| 72 | +``` |
| 73 | + |
| 74 | +2. A new configuration property has been introduced under `SqlAuthenticationProviderConfigurationSection` and `SqlClientAuthenticationProviderConfigurationSection`:\ |
| 75 | +_[Applies to .NET Framework and .NET Core]_ |
| 76 | + |
| 77 | +```csharp |
| 78 | +internal class SqlAuthenticationProviderConfigurationSection : ConfigurationSection |
| 79 | +{ |
| 80 | + ... |
| 81 | + [ConfigurationProperty("applicationClientId", IsRequired = false)] |
| 82 | + public string ApplicationClientId => this["applicationClientId"] as string; |
| 83 | +} |
| 84 | + |
| 85 | +// Inheritance |
| 86 | +internal class SqlClientAuthenticationProviderConfigurationSection : SqlAuthenticationProviderConfigurationSection |
| 87 | +{ ... } |
| 88 | +``` |
| 89 | + |
| 90 | +Usage: |
| 91 | +```xml |
| 92 | +<configuration> |
| 93 | + <configSections> |
| 94 | + <section name="SqlClientAuthenticationProviders" |
| 95 | + type="Microsoft.Data.SqlClient.SqlClientAuthenticationProviderConfigurationSection, Microsoft.Data.SqlClient" /> |
| 96 | + </configSections> |
| 97 | + <SqlClientAuthenticationProviders applicationClientId ="<GUID>" /> |
| 98 | +</configuration> |
| 99 | + |
| 100 | +<!--or--> |
| 101 | + |
| 102 | +<configuration> |
| 103 | + <configSections> |
| 104 | + <section name="SqlAuthenticationProviders" |
| 105 | + type="Microsoft.Data.SqlClient.SqlAuthenticationProviderConfigurationSection, Microsoft.Data.SqlClient" /> |
| 106 | + </configSections> |
| 107 | + <SqlAuthenticationProviders applicationClientId ="<GUID>" /> |
| 108 | +</configuration> |
| 109 | +``` |
| 110 | + |
| 111 | +### "Command Timeout" connection string property |
| 112 | +This preview release introduces the "Command Timeout" connection string property to override the default of 30 seconds. The timeout for individual commands can be overridden using the `CommandTimeout` property on the SqlCommand. |
| 113 | + |
| 114 | +Connection string examples: |
| 115 | + |
| 116 | +`"Server:{serverURL}; Initial Catalog={db}; Integrated Security=true; Command Timeout=60"` |
| 117 | + |
| 118 | +### Increased support for Always Encrypted |
| 119 | +This preview release extends support for Always Encrypted on the following platforms: |
| 120 | + |
| 121 | +| Target Framework | Platform | New Feature support | |
| 122 | +|------------------|----------|----| |
| 123 | +| .NET Framework v4.6+ | Windows | *No changes* | |
| 124 | +| .NET Core 2.1+ | All operating systems | *No changes* | |
| 125 | +| .NET Standard 2.0 | All operating systems | Yes, support on all operating systems (without enclaves) | |
| 126 | +| .NET Standard 2.1+ | All operating systems | *No changes* | |
| 127 | + |
| 128 | +### Removal of symbols from Native SNI |
| 129 | +We've removed the symbols introduced in [v2.0.0](https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI/2.0.0) from [Microsoft.Data.SqlClient.SNI.runtime](https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI.runtime) NuGet starting with [v2.1.1](https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI.runtime/2.1.1). The public symbols are now published to Microsoft Symbols Server for tools like BinSkim that require access to public symbols. |
| 130 | + |
| 131 | + |
| 132 | +## Target Platform Support |
| 133 | + |
| 134 | +- .NET Framework 4.6+ (Windows x86, Windows x64) |
| 135 | +- .NET Core 2.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 136 | +- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 137 | + |
| 138 | +### Dependencies |
| 139 | + |
| 140 | +#### .NET Framework |
| 141 | + |
| 142 | +- Microsoft.Data.SqlClient.SNI 2.1.1 |
| 143 | +- Microsoft.Identity.Client 4.21.1 |
| 144 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 145 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 146 | + |
| 147 | +#### .NET Core 2.1 |
| 148 | + |
| 149 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 |
| 150 | +- Microsoft.Win32.Registry 4.7.0 |
| 151 | +- System.Security.Principal.Windows 4.7.0 |
| 152 | +- System.Text.Encoding.CodePages 4.7.0 |
| 153 | +- System.Diagnostics.DiagnosticSource 4.7.0 |
| 154 | +- System.Configuration.ConfigurationManager 4.7.0 |
| 155 | +- System.Runtime.Caching 4.7.0 |
| 156 | +- Microsoft.Identity.Client 4.21.1 |
| 157 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 158 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 159 | + |
| 160 | +#### .NET Core 3.1 |
| 161 | + |
| 162 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 |
| 163 | +- Microsoft.Win32.Registry 4.7.0 |
| 164 | +- System.Security.Principal.Windows 4.7.0 |
| 165 | +- System.Text.Encoding.CodePages 4.7.0 |
| 166 | +- System.Diagnostics.DiagnosticSource 4.7.0 |
| 167 | +- System.Configuration.ConfigurationManager 4.7.0 |
| 168 | +- System.Runtime.Caching 4.7.0 |
| 169 | +- Microsoft.Identity.Client 4.21.1 |
| 170 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 171 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 172 | + |
| 173 | +#### .NET Standard 2.0 |
| 174 | + |
| 175 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 |
| 176 | +- Microsoft.Win32.Registry 4.7.0 |
| 177 | +- System.Buffers 4.5.1 |
| 178 | +- System.Memory 4.5.4 |
| 179 | +- System.Security.Principal.Windows 4.7.0 |
| 180 | +- System.Text.Encoding.CodePages 4.7.0 |
| 181 | +- Microsoft.Identity.Client 4.21.1 |
| 182 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 183 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 184 | + |
| 185 | +#### .NET Standard 2.1 |
| 186 | + |
| 187 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 |
| 188 | +- Microsoft.Win32.Registry 4.7.0 |
| 189 | +- System.Buffers 4.5.1 |
| 190 | +- System.Memory 4.5.4 |
| 191 | +- System.Security.Principal.Windows 4.7.0 |
| 192 | +- System.Text.Encoding.CodePages 4.7.0 |
| 193 | +- Microsoft.Identity.Client 4.21.1 |
| 194 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 195 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
0 commit comments