Network Working Group                                      K. Jaganathan
Request for Comments: 4559                                        L. Zhu
Category: Informational                                        J. Brezak
                                                   Microsoft Corporation
                                                               June 2006
        
Network Working Group                                      K. Jaganathan
Request for Comments: 4559                                        L. Zhu
Category: Informational                                        J. Brezak
                                                   Microsoft Corporation
                                                               June 2006
        

SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows

Microsoft Windows中基于SPNEGO的Kerberos和NTLM HTTP身份验证

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).

版权所有(C)互联网协会(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.

本文档介绍Microsoft Windows 2000中集成的Microsoft Internet Explorer(MSIE)和Internet信息服务(IIS)如何使用Kerberos增强web事务的安全性。这里定义了“协商”的超文本传输协议(HTTP)认证方案;当协商导致选择Kerberos时,将执行身份验证和模拟(可选)的安全服务(IIS服务器假定已通过身份验证的主体的windows标识)。本文档说明HTTP身份验证如何利用简单且受保护的GSS-API协商机制。本文件未提供简单和受保护协商(SPNEGO)实施的详细信息。

Table of Contents

目录

   1. Introduction ....................................................2
   2. Conventions Used in This Document ...............................2
   3. Access Authentication ...........................................2
      3.1. Reliance on the HTTP/1.1 Specification .....................2
   4. HTTP Negotiate Authentication Scheme ............................2
      4.1. The WWW-Authenticate Response Header .......................2
   5. Negotiate Operation Example .....................................4
   6. Security Considerations .........................................5
   7. Normative References ............................................6
        
   1. Introduction ....................................................2
   2. Conventions Used in This Document ...............................2
   3. Access Authentication ...........................................2
      3.1. Reliance on the HTTP/1.1 Specification .....................2
   4. HTTP Negotiate Authentication Scheme ............................2
      4.1. The WWW-Authenticate Response Header .......................2
   5. Negotiate Operation Example .....................................4
   6. Security Considerations .........................................5
   7. Normative References ............................................6
        
1. Introduction
1. 介绍

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.

除了其他机制外,Microsoft还在Microsoft Internet Explorer(MSIE)和Internet信息服务(IIS)中提供了对Kerberos身份验证的支持。这为Web应用程序提供了Kerberos v5协议的好处。

Support for Kerberos authentication is based on other previously defined mechanisms, such as SPNEGO Simple And Protected Negotiate (SPNEGO) [RFC4178] and the Generic Security Services Application Program Interface(GSSAPI).

对Kerberos身份验证的支持基于其他先前定义的机制,如SPNEGO简单和受保护协商(SPNEGO)[RFC4178]和通用安全服务应用程序接口(GSSAPI)。

2. Conventions Used in This Document
2. 本文件中使用的公约

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in [RFC2119].

关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。

3. Access Authentication
3. 访问认证
3.1. Reliance on the HTTP/1.1 Specification
3.1. 对HTTP/1.1规范的依赖

This specification is a companion to the HTTP/1.1 specification [RFC2616], and it builds on the authentication mechanisms defined in [RFC2617]. 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.

本规范是HTTP/1.1规范[RFC2616]的配套规范,它建立在[RFC2617]中定义的身份验证机制之上。它使用该文档(2.1)中的扩充BNF部分,并且它依赖于该文档中定义的非终端和HTTP/1.1规范的其他方面。

4. HTTP Negotiate Authentication Scheme
4. HTTP协商认证方案

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 [RFC2743]. In particular, they follow the formats set for the SPNEGO [RFC4178] and Kerberos [RFC4121] mechanisms for GSSAPI. The "Negotiate" auth-scheme calls for the use of SPNEGO GSSAPI tokens that the specific mechanism type specifies.

Kerberos的使用被包装在“协商”的HTTP身份验证方案中。交换的auth参数使用为GSS-API[RFC2743]定义的数据格式。特别是,它们遵循为GSSAPI的SPNEGO[RFC4178]和Kerberos[RFC4121]机制设置的格式。“协商”身份验证方案要求使用特定机制类型指定的SPNEGO GSSAPI令牌。

The current implementation of this protocol is limited to the use of SPNEGO with the Kerberos and Microsoft(NT Lan Manager) NTLM protocols.

此协议的当前实现仅限于在Kerberos和Microsoft(NT Lan Manager)NTLM协议中使用SPNEGO。

4.1. The WWW-Authenticate Response Header
4.1. WWW验证响应头

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 [RFC2616]. The initial WWW-Authenticate header will not carry any gssapi-data.

如果服务器接收到访问保护对象的请求,并且如果未发送可接受的授权标头,则服务器根据[RFC2616]中描述的框架响应“401 Unauthorized”状态代码和“WWW Authenticate:”标头。初始WWW Authenticate标头将不携带任何gssapi数据。

The negotiate scheme will operate as follows:

谈判方案将按如下方式运作:

challenge = "Negotiate" auth-data auth-data = 1#( [gssapi-data] )

challenge=“协商”身份验证数据身份验证数据=1(gssapi数据)

The meanings of the values of the directives used above are as follows:

上述指令值的含义如下:

gssapi-data

gssapi数据

If the gss_accept_security_context returns a token for the client, this directive contains the base64 encoding of an initialContextToken, as defined in [RFC2743]. This is not present in the initial response from the server.

如果gss_accept_security_上下文为客户端返回令牌,则此指令包含initialContextToken的base64编码,如[RFC2743]中所定义。这在服务器的初始响应中不存在。

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.

状态代码200状态响应还可以携带包含认证的最后一段的“WWW-Authenticate”响应报头。在这种情况下,将显示gssapi数据。在使用响应内容之前,gssapi数据应该由gss_init_security_上下文处理,以确定安全上下文的状态。如果此函数指示成功,则应用程序可以使用响应。否则,应根据身份验证状态采取适当的操作。

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.

例如,如果请求相互身份验证,而服务器无法证明其身份,则身份验证可能在最后一段失败。在这种情况下,返回的结果是可疑的。在HTTP操作之前,并不总是能够对服务器进行相互身份验证。POST方法属于此类别。

When the Kerberos Version 5 GSSAPI mechanism [RFC4121] is being used, the HTTP server will be using a principal name of the form of "HTTP/hostname".

当使用Kerberos版本5 GSSAPI机制[RFC4121]时,HTTP服务器将使用“HTTP/hostname”形式的主体名称。

4.2. The Authorization Request Header
4.2. 授权请求标头

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 [RFC2616] and is utilized as follows:

在从服务器接收到包含“WWW-Authenticate”头的响应后,客户机将重试HTTP请求,并传递HTTP“authentication”头行。这是根据[RFC2616]中描述的框架定义的,并按如下方式使用:

credentials = "Negotiate" auth-data2 auth-data2 = 1#( gssapi-data )

credentials=“协商”auth-data2 auth-data2=1(gssapi数据)

gssapi-data

gssapi数据

This directive contains the base64 encoding of an InitialContextToken, as defined in [RFC2743].

此指令包含[RFC2743]中定义的InitialContextToken的base64编码。

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.

除了成功2xx代码之外的任何返回代码都表示身份验证错误。如果从服务器返回包含带有“协商”和gssapi数据的“WWW-Authenticate”头的401,则它是身份验证请求的继续。

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.

客户端可以使用包含服务器初始令牌的“授权”头启动到服务器的连接。当客户端知道服务器将接受协商HTTP身份验证类型时,此表单将绕过服务器的初始401错误。

5. Negotiate Operation Example
5. 协商操作示例

The client requests an access-protected document from server via a GET method request. The URI of the document is "http://www.nowhere.org/dir/index.html".

客户端通过GET方法请求从服务器请求受访问保护的文档。文档的URI为“http://www.nowhere.org/dir/index.html".

C: GET dir/index.html

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
        
           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:

客户端将使用SPNEGO GSSAPI机制类型获取用户凭据,以识别并生成GSSAPI消息,该消息将与新请求一起发送到服务器,包括以下授权标头:

           C: GET dir/index.html
           C: Authorization: Negotiate a87421000492aa874209af8bc028
        
           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.

服务器将解码gssapi数据,并将其传递给gss_accept_security_上下文函数中的SPNEGO gssapi机制。如果上下文不完整,服务器将以401状态代码响应,该代码带有包含gssapi数据的WWW Authenticate标头。

           S: HTTP/1.1 401 Unauthorized
           S: WWW-Authenticate: Negotiate 749efa7b23409c20b92356
        
           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.

客户端将解码gssapi数据,将其传递到Gss_Init_security_上下文,并将新的gssapi数据返回到服务器。

           C: GET dir/index.html
           C: Authorization: Negotiate 89a8742aa8729a8b028
        
           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.

此循环可以继续,直到安全上下文完成。当gss_accept_security_context函数的返回值指示安全上下文已完成时,它可能会提供要返回给客户端的最终身份验证数据。如果服务器有更多的gssapi数据要发送到客户端以完成上下文,则该数据将在WWW Authenticate标头中携带,最终响应包含HTTP正文。

           S: HTTP/1.1 200 Success
           S: WWW-Authenticate: Negotiate ade0234568a4209af8bc0280289eca
        
           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.

客户端将解码gssapi数据,并使用此服务器的上下文将其提供给gss_init_security_上下文。如果最终gss_init_security_上下文中的状态为successful,则应用程序可以使用响应。

6. Security Considerations
6. 安全考虑

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.

SPNEGO HTTP身份验证工具仅用于向服务器提供用户身份验证。它不提供用于保护HTTP头或数据的设施,包括用于实现此机制的授权和WWW身份验证头。

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 [RFC2712] could be used to provide both authentication and confidentiality, but this requires a change to the TLS provider.

可以使用TLS等替代机制来提供机密性。TLS证书的哈希可以用作通道绑定以保护通道。在这种情况下,客户端需要强制通道绑定信息有效。请注意,路缘TLS[RFC2712]可用于提供身份验证和机密性,但这需要更改TLS提供商。

This mechanism is not used for HTTP authentication to HTTP proxies.

此机制不用于HTTP代理的HTTP身份验证。

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.

如果在客户机和服务器之间使用HTTP代理,则必须注意不要在同一服务器的不同经过身份验证的客户机之间共享经过身份验证的连接。如果不遵守这一点,那么服务器很容易失去对安全上下文关联的跟踪。正确尊重客户端到服务器身份验证完整性的代理将在代理的HTTP响应中向客户端提供“代理支持:基于会话的身份验证”HTTP头。客户机不得通过代理使用SPNEGO HTTP身份验证机制,除非代理向该头提供来自服务器的“401 Unauthorized”响应。

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.

当对客户端提供的数据(如PUT和POST)使用SPNEGO HTTP身份验证工具时,应在发送用户数据之前完成客户端和服务器之间的身份验证。gss_init_security_上下文的返回状态将指示安全上下文已完成。此时,可以将数据发送到服务器。

7. Normative References
7. 规范性引用文件

[RFC2743] Linn, J., "Generic Security Service Application Program Interface Version 2", 2, Update 1", 2743, January 2000.

[RFC2743]林恩,J.,“通用安全服务应用程序接口版本2”,第2期,更新1“,2743,2000年1月。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC4178] 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.

[RFC4178]Zhu,L.,Leach,P.,Jaganathan,K.,和W.Ingersoll,“简单且受保护的GSS-API通用安全服务应用程序接口(GSS-API)协商机制”,41782005年10月。

[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.

[RFC2616]菲尔丁,R.,盖蒂斯,J.,莫卧儿,J.,弗莱斯蒂克,H.,马斯特,L.,利奇,P.,和T.伯纳斯李,“超文本传输协议——HTTP/1.1”,RFC 2616,1999年6月。

[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999.

[RFC2617]Franks,J.,Hallam Baker,P.,Hostetler,J.,Lawrence,S.,Leach,P.,Lootonen,A.,和L.Stewart,“HTTP认证:基本和摘要访问认证”,RFC 26171999年6月。

[RFC2712] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher Suites to Transport Layer Security (TLS)", RFC 2712, October 1999.

[RFC2712]Medvinsky,A.和M.Hur,“将Kerberos密码套件添加到传输层安全性(TLS)”,RFC 2712,1999年10月。

[RFC4121] Zhu, L., Jaganathan, K., and S. Hartman, "The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2", RFC 4121, July 2005.

[RFC4121]Zhu,L.,Jaganathan,K.,和S.Hartman,“Kerberos版本5通用安全服务应用程序接口(GSS-API)机制:版本2”,RFC 41212005年7月。

Authors' Addresses

作者地址

Karthik Jaganathan Microsoft Corporation One Microsoft Way Redmond, WA 98052 US

Karthik Jaganathan微软公司美国华盛顿州雷德蒙微软大道一号,邮编:98052

   EMail: karthikj@microsoft.com
        
   EMail: karthikj@microsoft.com
        

Larry Zhu Microsoft Corporation One Microsoft Way Redmond, WA 98052 US

Larry Zhu微软公司美国华盛顿州雷德蒙微软大道一号,邮编:98052

   EMail: lzhu@microsoft.com
        
   EMail: lzhu@microsoft.com
        

John Brezak Microsoft Corporation One Microsoft Way Redmond, WA 98052 US

约翰·布雷扎克微软公司美国华盛顿州雷德蒙微软大道一号,邮编:98052

   EMail: jbrezak@microsoft.com
        
   EMail: jbrezak@microsoft.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2006).

版权所有(C)互联网协会(2006年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78 and at www.rfc-editor.org/copyright.html, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78和www.rfc-editor.org/copyright.html中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

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 BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

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 http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

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.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.

Acknowledgement

确认

Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).

RFC编辑器功能的资金由IETF行政支持活动(IASA)提供。