Commit f7ad726
authored
Restructure NegotiateAuthentication implementation (#87930)
* Change NegotiateAuthentication implementation to use indirection through NegotiateAuthenticationPal to the actual implementation.
The PAL implementation are merged from different sources to follow the same structure:
- NTAuthentication.Managed.cs -> NegotiateAuthenticationPal.Managed.cs
- NTAuthentication.Common.cs + NegotiateStreamPal.Windows.cs -> NegotiateAuthenticationPal.Windows.cs
- NTAuthentication.Common.cs + NegotiateStreamPal.Unix.cs -> NegotiateAuthenticationPal.Unix.cs
This split allows to delete ContextFlagsPal, SafeDeleteNegoContext, and SafeFreeNegoCredentials abstractions that were used in NegotiateStreamPal.
* Unify impersonation level validation between Windows and Unix pllatforms
* Split managed NTLM and managed SPNEGO implementations; add UseManagedNtlm switch on Unix platforms
* Remove debug cruft
* Fix couple of errors in managed SPNEGO
* Remove debug print
* Fix message sequence in managed NTLM; remove unused method
* Fix fallbacks on macOS GSSAPI
* Cleanup and fallbacks for missing NTLM, GSSAPI
* Adjust tests to assume that NTLM is always available on Unix
* Don't claim NTLM support on Browser
* Revert "Don't claim NTLM support on Browser"
This reverts commit 87d0c56.
* Attempt to fix the browser tests
* Revert "Attempt to fix the browser tests"
This reverts commit 91d7ce2.
* Browser test suppression
* Respect UseManagedNtlm=false on platforms without NTLM GSSAPI provider
* Update src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs
* Revert all the fallback code paths, System.Net.Security.UseManagedNtlm has to be enabled explicitly; NativeAOT on Linux Bionic does that by default because it doesn't have GSSAPI and native shim1 parent f1d6099 commit f7ad726
25 files changed
Lines changed: 3006 additions & 3307 deletions
File tree
- src
- coreclr/nativeaot/BuildIntegration
- libraries
- Common/src/System/Net/Security/Unix
- System.Net.Http/tests/FunctionalTests
- System.Net.Security/src
- ILLink
- System/Net
- Security
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
| |||
Lines changed: 0 additions & 115 deletions
This file was deleted.
Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 12 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
61 | 62 | | |
62 | | - | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
| |||
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
| 156 | + | |
158 | 157 | | |
159 | | - | |
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
| |||
171 | 169 | | |
172 | 170 | | |
173 | 171 | | |
174 | | - | |
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
| |||
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
| 287 | + | |
| 288 | + | |
290 | 289 | | |
291 | 290 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 291 | | |
298 | 292 | | |
299 | 293 | | |
| |||
304 | 298 | | |
305 | 299 | | |
306 | 300 | | |
307 | | - | |
308 | 301 | | |
309 | 302 | | |
310 | | - | |
311 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
312 | 308 | | |
313 | 309 | | |
314 | 310 | | |
| |||
455 | 451 | | |
456 | 452 | | |
457 | 453 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | 454 | | |
| 455 | + | |
462 | 456 | | |
463 | 457 | | |
0 commit comments