Add explicit Windows credential SSPI provider to the 2.x library - #60
Conversation
Port of the SSPI half of PR 56 onto the restored 2.x main: upgrade Microsoft.Data.SqlClient to 7.0.1 with the dependencies it no longer brings transitively, and add NetworkCredentialSspiContextProvider (.NET 8 only, including the Principal accessor from PR 57). The C# connection-service plumbing from PR 56/57 is 3.0-only and stays on libmigration; on 2.x, Connect-DbaInstance wires the provider itself (dataplat/dbatools#10495) and degrades gracefully when the type is absent. Bumps ModuleVersion to 2026.9.14 so the first release cut from the restored main carries the provider. (do Connect-DbaInstance) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRG7aY5eVNEXTw5ahQbGW9
ReviewThanks for the clear write-up on the
|
The 6.x-only SqlClient ceiling predates PR 56, which validated 7.0.1 against the pinned SMO and DacFx packages (PS3 golden image, Azure matrix, three-OS package build). libmigration's table already says so; bring main's copy in line so it stops contradicting the csproj. (do Connect-DbaInstance) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRG7aY5eVNEXTw5ahQbGW9
Points CI at the preview built from dataplat/dbatools.library#60 (2.x main plus the SSPI provider and SqlClient 7.0.1) so the Windows SSPI integration leg can prove itself green on a real 2.x library. Once #60 merges and a release is cut from main, this pin moves to that version. (do Connect-DbaInstance) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRG7aY5eVNEXTw5ahQbGW9
|
Addressed: SqlClient ceiling / CLAUDE.md — the 6.x-only row predated #56, which validated 7.0.1 with the pinned SMO and DacFx packages (PS3 golden image import, ten-slice Azure matrix, three-OS package build). Thread safety — on 2.x the only consumer is
|
ReviewSolid, well-scoped port — the Versioning:
|
Summary
PR #56 was cut from
libmigrationand squash-merged intomain, which dumped the whole 3.0 tree ontomain.mainhas been reverted to v2026.5.3 (d43805b) and the full PR #56 + #57 work now lives onlibmigration(cc04650).This PR brings the part of that work the 2.x library actually needs back onto
main:Microsoft.Data.SqlClient6.1.5 -> 7.0.1, plusAzure.Identity,Microsoft.Data.SqlClient.Extensions.Azure, andMicrosoft.Identity.Clientas explicit references (SqlClient 7 stopped pulling them transitively)NetworkCredentialSspiContextProvider(.NET 8 only), including thePrincipalaccessor from Make Get-DbaConnectedInstance see explicit-Windows-credential connections #57SqlClientCompatibilityTestcovering the providerModuleVersion2026.9.14The C# connection-service plumbing from #56/#57 is 3.0-only (2.x
mainhas noConnectionServiceat all) and is intentionally not ported. On 2.x,Connect-DbaInstancecreates and assigns the provider itself (dataplat/dbatools#10495) and degrades gracefully when the type is absent.Verification
build.ps1 -CoreOnlyon Linux: green; provider type present incore/lib/dbatools.dll; shipped SqlClient is 7.0.1dotnet test -f net8.0 --filter Connection: the 6 SSPI tests pass. The 7 pre-existingConnectionString/Defaultstests fail identically on untouchedmainin the same WSL environment (System.Management.Automation not resolvable there); not related to this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01PRG7aY5eVNEXTw5ahQbGW9