1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<pre>Network Working Group K. Jaganathan
Request for Comments: 4559 L. Zhu
Category: Informational J. Brezak
Microsoft Corporation
June 2006
<span class="h1">SPNEGO-based Kerberos and NTLM HTTP Authentication</span>
<span class="h1">in Microsoft Windows</span>
Status of This Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
This document describes how the Microsoft Internet Explorer (MSIE)
and Internet Information Services (IIS) incorporated in Microsoft
Windows 2000 use Kerberos for security enhancements of web
transactions. The Hypertext Transport Protocol (HTTP) auth-scheme of
"negotiate" is defined here; when the negotiation results in the
selection of Kerberos, the security services of authentication and,
optionally, impersonation (the IIS server assumes the windows
identity of the principal that has been authenticated) are performed.
This document explains how HTTP authentication utilizes the Simple
and Protected GSS-API Negotiation mechanism. Details of Simple And
Protected Negotiate (SPNEGO) implementation are not provided in this
document.
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
<a href="#section-2">2</a>. Conventions Used in This Document ...............................<a href="#page-2">2</a>
<a href="#section-3">3</a>. Access Authentication ...........................................<a href="#page-2">2</a>
<a href="#section-3.1">3.1</a>. Reliance on the HTTP/1.1 Specification .....................<a href="#page-2">2</a>
<a href="#section-4">4</a>. HTTP Negotiate Authentication Scheme ............................<a href="#page-2">2</a>
<a href="#section-4.1">4.1</a>. The WWW-Authenticate Response Header .......................<a href="#page-2">2</a>
<a href="#section-5">5</a>. Negotiate Operation Example .....................................<a href="#page-4">4</a>
<a href="#section-6">6</a>. Security Considerations .........................................<a href="#page-5">5</a>
<a href="#section-7">7</a>. Normative References ............................................<a href="#page-6">6</a>
<span class="grey">Jaganathan, et al. Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
Microsoft has provided support for Kerberos authentication in
Microsoft Internet Explorer (MSIE) and Internet Information Services
(IIS), in addition to other mechanisms. This provides the benefits
of the Kerberos v5 protocol for Web applications.
Support for Kerberos authentication is based on other previously
defined mechanisms, such as SPNEGO Simple And Protected Negotiate
(SPNEGO) [<a href="./rfc4178" title=""The Simple and Protected GSS-API Generic Security Service Application Program Interface (GSS-API) Negotiation Mechanism"">RFC4178</a>] and the Generic Security Services Application
Program Interface(GSSAPI).
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Conventions Used in This Document</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to
be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Access Authentication</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Reliance on the HTTP/1.1 Specification</span>
This specification is a companion to the HTTP/1.1 specification
[<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>], and it builds on the authentication mechanisms defined in
[<a href="./rfc2617" title=""HTTP Authentication: Basic and Digest Access Authentication"">RFC2617</a>]. It uses the augmented BNF section of that document (2.1),
and it relies on both the non-terminals defined in that document and
other aspects of the HTTP/1.1 specification.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. HTTP Negotiate Authentication Scheme</span>
Use of Kerberos is wrapped in an HTTP auth-scheme of "Negotiate".
The auth-params exchanged use data formats defined for use with the
GSS-API [<a href="./rfc2743" title=""Generic Security Service Application Program Interface Version 2"">RFC2743</a>]. In particular, they follow the formats set for
the SPNEGO [<a href="./rfc4178" title=""The Simple and Protected GSS-API Generic Security Service Application Program Interface (GSS-API) Negotiation Mechanism"">RFC4178</a>] and Kerberos [<a href="./rfc4121" title=""The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2"">RFC4121</a>] mechanisms for GSSAPI.
The "Negotiate" auth-scheme calls for the use of SPNEGO GSSAPI tokens
that the specific mechanism type specifies.
The current implementation of this protocol is limited to the use of
SPNEGO with the Kerberos and Microsoft(NT Lan Manager) NTLM
protocols.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. The WWW-Authenticate Response Header</span>
If the server receives a request for an access-protected object, and
if an acceptable Authorization header has not been sent, the server
responds with a "401 Unauthorized" status code, and a "WWW-
Authenticate:" header as per the framework described in [<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>].
The initial WWW-Authenticate header will not carry any gssapi-data.
<span class="grey">Jaganathan, et al. Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
The negotiate scheme will operate as follows:
challenge = "Negotiate" auth-data
auth-data = 1#( [gssapi-data] )
The meanings of the values of the directives used above are as
follows:
gssapi-data
If the gss_accept_security_context returns a token for the client,
this directive contains the base64 encoding of an
initialContextToken, as defined in [<a href="./rfc2743" title=""Generic Security Service Application Program Interface Version 2"">RFC2743</a>]. This is not present in
the initial response from the server.
A status code 200 status response can also carry a "WWW-Authenticate"
response header containing the final leg of an authentication. In
this case, the gssapi-data will be present. Before using the
contents of the response, the gssapi-data should be processed by
gss_init_security_context to determine the state of the security
context. If this function indicates success, the response can be
used by the application. Otherwise, an appropriate action, based on
the authentication status, should be taken.
For example, the authentication could have failed on the final leg if
mutual authentication was requested and the server was not able to
prove its identity. In this case, the returned results are suspect.
It is not always possible to mutually authenticate the server before
the HTTP operation. POST methods are in this category.
When the Kerberos Version 5 GSSAPI mechanism [<a href="./rfc4121" title=""The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2"">RFC4121</a>] is being used,
the HTTP server will be using a principal name of the form of
"HTTP/hostname".
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. The Authorization Request Header</span>
Upon receipt of the response containing a "WWW-Authenticate" header
from the server, the client is expected to retry the HTTP request,
passing a HTTP "Authorization" header line. This is defined
according to the framework described in [<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>] and is utilized as
follows:
credentials = "Negotiate" auth-data2
auth-data2 = 1#( gssapi-data )
gssapi-data
<span class="grey">Jaganathan, et al. Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
This directive contains the base64 encoding of an
InitialContextToken, as defined in [<a href="./rfc2743" title=""Generic Security Service Application Program Interface Version 2"">RFC2743</a>].
Any returned code other than a success 2xx code represents an
authentication error. If a 401 containing a "WWW-Authenticate"
header with "Negotiate" and gssapi-data is returned from the server,
it is a continuation of the authentication request.
A client may initiate a connection to the server with an
"Authorization" header containing the initial token for the server.
This form will bypass the initial 401 error from the server when the
client knows that the server will accept the Negotiate HTTP
authentication type.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Negotiate Operation Example</span>
The client requests an access-protected document from server via a
GET method request. The URI of the document is
"<a href="http://www.nowhere.org/dir/index.html">http://www.nowhere.org/dir/index.html</a>".
C: GET dir/index.html
The first time the client requests the document, no Authorization
header is sent, so the server responds with
S: HTTP/1.1 401 Unauthorized
S: WWW-Authenticate: Negotiate
The client will obtain the user credentials using the SPNEGO GSSAPI
mechanism type to identify generate a GSSAPI message to be sent to
the server with a new request, including the following Authorization
header:
C: GET dir/index.html
C: Authorization: Negotiate a87421000492aa874209af8bc028
The server will decode the gssapi-data and pass this to the SPNEGO
GSSAPI mechanism in the gss_accept_security_context function. If the
context is not complete, the server will respond with a 401 status
code with a WWW-Authenticate header containing the gssapi-data.
S: HTTP/1.1 401 Unauthorized
S: WWW-Authenticate: Negotiate 749efa7b23409c20b92356
The client will decode the gssapi-data, pass this into
Gss_Init_security_context, and return the new gssapi-data to the
server.
<span class="grey">Jaganathan, et al. Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
C: GET dir/index.html
C: Authorization: Negotiate 89a8742aa8729a8b028
This cycle can continue until the security context is complete. When
the return value from the gss_accept_security_context function
indicates that the security context is complete, it may supply final
authentication data to be returned to the client. If the server has
more gssapi data to send to the client to complete the context, it is
to be carried in a WWW-Authenticate header with the final response
containing the HTTP body.
S: HTTP/1.1 200 Success
S: WWW-Authenticate: Negotiate ade0234568a4209af8bc0280289eca
The client will decode the gssapi-data and supply it to
gss_init_security_context using the context for this server. If the
status is successful from the final gss_init_security_context, the
response can be used by the application.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
The SPNEGO HTTP authentication facility is only used to provide
authentication of a user to a server. It provides no facilities for
protecting the HTTP headers or data including the Authorization and
WWW-Authenticate headers that are used to implement this mechanism.
Alternate mechanisms such as TLS can be used to provide
confidentiality. Hashes of the TLS certificates can be used as
channel bindings to secure the channel. In this case clients would
need to enforce that the channel binding information is valid. Note
that Kerb-TLS [<a href="./rfc2712" title=""Addition of Kerberos Cipher Suites to Transport Layer Security (TLS)"">RFC2712</a>] could be used to provide both authentication
and confidentiality, but this requires a change to the TLS provider.
This mechanism is not used for HTTP authentication to HTTP proxies.
If an HTTP proxy is used between the client and server, it must take
care to not share authenticated connections between different
authenticated clients to the same server. If this is not honored,
then the server can easily lose track of security context
associations. A proxy that correctly honors client to server
authentication integrity will supply the "Proxy-support: Session-
Based-Authentication" HTTP header to the client in HTTP responses
from the proxy. The client MUST NOT utilize the SPNEGO HTTP
authentication mechanism through a proxy unless the proxy supplies
this header with the "401 Unauthorized" response from the server.
<span class="grey">Jaganathan, et al. Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
When using the SPNEGO HTTP authentication facility with client-
supplied data such as PUT and POST, the authentication should be
complete between the client and server before sending the user data.
The return status from the gss_init_security_context will indicate
that the security context is complete. At this point, the data can
be sent to the server.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Normative References</span>
[<a id="ref-RFC2743">RFC2743</a>] Linn, J., "Generic Security Service Application Program
Interface Version 2", 2, Update 1", 2743, January 2000.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC4178">RFC4178</a>] Zhu, L., Leach, P., Jaganathan, K., and W. Ingersoll, "The
Simple and Protected GSS-API Generic Security Service
Application Program Interface (GSS-API) Negotiation
Mechanism", 4178, October 2005.
[<a id="ref-RFC2616">RFC2616</a>] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>, June 1999.
[<a id="ref-RFC2617">RFC2617</a>] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP
Authentication: Basic and Digest Access Authentication",
<a href="./rfc2617">RFC 2617</a>, June 1999.
[<a id="ref-RFC2712">RFC2712</a>] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher
Suites to Transport Layer Security (TLS)", <a href="./rfc2712">RFC 2712</a>,
October 1999.
[<a id="ref-RFC4121">RFC4121</a>] Zhu, L., Jaganathan, K., and S. Hartman, "The Kerberos
Version 5 Generic Security Service Application Program
Interface (GSS-API) Mechanism: Version 2", <a href="./rfc4121">RFC 4121</a>, July
2005.
<span class="grey">Jaganathan, et al. Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
Authors' Addresses
Karthik Jaganathan
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
US
EMail: karthikj@microsoft.com
Larry Zhu
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
US
EMail: lzhu@microsoft.com
John Brezak
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
US
EMail: jbrezak@microsoft.com
<span class="grey">Jaganathan, et al. Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc4559">RFC 4559</a> HTTP Authentication in Microsoft Windows June 2006</span>
Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and at www.rfc-editor.org/copyright.html, and
except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
Jaganathan, et al. Informational [Page 8]
</pre>
|