As specified in RFC 2617, HTTP supports authentication using the WWW-Authenticate request headers and the Authorization response headers (and the Proxy-Authenticate and Proxy-Authorization headers for proxy authentication).
Supported authentication schemes
Our research showed that it is sufficient to support four authentication schemes: Basic, Digest, NTLM, and Negotiate. We already support Basic, Digest, and NTLM, and plan to add support for Negotiate.
The Basic and Digest schemes are specified in RFC 2617. NTLM is a Microsoft proprietary protocol. The Negotiate scheme is specified in RFC 4559 and can be used to negotiate either Kerberos or NTLM.
The remaining work is:
Authentication handler framework
We created the authentication handler framework when we implemented the Basic and Digest authentication schemes. This framework needs to be extended to handle the NTLM and Negotiate schemes, which differ from the Basic and Digest schemes in a few aspects.
Choosing an authentication scheme
When a server or proxy accepts multiple authentication schemes, our network stack selects the authentication scheme with the highest score:
So we choose the most secure scheme, and we ignore the server or proxy's preference, indicated by the order in which the schemes are listed in the WWW-Authenticate or Proxy-Authenticate response headers. This could be a source of compatibility problems because MSDN documents that "WinInet chooses the first method it recognizes." Note: In IE7 or later, WinInet chooses the first non-Basic method it recognizes.
Warn about Basic authentication over unencrypted channels
Since the Basic authentication scheme sends the username/password encrypted, we should warn users in the login dialog if we are going to perform Basic authentication over HTTP or to a proxy. |