Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cd7a3d1
Updating Azure.Identity version to 1.11.3 (#2526)
JRahnama May 23, 2024
b178ba5
Fix | Clone of SqlConnection should include AccessTokenCallback (#2525)
David-Engel May 23, 2024
b7c4007
Enhancement | Add trace logs for packet size (#2522)
David-Engel May 24, 2024
4c088eb
Merged PR 4583: eng | Fix policheck errors.
arellegue May 24, 2024
815e5ab
Doc | Fix SNI dependencies of 5.1 and 5.2 release notes (#2537)
DavoudEshtehari May 28, 2024
808d4c3
Change | Separate tests for NetFx and NetCore - NetFx-Only Connection…
benrr101 May 29, 2024
7af2438
Fix | Enhance certificate validation (#2487)
arellegue May 30, 2024
42e9f08
Hotfix v5.2.1 Release notes (#2534)
dauinsight May 31, 2024
348ae2e
Improve AccessTokenCallback sample code (#2543)
scottaddie May 31, 2024
1dfd483
Merged PR 4621: eng | Fix policheck
dauinsight May 31, 2024
f7ab115
Fix | Adjust path for .AssemblyAttributes in obj folder (#2550)
JRahnama Jun 8, 2024
3f0c4b1
Fix | Fixed GenerateSspiClientContext to retry negotiation with defau…
arellegue Jun 11, 2024
ffd8771
Strong typed diagnostics (#2226)
Wraith2 Jun 11, 2024
689cc25
Fix | Replaced System.Runtime.Caching with Microsoft.Extensions.Cachi…
arellegue Jun 11, 2024
a7405de
Add | Add SourceLink translation (#2552)
JRahnama Jun 11, 2024
080e669
Add | Cache TokenCredential objects to take advantage of token cachin…
David-Engel Jun 12, 2024
c822b69
Merged common code base for SqlUtil.cs (#2533)
arellegue Jun 12, 2024
d7f84eb
Add scope trace for GenerateSspiClientContext (#2497)
David-Engel Jun 12, 2024
a240c24
Address conflicts (#2562)
JRahnama Jun 12, 2024
d4b2bb3
Addressing conflict (#2560)
JRahnama Jun 12, 2024
55f48c5
Merge in 'main' changes
Jun 12, 2024
8777fce
Merge SqlColumnEncryptionCertificateStoreProvider (#2521)
edwardneal Jun 25, 2024
eb46c58
Add | No-op if engineedition is 6 or 11 due to lack of support for AS…
ErikEJ Jun 26, 2024
f91dc82
Change | Remove some unneeded references and update Azure.Identity (#…
ErikEJ Jun 26, 2024
aece366
Add test for issue 2456 (#2457)
ErikEJ Jun 27, 2024
f55c5a2
Merged common code base for AlwaysEncryptedKeyConverter (#2538)
arellegue Jun 27, 2024
0352a50
3 Small Changes (#2594)
benrr101 Jul 2, 2024
bad621f
Test fixes to accommodate recent infra changes (#2646)
David-Engel Jul 5, 2024
a34ec48
Fix - Don't error when using infinte connect timeout and Entra auth (…
David-Engel Jul 8, 2024
ce7393b
eng | Add delay signed to official builds (#2653)
JRahnama Jul 10, 2024
784046f
eng | Initial YAML CI pipeline (#2575)
DavoudEshtehari Jul 11, 2024
766b72a
Fix | Fix decrypt failure to drain data (#2618)
arellegue Jul 11, 2024
5c0ce12
[Scheduled Run] Localized resource files from OneLocBuild
Jul 12, 2024
e227371
eng | Add Delay sign to ref csprojs (#2684)
JRahnama Jul 18, 2024
a9621bd
[Scheduled Run] Localized resource files from OneLocBuild
Jul 21, 2024
7110d29
[Scheduled Run] Localized resource files from OneLocBuild
Jul 22, 2024
2505d2f
Merge branch 'dev/JSON_FE' into main
deepaksa1 Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/PolicheckExclusions.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<PoliCheckExclusions>
<Exclusion Type="FolderPathStart">SRC/MICROSOFT.DATA.SQLCLIENT/TESTS</Exclusion>
<Exclusion Type="FileType">.YML|.MD|.SQL</Exclusion>
<Exclusion Type="FileName">NOTICE.TXT</Exclusion>
<Exclusion Type="FileName">NOTICE.TXT|SQLDATAADAPTER.CS</Exclusion>
</PoliCheckExclusions>
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Stable release 5.2.1] - 2024-05-31

This update brings the below changes over the previous release:

### Changed

- Upgraded `Azure.Identity` version from 1.10.3 to 1.11.3 [#2492](https://github.com/dotnet/SqlClient/pull/2492), [#2528](https://github.com/dotnet/SqlClient/pull/2528)
- Upgraded `Microsoft.Identity.Client` version from 4.56.0 to 4.60.3 [#2492](https://github.com/dotnet/SqlClient/pull/2492)
- Code Health improvements: [#2467](https://github.com/dotnet/SqlClient/pull/2467)

### Fixed

- Fixed connection errors on Linux when Data Source property contains both named instance and port [#2436](https://github.com/dotnet/SqlClient/pull/2436)
- Fixed `SqlConnection.FireInfoMessageEventOnUserErrors` when set to true throws an exception [#2505](https://github.com/dotnet/SqlClient/pull/2505)
- Fixed exception when using `DATETIMEOFFSET(n)` in a TVP if `n` is 1, 2, 3, or 4 [#2506](https://github.com/dotnet/SqlClient/pull/2506)
- Reverted PR [#1983](https://github.com/dotnet/SqlClient/pull/1938) which caused connection failure delays when using `OpenAsync` [#2507](https://github.com/dotnet/SqlClient/pull/2507)
- Fixed `SqlConnection.Clone()` to include `AccessTokenCallback` [#2527](https://github.com/dotnet/SqlClient/pull/2527)

## [Stable release 5.2.0] - 2024-02-28

### Added
Expand Down
11 changes: 7 additions & 4 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<Import Project="$(ToolsDir)targets\add-ons\GenerateAKVProviderNugetPackage.targets" />

<PropertyGroup>
<!-- SourceLink variable-->
<DisableSourceLink>false</DisableSourceLink>

<RestoreConfigFile>src\NuGet.config</RestoreConfigFile>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
Expand Down Expand Up @@ -177,16 +180,16 @@
<Target Name="RunTests" DependsOnTargets="RunFunctionalTests;RunManualTests"/>
<Target Name="RunFunctionalTests">
<!-- Windows -->
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(FunctionalTestsProj)&quot; -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) --no-build -v n --collect &quot;Code coverage&quot; -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Windows$(TargetGroup) --filter &quot;category!=non$(TargetGroup)tests&amp;category!=failing&amp;category!=nonwindowstests&quot; &quot;--logger:trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' == 'true'"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(FunctionalTestsProj)&quot; -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) -p:ReferenceType=$(ReferenceType) --no-build -v n --collect &quot;Code coverage&quot; -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Windows$(TargetGroup) --filter &quot;category!=non$(TargetGroup)tests&amp;category!=failing&amp;category!=nonwindowstests&quot; &quot;--logger:trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' == 'true'"/>
<!-- Unix -->
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(FunctionalTestsProj)&quot; -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) --no-build -v n -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Unixnetcoreapp --collect &quot;Code coverage&quot; --filter &quot;category!=nonnetcoreapptests&amp;category!=failing&amp;category!=nonlinuxtests&amp;category!=nonuaptests&quot; &quot;--logger:trx;LogFilePrefix=Functional-Unixnetcoreapp-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' != 'true'"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(FunctionalTestsProj)&quot; -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) -p:ReferenceType=$(ReferenceType) --no-build -v n -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Unixnetcoreapp --collect &quot;Code coverage&quot; --filter &quot;category!=nonnetcoreapptests&amp;category!=failing&amp;category!=nonlinuxtests&amp;category!=nonuaptests&quot; &quot;--logger:trx;LogFilePrefix=Functional-Unixnetcoreapp-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' != 'true'"/>
</Target>

<Target Name="RunManualTests">
<!-- Windows -->
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(ManualTestsProj)&quot; -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) --no-build -l &quot;console;verbosity=normal&quot; --collect &quot;Code coverage&quot; -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Windows$(TargetGroup) --filter &quot;category!=non$(TargetGroup)tests&amp;category!=failing&amp;category!=nonwindowstests&quot; &quot;--logger:trx;LogFilePrefix=Manual-Windows$(TargetGroup)-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' == 'true'"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(ManualTestsProj)&quot; -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) -p:ReferenceType=$(ReferenceType) --no-build -l &quot;console;verbosity=normal&quot; --collect &quot;Code coverage&quot; -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Windows$(TargetGroup) --filter &quot;category!=non$(TargetGroup)tests&amp;category!=failing&amp;category!=nonwindowstests&quot; &quot;--logger:trx;LogFilePrefix=Manual-Windows$(TargetGroup)-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' == 'true'"/>
<!-- Unix -->
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(ManualTestsProj)&quot; -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) --no-build -l &quot;console;verbosity=normal&quot; --collect &quot;Code coverage&quot; -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Unixnetcoreapp --filter &quot;category!=nonnetcoreapptests&amp;category!=failing&amp;category!=nonlinuxtests&amp;category!=nonuaptests&quot; &quot;--logger:trx;LogFilePrefix=Manual-Unixnetcoreapp-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' != 'true'"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test &quot;@(ManualTestsProj)&quot; -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) -p:ReferenceType=$(ReferenceType) --no-build -l &quot;console;verbosity=normal&quot; --collect &quot;Code coverage&quot; -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Unixnetcoreapp --filter &quot;category!=nonnetcoreapptests&amp;category!=failing&amp;category!=nonlinuxtests&amp;category!=nonuaptests&quot; &quot;--logger:trx;LogFilePrefix=Manual-Unixnetcoreapp-$(TestSet)&quot;" Condition="'$(IsEnabledWindows)' != 'true'"/>
</Target>

<Target Name="Clean">
Expand Down
15 changes: 11 additions & 4 deletions doc/samples/SqlConnection_AccessTokenCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ static void Main()

private static void OpenSqlConnection()
{
const string defaultScopeSuffix = "/.default";
string connectionString = GetConnectionString();
using (SqlConnection connection = new SqlConnection("Data Source=contoso.database.windows.net;Initial Catalog=AdventureWorks;")
DefaultAzureCredential credential = new();

using (SqlConnection connection = new(connectionString)
{
AccessTokenCallback = async (authParams, cancellationToken) =>
{
var cred = new DefaultAzureCredential();
string scope = authParams.Resource.EndsWith(s_defaultScopeSuffix) ? authParams.Resource : authParams.Resource + s_defaultScopeSuffix;
var token = await cred.GetTokenAsync(new TokenRequestContext(new[] { scope }), cancellationToken);
string scope = authParams.Resource.EndsWith(defaultScopeSuffix)
? authParams.Resource
: $"{authParams.Resource}{defaultScopeSuffix}";
AccessToken token = await credential.GetTokenAsync(
new TokenRequestContext([scope]),
cancellationToken);

return new SqlAuthenticationToken(token.Token, token.ExpiresOn);
}
})
Expand Down
Loading