|
1 |
| -/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
| 1 | +/* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2 | 2 |
|
3 | 3 | This program is free software; you can redistribute it and/or modify
|
4 | 4 | it under the terms of the GNU General Public License, version 2.0,
|
@@ -62,6 +62,7 @@ class Handshake_client: public Handshake
|
62 | 62 | @param con connection for communication with the peer
|
63 | 63 | @param target name of the target service with which we will authenticate
|
64 | 64 | (can be NULL if not used)
|
| 65 | + @param len length of target |
65 | 66 |
|
66 | 67 | Some security packages (like Kerberos) require providing explicit name
|
67 | 68 | of the service with which a client wants to authenticate. The server-side
|
@@ -315,6 +316,66 @@ Blob Handshake_client::process_data(const Blob &data)
|
315 | 316 |
|
316 | 317 | /**********************************************************************/
|
317 | 318 |
|
| 319 | +/** |
| 320 | + @page page_protocol_connection_phase_authentication_methods_authentication_windows Windows Native Authentication |
| 321 | +
|
| 322 | + Authentication::WindowsAuth: |
| 323 | +
|
| 324 | + <ul> |
| 325 | + <li> |
| 326 | + The server name is *authentication_windows* |
| 327 | + </li> |
| 328 | + <li> |
| 329 | + The client name is *authentication_windows_client* |
| 330 | + </li> |
| 331 | + </ul> |
| 332 | +
|
| 333 | + The Windows Native Authentication method is more complex than the other |
| 334 | + methods and extends the auth protocol as it has to send more data forth |
| 335 | + and back than the old handshake permitted. |
| 336 | +
|
| 337 | + Basically it wraps the output of the |
| 338 | + [Negotiate SSP]("http://msdn.microsoft.com/en-us/library/windows/desktop/aa378748(v=VS.85).aspx") |
| 339 | + in the Auth Phase protocol which either means |
| 340 | + @ref sect_protocol_connection_phase_authentication_methods_authentication_windows_ntlm or |
| 341 | + @ref sect_protocol_connection_phase_authentication_methods_authentication_windows_spnego |
| 342 | + are used as underlying protocol. |
| 343 | +
|
| 344 | + Due to the implementation details the Windows Native Authentication method |
| 345 | + doesn't use the fast path of the @ref page_protocol_connection_phase, but is |
| 346 | + only triggered on request as part of the |
| 347 | + @ref page_protocol_connection_phase_packets_protocol_auth_switch_request packet. |
| 348 | +
|
| 349 | +
|
| 350 | + @note Due to implementation details (again) the first packet sent from the |
| 351 | + client to the server is expected to be either |
| 352 | + <ul><li>254 bytes long max or</li> |
| 353 | + <li>send the first 254 bytes first, appended by 1 byte with a magic value |
| 354 | + plus a 2nd packet with rest of the data</li></ul> |
| 355 | + Also following windows authentication packets don't get split. |
| 356 | +
|
| 357 | + The client will send either a |
| 358 | + @ref sect_protocol_connection_phase_authentication_methods_authentication_windows_spnego |
| 359 | + or a @ref sect_protocol_connection_phase_authentication_methods_authentication_windows_ntlm |
| 360 | + packet as a next packet. |
| 361 | +
|
| 362 | + To implement the protocol one can use several existing implementations: |
| 363 | + <ul> |
| 364 | + <li>MS Windows provides |
| 365 | + [InitializeSecurityContextW]("http://msdn.microsoft.com/en-us/library/windows/desktop/aa375509(v=VS.85).aspx") |
| 366 | + and [AcceptSecurityContext]("http://msdn.microsoft.com/en-us/library/aa374703.aspx") |
| 367 | + </li> |
| 368 | + <li>A open source implemenation of NTML, SPNEGO and Kerberos5 are provided by |
| 369 | + [Heimdal]("http://www.h5l.org/") |
| 370 | + </li> |
| 371 | + <li>Java6 added SPNEGO support to |
| 372 | + [JGSS]("http://download.oracle.com/javase/6/docs/technotes/guides/security/jgss/lab/part5.html#SPNEGO") |
| 373 | + which also provides the NTLM and Kerberos5 support. |
| 374 | + </li></ul> |
| 375 | +
|
| 376 | + @section sect_protocol_connection_phase_authentication_methods_authentication_windows_spnego SPNEGO |
| 377 | + @section sect_protocol_connection_phase_authentication_methods_authentication_windows_ntlm NTLM |
| 378 | +*/ |
318 | 379 |
|
319 | 380 | /**
|
320 | 381 | Perform authentication handshake from client side.
|
|
0 commit comments