|
| 1 | +# Release Notes |
| 2 | + |
| 3 | +## [Preview Release 5.2.0-preview3.23201.1] - 2023-07-20 |
| 4 | + |
| 5 | +This update brings the below changes over the previous release: |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- Added support of the new .NET [NegotiateAuthentication](https://learn.microsoft.com/en-us/dotnet/api/system.net.security.negotiateauthentication?view=net-7.0) API for .NET 7.0 and above against SSPI token using ManagedSNI. [#2063](https://github.com/dotnet/SqlClient/pull/2063) |
| 10 | +- Added new `AccessTokenCallBack` API to `SqlConnection`. [#1260](https://github.com/dotnet/SqlClient/pull/1260) [Read more](#added-new-property-accesstokencallback-to-sqlconnection) |
| 11 | +- Added support `SuperSocketNetLib` registry option for Encrypt on NetCore Windows. [#2047](https://github.com/dotnet/SqlClient/pull/2047) |
| 12 | + |
| 13 | +### Fixed |
| 14 | + |
| 15 | +- Fixed `SqlDataAdapter.Fill` and configurable retry logic issue on .NET Framework. [#2084](https://github.com/dotnet/SqlClient/pull/2084) |
| 16 | +- Fixed `SqlConnectionEncryptOption` type conversion by introducing the `SqlConnectionEncryptOptionConverter` attribute using **appsettings.json** files. [#2057](https://github.com/dotnet/SqlClient/pull/2057) |
| 17 | +- Fixed th-TH culture info issue on Managed SNI. [#2066](https://github.com/dotnet/SqlClient/pull/2066) |
| 18 | + |
| 19 | +### Changed |
| 20 | + |
| 21 | +- Removed `ignoreSniOpenTimeout` in open connection process on Windows. [#2067](https://github.com/dotnet/SqlClient/pull/2067) |
| 22 | +- Enforcing ordinal for `StringComparison`. [#2068](https://github.com/dotnet/SqlClient/pull/2068) |
| 23 | +- Code health improvements: [#1959](https://github.com/dotnet/SqlClient/pull/1959), [#2071](https://github.com/dotnet/SqlClient/pull/2071), [#2073](https://github.com/dotnet/SqlClient/pull/2073), [#2088](https://github.com/dotnet/SqlClient/pull/2088) |
| 24 | + |
| 25 | +## New feature over preview release v5.2.0-preview2 |
| 26 | + |
| 27 | +### Added new property `AccessTokenCallBack` to SqlConnection |
| 28 | + |
| 29 | +SqlConnection supports `TokenCredential` authentication by introducing a new `AccessTokenCallBack` porperty as `Func<SqlAuthenticationParameters, CancellationToken,Task<SqlAuthenticationToken>>` delegate to return a federated authentication access token. |
| 30 | + |
| 31 | +Example usage: |
| 32 | + |
| 33 | +```C# |
| 34 | + using Microsoft.Data.SqlClient; |
| 35 | + using Azure.Identity; |
| 36 | + |
| 37 | + const string defaultScopeSuffix = "/.default"; |
| 38 | + string connectionString = GetConnectionString(); |
| 39 | + using SqlConnection connection = new SqlConnection(connectionString); |
| 40 | + |
| 41 | + connection.AccessTokenCallback = async (authParams, cancellationToken) => |
| 42 | + { |
| 43 | + var cred = new DefaultAzureCredential(); |
| 44 | + string scope = authParams.Resource.EndsWith(defaultScopeSuffix) ? authParams.Resource : authParams.Resource + defaultScopeSuffix; |
| 45 | + AccessToken token = await cred.GetTokenAsync(new TokenRequestContext(new[] { scope }), cancellationToken); |
| 46 | + return new SqlAuthenticationToken(token.Token, token.ExpiresOn); |
| 47 | + } |
| 48 | + |
| 49 | + connection.Open(); |
| 50 | + Console.WriteLine("ServerVersion: {0}", connection.ServerVersion); |
| 51 | + Console.WriteLine("State: {0}", connection.State); |
| 52 | +``` |
| 53 | + |
| 54 | +## Target Platform Support |
| 55 | + |
| 56 | +- .NET Framework 4.6.2+ (Windows x86, Windows x64) |
| 57 | +- .NET 6.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 58 | +- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 59 | + |
| 60 | +### Dependencies |
| 61 | + |
| 62 | +#### .NET Framework |
| 63 | + |
| 64 | +- Microsoft.Data.SqlClient.SNI 5.1.0 |
| 65 | +- Azure.Identity 1.8.0 |
| 66 | +- Microsoft.Identity.Client 4.53.0 |
| 67 | +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 |
| 68 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 |
| 69 | +- System.Buffers 4.5.1 |
| 70 | +- System.Configuration.ConfigurationManager 6.0.1 |
| 71 | +- System.IO 4.3.0 |
| 72 | +- System.Runtime.InteropServices.RuntimeInformation 4.3.0 |
| 73 | +- System.Security.Cryptography.Algorithms 4.3.1 |
| 74 | +- System.Security.Cryptography.Primitives 4.3.0 |
| 75 | +- System.Text.Encoding.Web 6.0.0 |
| 76 | + |
| 77 | +#### .NET |
| 78 | + |
| 79 | +- Microsoft.Data.SqlClient.SNI 5.1.0 |
| 80 | +- Azure.Identity 1.8.0 |
| 81 | +- Microsoft.Identity.Client 4.53.0 |
| 82 | +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 |
| 83 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 |
| 84 | +- Microsoft.SqlServer.Server 1.0.0 |
| 85 | +- System.Buffers 4.5.1 |
| 86 | +- System.Configuration.ConfigurationManager 6.0.1 |
| 87 | +- System.Diagnostics.DiagnosticSource 6.0.0 |
| 88 | +- System.IO 4.3.0 |
| 89 | +- System.Runtime.Caching 6.0.0 |
| 90 | +- System.Text.Encoding.CodePages 6.0.0 |
| 91 | +- System.Text.Encodings.Web 6.0.0 |
| 92 | +- System.Resources.ResourceManager 4.3.0 |
| 93 | +- System.Security.Cryptography.Cng 5.0.0 |
| 94 | +- System.Security.Principal.Windows 5.0.0 |
| 95 | + |
| 96 | +#### .NET Standard |
| 97 | + |
| 98 | +- Microsoft.Data.SqlClient.SNI 5.1.0 |
| 99 | +- Azure.Identity 1.6.0 |
| 100 | +- Microsoft.Identity.Client 4.53.0 |
| 101 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 |
| 102 | +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 |
| 103 | +- Microsoft.SqlServer.Server 1.0.0 |
| 104 | +- Microsoft.Win32.Registry 5.0.0 |
| 105 | +- System.Buffers 4.5.1 |
| 106 | +- System.Configuration.ConfigurationManager 6.0.1 |
| 107 | +- System.IO 4.3.0 |
| 108 | +- System.Runtime.Caching 6.0.0 |
| 109 | +- System.Text.Encoding.CodePages 6.0.0 |
| 110 | +- System.Text.Encodings.Web 6.0.0 |
| 111 | +- System.Runtime.Loader 4.3.0 |
| 112 | +- System.Resources.ResourceManager 4.3.0 |
| 113 | +- System.Security.Cryptography.Cng 5.0.0 |
| 114 | +- System.Security.Principal.Windows 5.0.0 |
0 commit comments