-
Notifications
You must be signed in to change notification settings - Fork 314
Plumbs all the SSPI changes through the SqlConnection #3511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates SSPI (Security Support Provider Interface) context provider functionality throughout the SqlConnection infrastructure, allowing custom SSPI implementations to be plumbed through the connection system. The changes enable dependency injection of custom SSPI context providers while maintaining backward compatibility with existing authentication mechanisms.
Key changes include:
- Addition of SspiContextProvider property to SqlConnection for custom SSPI implementations
- Integration of SSPI context providers into connection pooling and factory mechanisms
- Refactoring of SSPI method names and visibility modifiers for better API design
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
IntegratedAuthenticationTest.cs | Adds test coverage for custom SSPI context provider functionality |
SqlConnectionFactory.cs | Updates connection creation to pass SSPI context provider parameter |
SspiContextProvider.cs | Refactors method names and adds protected constructor |
NegotiateSspiContextProvider.cs | Updates to use renamed GenerateContext method |
NativeSspiContextProvider.cs | Updates to use renamed GenerateContext method and improves comparison logic |
SqlConnectionPoolKey.cs | Extends pool key to include SSPI context provider for proper connection pooling |
TdsParser.cs (both netfx/netcore) | Integrates custom SSPI context provider selection logic |
SqlInternalConnectionTds.cs (both netfx/netcore) | Adds SSPI context provider parameter to internal connection constructor |
SqlConnection.cs (both netfx/netcore) | Adds SspiContextProvider property and updates all pool key instantiations |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NativeSspiContextProvider.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SspiContextProvider.cs
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3511 +/- ##
===========================================
+ Coverage 64.78% 90.82% +26.04%
===========================================
Files 276 6 -270
Lines 62192 316 -61876
===========================================
- Hits 40289 287 -40002
+ Misses 21903 29 -21874
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Since the main PR to make this public is held up for some security
reviews, this finishes up the internal changes required, but leaves
making anything public until after that is done. This minimizes any
potential merge conflicts if that review ends up taking longer.
Part of #2253