Skip to content

AOT 1: Expose authentication configuration handlers from Abstractions - #4816

Merged
paulmedynski merged 2 commits into
mainfrom
dev/paul/aot/phase-1.2
Oct 23, 2026
Merged

paulmedynski merged 2 commits into
mainfrom
dev/paul/aot/phase-1.2

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Move the current and legacy authentication configuration handlers into Microsoft.Data.SqlClient.Extensions.Abstractions while preserving existing app.config declarations.

Why?

Authentication configuration types need to live alongside the provider abstractions so registration can be owned by Abstractions without depending on the driver implementation.

How

  • Preserve the handlers' fully qualified names, section schema, constants, and empty defaults.
  • Forward both handler types from the driver, reference, and unsupported-platform assemblies to preserve compatibility.
  • Expose ConfigurationManager as a transitive compile dependency and remove the driver's compile-asset exclusions for it.
  • Add type-forwarding and configuration-schema regression coverage, package documentation, and a configuration sample.

Public API and behavior changes

Compared with current main, this PR adds public configuration infrastructure; it is not only an assembly-internal move.

Surface Change Compatibility
SqlAuthenticationProviderConfigurationSection Changes from an internal driver type to a public Abstractions type, exposing its constructor, Name constant and Providers, InitializerType, ApplicationClientId and UseWamBroker getters. Additive public API. Hidden from IntelliSense with EditorBrowsableState.Never, but still public and available to consumers.
SqlClientAuthenticationProviderConfigurationSection Changes from an internal driver type to a public Abstractions type, exposing its constructor, modern Name constant and inherited properties. Additive public API with the same namespace and section schema.
Existing app.config declarations Forward both handlers from the driver, reference and unsupported-platform assemblies to Abstractions. Existing section names, handler names, properties and empty defaults are preserved; existing driver-qualified declarations continue to resolve.
Dependency surface Expose ConfigurationManager transitively for compilation. Consumers can compile against the newly public configuration types and their base/member types. No existing public method signatures are removed.

Authentication configuration reading and provider activation retain their existing driver behavior in this PR. Stricter loading is introduced separately in #4860 and wired into the runtime by #4821.

Issues

Related follow-ups: configuration loading in #4860 and registry integration in #4821.

Testing

  • The PR adds configuration-schema and type-forwarding regression coverage.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:24
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Oct 9, 2026
@paulmedynski
paulmedynski added this pull request to stack #4822 October 9, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread build.proj Outdated
Comment thread src/Microsoft.Data.SqlClient/tests/AuthenticationTests/RunAuthenticationTests.ps1 Outdated
@paulmedynski paulmedynski added the Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity. label Oct 13, 2026
@paulmedynski paulmedynski added this to the 8.0.0-preview1 milestone Oct 13, 2026
@paulmedynski paulmedynski changed the title Expose authentication configuration handlers from Abstractions AOT 2: Expose authentication configuration handlers from Abstractions Oct 13, 2026
Copilot AI balanced review requested due to automatic review settings October 13, 2026 17:41
@paulmedynski
paulmedynski removed this pull request from stack #4822 October 13, 2026 17:44
@paulmedynski
paulmedynski added this pull request to stack #4839 October 13, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The compatibility fixture is not wired into CI, and public documentation misidentifies WAM.

3 open findings

🧠 Review effort: Balanced

@paulmedynski paulmedynski changed the title AOT 2: Expose authentication configuration handlers from Abstractions AOT 3: Expose authentication configuration handlers from Abstractions Oct 13, 2026
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.2 branch from e2f2d90 to 6c74ee2 Compare October 14, 2026 10:49
Copilot AI balanced review requested due to automatic review settings October 14, 2026 10:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new compatibility target is not invoked by automated PR or aggregate test workflows.

3 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 14, 2026 11:36
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.2 branch from 6c74ee2 to fd6bc96 Compare October 14, 2026 11:36
@paulmedynski
paulmedynski removed this pull request from stack #4839 October 14, 2026 11:39
@paulmedynski paulmedynski changed the title AOT 3: Expose authentication configuration handlers from Abstractions AOT 1: Expose authentication configuration handlers from Abstractions Oct 14, 2026
@paulmedynski
paulmedynski changed the base branch from dev/paul/aot/phase-1.1 to main October 14, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-framework configuration activation and packaged type-forward compatibility require final human validation.

0 open findings

🧠 Review effort: Balanced

@paulmedynski
paulmedynski removed this pull request from stack #4853 October 19, 2026 17:16
@paulmedynski
paulmedynski added this pull request to stack #4861 October 19, 2026 17:16
Copilot AI balanced review requested due to automatic review settings October 19, 2026 19:07
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.2 branch from 67a6075 to 1a79dde Compare October 19, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-framework configuration activation and packaged type-forwarding compatibility still need execution evidence and final human validation.

No open issues 🎉

Review effort: Balanced

paulmedynski added a commit that referenced this pull request Oct 20, 2026
- Defer executable authentication compatibility tests from #4816 to #4817
- Correct WAM expansion in authentication configuration docs (#4816)
- Clarify authentication configuration handlers are infrastructure types
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.2 branch from 1a79dde to e2d6552 Compare October 20, 2026 11:16
@paulmedynski paulmedynski added the Public API 🆕 Issues/PRs that introduce new APIs to the driver. label Oct 20, 2026
benrr101
benrr101 previously approved these changes Oct 20, 2026

@cheenamalhotra cheenamalhotra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type forwards and schema look good. One concern before merge:

  • New dependency for .NET Framework apps. The driver's net462 nuspec group never depended on System.Configuration.ConfigurationManager. Abstractions only targets netstandard2.0, so net462 apps now get SCCM 10.0.0.0 transitively. Apps without auto-generated binding redirects (classic ASP.NET, packages.config, or mixed SCCM versions) can hit FileLoadException. #4817's net462 CI run already shows this load error once redirects are missing.

Smaller items:

  • No test covers a real config file with the legacy SqlAuthenticationProviders section. FunctionalTests app.config only covers the modern one.
  • Please add a release-notes entry for the two new public types.
  • Consider sealing SqlClientAuthenticationProviderConfigurationSection; once public, it's hard to change later.

@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Oct 21, 2026
@apoorvdeshmukh apoorvdeshmukh added the Author attention needed PRs that require author to respond or make updates to PR. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown

@paulmedynski This pull request has been marked as Author attention needed.

When you have addressed the reviewer feedback and are ready for another review, please post a comment with /ready to remove the label and re-engage reviewers.

- Defer executable authentication compatibility tests from #4816 to #4817
- Correct WAM expansion in authentication configuration docs (#4816)
- Clarify authentication configuration handlers are infrastructure types
Copilot AI balanced review requested due to automatic review settings October 22, 2026 19:34
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.2 branch from e2d6552 to 6fc1921 Compare October 22, 2026 19:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-framework configuration activation and packaged dependency compatibility need human confirmation because execution evidence is not available in this review.

No open issues 🎉

Review effort: Balanced

Use framework configuration in the net462 Abstractions target.
Expose sealed sibling handlers with separate source and XML documentation.
Keep driver configuration normalization as a temporary bridge to #4821.
Cover real legacy/current configuration activation and preserved reader behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-framework type forwarding and transitive dependency compatibility need human confirmation backed by build and packaged-consumer verification.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity. Author attention needed PRs that require author to respond or make updates to PR. Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants