Kerberos

Kerberos  (pronounced /ˈkɜrbərəs/ "kur-ber-uhs")  是一种计算机网络授权协议,用来在非安全网络中,对个人通信以安全的手段进行身份认证。这个词又指麻省理工学院为这个协议开发的一套计算机软件。

软件名称

Kerberos

类    别

计算机网络授权协议

开发地

麻省理工

适用范围

非安全网络

用    途

身份认证

学    科

计算机

含义

Kerberos 是一种网络认证协议,其设计目标是通过密钥系统为客户机 / 服务器应用程序提供强大的认证服务。该认证过程的实现不依赖于主机操作系统的认证,无需基于主机地址的信任,不要求网络上所有主机的物理安全,并假定网络上传送的数据包可以被任意地读取、修改和插入数据。在以上情况下, Kerberos 作为一种可信任的第三方认证服务,是通过传统的密码技术(如:共享密钥)执行认证服务的。

认证过程具体如下:客户机向认证服务器(AS)发送请求,要求得到某服务器的证书,然后 AS 的响应包含这些用客户端密钥加密的证书。证书的构成为: 1) 服务器 “ticket” ; 2) 一个临时加密密钥(又称为会话密钥 “session key”) 。客户机将 ticket (包括用服务器密钥加密的客户机身份和一份会话密钥的拷贝)传送到服务器上。会话密钥可以(现已经由客户机和服务器共享)用来认证客户机或认证服务器,也可用来为通信双方以后的通讯提供加密服务,或通过交换独立子会话密钥为通信双方提供进一步的通信加密服务。

上述认证交换过程需要只读方式访问 Kerberos 数据库。但有时,数据库中的记录必须进行修改,如添加新的规则或改变规则密钥时。修改过程通过客户机和第三方 Kerberos 服务器(Kerberos 管理器 KADM)间的协议完成。有关管理协议在此不作介绍。另外也有一种协议用于维护多份 Kerberos 数据库的拷贝,这可以认为是执行过程中的细节问题,并且会不断改变以适应各种不同数据库技术。

Kerberos又指麻省理工学院为这个协议开发的一套计算机网络安全系统。系统设计上采用客户端/服务器结构与DES加密技术,并且能够进行相互认证,即客户端和服务器端均可对对方进行身份认证。可以用于防止窃听、防止replay攻击、保护数据完整性等场合,是一种应用对称密钥体制进行密钥管理的系统。Kerberos的扩展产品也使用公开密钥加密方法进行认证。 [1] 

Kerberos (pronounced /ˈkɜrbərəs/ "kur-ber-uhs") is a computer network authentication protocol, which allows people communicating over a non-secure network to prove their identity to one another in a secure manner. It is also a suite of free software published by Massachusetts Institute of Technology (MIT) that implements this protocol. Its designers aimed primarily at a client-server model, and it provides mutual authentication — both the user and the server verify each other's identity. Kerberos protocol messages are protected against spying and replay attacks.

Kerberos performs authentication as a trusted third party authentication service by using cryptographic shared secret under the assumption that packets traveling along the insecure network can be read, modified, and inserted. Kerberos builds on symmetric-key cryptography and requires a key distribution center. Extensions to Kerberos can provide for the use of public-key cryptography during certain phases of authentication.

历史

麻省理工研发了Kerberos协议来保护Project Athena提供的网络服务器。这个协议以希腊神话中的人物Kerberos(或者Cerberus)命名,他在希腊神话中是Hades的一条凶猛的三头保卫神犬。目前该协议存在一些版本,版本1-3都只有麻省理工内部发行。

Kerberos版本4的主要设计者Steve Miller和Clifford Neuman,在1980年末发布了这个版本。这个版本主要针对Project Athena。版本5由John Kohl和Clifford Neuman设计,在1993年作为RFC 1510颁布(在2005年由RFC 4120取代),目的在于克服版本4的局限性和安全问题。

麻省理工在版权许可的情况下,制作了一个Kerberos的免费实现工具,这种情况类似于BSD。在2007年,麻省理工组成了一个Kerberos协会,以此推动Kerberos的持续发展。

因为使用了DES加密算法(用56比特的密钥),美国出口管制当局把Kerberos归类为军需品,并禁止其出口。一个非美国设计的Kerberos版本4的实现工具KTH-KRB由瑞典皇家理工研制,它使得这套系统在美国更改密码出口管理条例(2000年)前,在美国境外就可以使用。瑞典的实现工具基于一个叫做eBones的版本,而eBones基于麻省理工对外发行的基于Kerberos版本4的补丁9的Bones(跳过了加密公式和对它们的函数调用)。这些在一定程度上决定了Kerberos为什么没有被叫做eBones版。Kerberos版本5的实现工具,Heimdal,基本上也是由发布KTH-KRB的同一组人发布。

Windows2000和后续的操作系统都默认Kerberos为其默认认证方法。RFC 3244记录整理了微软的一些对Kerberos协议软件包的添加。RFC4757"微软Windows2000Kerberos修改密码并设定密码协议"记录整理了微软用RC4密码的使用。虽然微软使用了Kerberos协议,却并没有用麻省理工的软件。

苹果的Mac OS X也使用了Kerberos的客户和服务器版本。

Red Hat Enterprise Linux4 和后续的操作系统使用了Kerberos的客户和服务器版本。

IETF Kerberos的工作小组在2005年更新了说明规范,最近的更新包括:

"加密和校验和细则"(RFC 3961)

"针对Kerberos版本5的高级加密算法(AES)加密"(RFC 3962)

Kerberos版本5说明规范的新版本"Kerberos网络认证服务(版本5)"(RFC 4120)。这个版本废弃了早先的RFC 1510,用更细化和明确的解释说明了协议的一些细节和使用方法。

GSS-API的一个新版本"Kerberos版本5 普通的安全服务应用软件交互机制:版本2"(RFC 4121) [1] 

History and development

MIT developed Kerberos to protect network services provided by Project Athena. The protocol was named after the Greek mythological character Kerberos (or Cerberus), known in Greek mythology as being the monstrous three-headed guard dog of Hades. Several versions of the protocol exist; versions 1–3 used only internally at MIT.

Steve Miller and Clifford Neuman Archived 2008-11-27 at the Wayback Machine, the primary designers of Kerberos version 4 (which used the DES encryption algorithm with 56-bit keys),[1] published that version in 1989, although they had targeted it primarily for Project Athena[2]

Version 5, designed by John Kohl and Clifford Neuman,[2] appeared as RFC 1510 in 1993 (made obsolete by RFC 4120 in 2005), with the intention of overcoming the limitations and security problems of Version 4. The MIT makes an implementation of Kerberos Version 5 freely available, under a software license similar to that used by BSD license.

Several companies used Kerberos Version 5 in commercial software including:

In 2005, the IETF Kerberos working group introduced a new updated specifications for Kerberos Version 5 [2]. updates include:

  • "Encryption and Checksum Specifications" (RFC 3961),
  • "Advanced Encryption Standard (AES) Encryption for Kerberos 5" (RFC 3962),
  • A new edition of the Kerberos Version 5 specification "The Kerberos Network Authentication Service (V5)" (RFC 4120). This version obsoletes RFC 1510, clarifies aspects of the protocol and intended use in a more detailed clear explanation,
  • A new edition of the GSS-API specification "The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2." (RFC 4121).

In 2007, MIT formed the Kerberos Consortium for continuation of development.

工作

简要大概地说一下Kerberos是如何工作的:

  1. 假设你要在一台电脑上访问另一个服务器(你可以发送telnet或类似的登录请求)。你知道服务器要接受你的请求必须要有一张Kerberos的“入场券”。

  2. 要得到这张入场券,你首先要向验证服务器(AS)请求验证。验证服务器会创建基于你的密码(从你的用户名而来)的一个“会话密钥”(就是一个加密密钥),并产生一个代表请求的服务的随机值。这个会话密钥就是“允许入场的入场券”。

  3. 然后,你把这张允许入场的入场券发到授权服务器(TGS)。TGS物理上可以和验证服务器是同一个服务器,只不过它现在执行的是另一个服务。TGS返回一张可以发送给请求服务的服务器的票据。

  4. 服务器或者拒绝这张票据,或者接受这张票据并执行服务。

  5. 因为你从TGS收到的这张票据是打上时间戳的,所以它允许你在某个特定时期内(一般是八小时)不用再验证就可以使用同一张票来发出附加的请求。使这张票拥有一个有限的有效期使其以后不太可能被其他人使用。

实际的过程要比刚才描述的复杂得多。用户过程也会根据具体执行有一些改变。 [2] 

协议内容

协议的安全主要依赖于参加者对时间的松散同步和短周期的叫做Kerberos票据的认证声明。 下面是对这个协议的一个简化描述,将使用以下缩写:

  • AS(Authentication Server)= 认证服务器

  • KDC(Key Distribution Center)= 密钥分发中心

  • TGT(Ticket Granting Ticket)= 票据授权票据,票据的票据

  • TGS(Ticket Granting Server)= 票据授权服务器

  • SS(Service Server)= 特定服务提供端

Simplified description of the protocol

The following abbreviations will be used:

  • AS = Authentication Server
  • TGS = Ticket Granting Server
  • SS or Server = Service Server (Server user requesting its service, such as a print server, a file server,etc...)
  • TGT = Ticket Granting Ticket (Kerberos ticket for the TGS. Prepared by AS, then used to talk with TGS).

Briefly, the client authenticates to AS using a long-term shared secret and receives a ticket from the AS. Later the client can use this ticket to get additional tickets for SS using the same shared secret. These tickets can be used to prove authentication to SS.

客户端用户发送自己的用户名到KDC服务器以向AS服务进行认证。KDC服务器会生成相应的TGT票据,打上时间戳,在本地数据库中查找该用户的密码,并用该密码对TGT进行加密,将结果发还给客户端用户。该操作仅在用户登录或者kinit申请的时候进行。 客户端收到该信息,并使用自己的密码进行解密之后,就能得到TGT票据了。这个TGT会在一段时间之后失效,也有一些程序(session manager)能在用户登陆期间进行自动更新。 当客户端用户需要使用一些特定服务(Kerberos术语中用"principal"表示)的时候,该客户端就发送TGT到KDC服务器中的TGS服务。当该用户的TGT验证通过并且其有权访问所申请的服务时,TGS服务会生成一个该服务所对应的ticket和session key,并发还给客户端。客户端将服务请求与该ticket一并发送给相应的服务端即可。具体的流程请看下面的描述。

其在网络通讯协定中属于显示层。

简单地说,用户先用共享密钥从某认证服务器得到一个身份证明。随后,用户使用这个身份证明与SS通信,而不使用共享密钥。 [2] 

The protocol in more detail

User Client-based Logon Steps:

  1. A user enters a username and password on the client machine.
  2. The client performs a one-way function (mostly a Hash function) on the entered password, and this becomes the secret key of the client/user.

Client Authentication Steps:

  1. The client sends a cleartext message to the AS requesting services on behalf of the user.
    Sample message: "User XYZ would like to request services".
    Note: Neither the secret key nor the password is sent to the AS.
  2. The AS checks to see if the client is in its database. If it is, the AS sends back the following two messages to the client:
    • Message A: Client/TGS Session Key encrypted using the secret key of the client/user.
    • Message B: TGT (which includes the client ID, client network address, ticket validity period, and the Client/TGS Session Key) encrypted using the secret key of the TGS.
  3. Once the client receives messages A and B, it decrypts message A to obtain the Client/TGS Session Key. This session key is used for further communications with TGS. At this point, the client has enough information to authenticate itself to the TGS.
    Note: The client cannot decrypt Message B, as it is encrypted using TGS's secret key.

Client Service Authorization Steps:

  1. When requesting services, the client sends the following two messages to the TGS:
    • Message C: Composed of the TGT from message B and the ID of the requested service.
    • Message D: Authenticator (which is composed of the client ID and the timestamp), encrypted using the Client/TGS Session Key.
  2. Upon receiving messages C and D, the TGS retrieves message B out of message C. It decrypts message B using the TGS secret key. This gives it the Client/TGS Session Key. Using this key, the TGS decrypts message D (Authenticator) and sends the following two messages to the client:
    • Message E: Client-to-Server ticket (which includes the client ID, client network address, validity period and Client/Server Session Key) encrypted using the SS secret key.
    • Message F: Client/Server Session Key encrypted with the Client/TGS Session Key.

Client Service Request Steps:

  1. Upon receiving messages E and F from TGS, the client has enough information to authenticate itself to the SS. The client connects to the SS and sends the following two messages:
    • Message E: from the previous step (the Client-to-Server ticket, encrypted using the SS secret key).
    • Message G: a new Authenticator, which includes the client ID, timestamp and is encrypted using Client/Server Session Key.
  2. The SS decrypts the ticket using its own secret key to retrieve the Client/Server Session Key. Using the sessions key, SS decrypts the Authenticator and sends the following message to the client to confirm its true identity and willingness to serve the client:
    • Message H: the timestamp found in client's Authenticator plus 1, encrypted using the Client/Server Session Key.
  3. The client decrypts the confirmation using the Client/Server Session Key and checks whether the timestamp is correctly updated. If so, then the client can trust the server and can start issuing service requests to the server.
  4. The server provides the requested services to the client.

缺陷

1.失败于单点:它需要中心服务器的持续响应。当Kerberos服务宕机时,没有人可以连接到服务器。这个缺陷可以通过使用复合Kerberos服务器和缺陷认证机制弥补。

2.Kerberos要求参与通信的主机的时钟同步。票据具有一定有效期,因此,如果主机的时钟与Kerberos服务器的时钟不同步,认证会失败。默认设置要求时钟的时间相差不超过10分钟。在实践中,通常用网络时间协议后台程序来保持主机时钟同步。

3.管理协议并没有标准化,在服务器实现工具中有一些差别。

4.因为所有用户使用的密钥都存储于中心服务器中,危及服务器的安全的行为将危及所有用户的密钥。

5.一个危险客户机将危及用户密码。 [1] 

Drawbacks

  • Single point of failure: It requires continuous availability of a central server. When the Kerberos server is down, no one can log in. This can be solved by using multiple Kerberos servers and emergency authentication mechanisms.
  • Kerberos requires the clocks of all involved hosts to be synchronized. The tickets have a time availability period and if the host clock is not synchronized with the Kerberos server clock, the authentication will fail. The default configuration requires that clock times are no more than 10 minutes apart. In practice Network Time Protocol (NTP) is usually used to keep the all hosts synchronized.
  • The administration protocol is not standardized and differs between server implementations. Password changes are described in RFC 3244.
  • Since the secret keys for all users are stored on the central server, a compromise of that server will compromise all users' secret keys.
  • A compromised client will compromise the user's password.

专业词语

一种认证标准,通过使用一台中央服务器来提供“票据”,供其他在网络上提供资源的服务器进行识别。在Windows 2000, XP, Server 2003, Vista, 以及Longhorn, 还有UNIX系统,都对它进行支持。 [1]  

Related pages

References

  1.  "Kerberos Version 4 End of Life Announcement"Massachusetts Institute of Technology. 2006-10-19. Retrieved 2008-11-10.
  2. ↑ Jump up to:2.0 2.1 Micki Krause, Harold F. Tipton (September 1998). "Handbook of Information Security Management ISBN 0-8493-9947-5". CRC Press LLC. Archived from the original on 2008-10-10. Retrieved 2008-11-10.
  • SDK Team, "Microsoft Kerberos (Windows)", MSDN Library aa378747(VS.85) [3]
  • B. Clifford Neuman and Theodore Ts'o, Kerberos: An Authentication Service for Computer Networks, IEEE Communications, 32(9) pp33–38. September 1994. [4]
  • John T. Kohl, B. Clifford Neuman, and Theodore Y. T'so, The Evolution of the Kerberos Authentication System. Distributed Open Systems, pp78–94. IEEE Computer Society Press, 1994. [5] (Postscript format)
  • Cisco Systems Kerberos Overview- An Authentication Service for Open Network Systems

参考:

The Kerberos protocol – MVPS.net Blog

https://simple.wikipedia.org/wiki/Kerberos_(protocol)

Kerberos_百度百科

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值