Use string for SNI instead of byte[]#2790
Conversation
250c893 to
89d85fb
Compare
89d85fb to
f45bf6b
Compare
f7be4fd to
ccb77e8
Compare
52d058f to
bbb5636
Compare
|
@mdaigle here's the next step on the SSPI change |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2790 +/- ##
==========================================
- Coverage 72.79% 66.20% -6.60%
==========================================
Files 283 281 -2
Lines 59139 58847 -292
==========================================
- Hits 43051 38960 -4091
- Misses 16088 19887 +3799
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NativeSSPIContextProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SSPIContextProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs
Outdated
Show resolved
Hide resolved
paulmedynski
left a comment
There was a problem hiding this comment.
I'm not familiar with this area of the code, so I reviewed for consistency and side-effects mainly.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Interop/Windows/Sni/SniNativeWrapper.cs
Outdated
Show resolved
Hide resolved
paulmedynski
left a comment
There was a problem hiding this comment.
Thanks for addressing the naming and init comments. Just a couple more try-finally tweaks, and this will be good to go!
…native SNI path (#3929) This PR fixes a connection performance regression introduced by PR #2790, where SPN generation could be triggered for non-integrated authentication modes such as SQL authentication on the native SNI path. This change ensures that SPN generation is only triggered when authentication mode is integrated security (SSPI/Kerberos).
This change replaces byte[] usage for SNI values to be string. There was a lot of decoding done in different areas and with this it becomes clearer that the value is a server name. The only place that actually needs the
byte[]representation is the native sni - so it makes it easier to keep it as a string as much as possible.Part of #2253