Repository navigation
Expose authentication configuration handlers from Abstractions - #4816
Draft
paulmedynski wants to merge 1 commit into
Draft
paulmedynski wants to merge 1 commit into
paulmedynski wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The compatibility fixture is not run by CI, and its nested commands ignore DotnetPath, leaving key behavior unvalidated and host-dependent.
3 open findings
What changed in this PR
Exposes current and legacy authentication configuration handlers from Abstractions while preserving driver compatibility.
Changes:
- Adds public handlers, type forwarding, documentation, and transitive configuration dependencies.
- Adds schema, forwarding, and separate-process compatibility tests.
- Adds build and package support for the new test fixture.
| File | Description |
|---|---|
BUILDGUIDE.md |
Documents compatibility-test commands. |
build.proj |
Adds the authentication test target. |
doc/samples/SqlAuthenticationProviders.config |
Adds a configuration example. |
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj |
Adds ConfigurationManager dependency. |
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/PackageReadme.md |
Documents exposed handlers. |
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProviderConfigurationSection.cs |
Defines public configuration handlers. |
src/Microsoft.Data.SqlClient.slnx |
Adds the fixture project. |
src/Microsoft.Data.SqlClient/notsupported/Microsoft.Data.SqlClient.csproj |
Includes type forwards. |
src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj |
Includes reference-assembly forwards. |
src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.nuspec |
Exposes ConfigurationManager compile assets. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs |
Removes relocated handler definitions. |
src/Microsoft.Data.SqlClient/src/TypeForwards.Abstractions.cs |
Forwards both handler types. |
src/Microsoft.Data.SqlClient/tests/AuthenticationTests/ConfigurationTest/ConfigurationTest.csproj |
Defines the compatibility executable. |
src/Microsoft.Data.SqlClient/tests/AuthenticationTests/ConfigurationTest/Program.cs |
Validates runtime configuration behavior. |
src/Microsoft.Data.SqlClient/tests/AuthenticationTests/ConfigurationTest/app.config |
Tests the current declaration. |
src/Microsoft.Data.SqlClient/tests/AuthenticationTests/ConfigurationTest/legacy.config |
Tests the legacy declaration. |
src/Microsoft.Data.SqlClient/tests/AuthenticationTests/RunAuthenticationTests.ps1 |
Builds and runs fixture scenarios. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/AuthenticationConfigurationSchemaTest.cs |
Verifies public schema compatibility. |
src/Microsoft.Data.SqlClient/tests/UnitTests/TypeForwardTests.cs |
Verifies handler forwarding. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <AuthenticationPackageVersionArgument Condition="'$(PackageVersionSqlClient)' != ''">-PackageVersionSqlClient "$(PackageVersionSqlClient)"</AuthenticationPackageVersionArgument> | ||
| <TestAuthenticationConfigurationDependsOn Condition="'$(ReferenceType)' == 'Package' AND '$(SkipDependencyPack)' != 'true'">PackSqlClient</TestAuthenticationConfigurationDependsOn> | ||
| </PropertyGroup> | ||
| <Target Name="TestAuthenticationConfiguration" DependsOnTargets="$(TestAuthenticationConfigurationDependsOn)"> |
|
|
||
| function Invoke-DotNet { | ||
| param([string[]]$CommandArguments) | ||
| & dotnet @CommandArguments |
| [ConfigurationProperty("applicationClientId", IsRequired = false)] | ||
| public string ApplicationClientId => this["applicationClientId"] as string ?? string.Empty; | ||
|
|
||
| /// <summary>Gets the Windows Authentication Manager broker preference, or an empty string when unset.</summary> |
This branch has not been deployed
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.


Description
Expose the current and legacy authentication configuration handlers from Abstractions while preserving existing app.config declarations.
SqlAuthenticationInitializerin the driver for this intermediate layer.tests/AuthenticationTests/, outside the Abstractions unit-test project.Layer 2 of 6 in the seven-PR phase-one authentication stack; based on Logging-owned family-version validation.
Issues
No issue is automatically closed by this compatibility layer.
Testing
The two new handler-identity tests failed before relocation, then passed after implementation.
dotnet test src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj -c Release -f net10.0 --filter 'FullyQualifiedName~AuthenticationConfigurationSchemaTest|FullyQualifiedName~TypeForwardTests' --blame-hang-timeout 10m --verbosity quiet— passed, 9 tests, including after rebasing onto the preceding layer.dotnet build build.proj -t:TestAuthenticationConfiguration -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Project -v:m— passed, current and legacy real app.config declarations; zero warnings/errors.dotnet build build.proj -t:BuildSqlClient -p:Configuration=Release -p:ReferenceType=Project -v:q— passed, drivernet462/net10.0and reference/unsupportednet462/net10.0/netstandard2.0; zero warnings/errors.NUGET_PACKAGES=/home/paul/.copilot/session-state/2eb9e30f-a8b8-40d3-ba6a-0f07157aae76/files/pr2-package-cache dotnet build build.proj -t:TestAuthenticationConfiguration -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Package -p:PackageVersionSqlClient=7.1.0-stack.2.final -v:m— passed, fresh production packages and both runtime scenarios. The package-only fixture directly compiles the public handler and ConfigurationSection base type using transitive assets.NUGET_PACKAGES=/home/paul/.copilot/session-state/2eb9e30f-a8b8-40d3-ba6a-0f07157aae76/files/pr2-package-cache dotnet build src/Microsoft.Data.SqlClient/tests/AuthenticationTests/ConfigurationTest/ConfigurationTest.csproj -c Release -f net462 -p:ReferenceType=Package -p:SqlClientPackageVersion=7.1.0-stack.2.final -v:q— passed, cross-build only.git diff --check— passed before commit.An initial concurrent build encountered a shared
objfile-in-use error; sequential retries passed. .NET Framework execution was not performed on Linux. NuGet emitted pre-existing informational missing-readme notices during driver packaging.Guidelines
Please review the contribution guidelines before submitting a pull request:
Contributing
Code of Conduct
Best Practices
Coding Style
Review Process
Tests added or updated.
Public API changes documented.
Verified against customer repro — no customer repro applies.
Ensure no breaking changes introduced — both existing section declarations remain valid.