关于认证,基本认证和摘要认证(翻译tr069 3.4.4 和3.4.5)

3.4.4  认证

    如果CPE没有用TLS认证,ACS必须用HTTP来认证CPE。如果TLS用来加密,ACS应该用基本认证。如果TLS没有用来做加密,ACS必须使用摘要认证。

  CPE必须支持HTTP的基本和摘要认证。CPE通过提供的基本认证和摘要认证的有点来确定认证方案。如果使用TLS加密,CPE应该主动发送基本认证身份。

   注意:身份验证需要发送一个初始消息(通常是一个Inform包,该包中包含RPC方法请求);当用TLS做加密时,主动发起一个基本认证可以避免额外的请求。

   如果CPE已经接收到了来自于ACS的认证(基本或摘要),为了维持TCP连接,CPE必须发送在接下来的所有HTTP请求中发送认证头。无论CPE会不会这样做,ACS需要在会话的任意阶段在一个或多个TCP连接中发送认证。

  如果任何形式的HTTP认证用来认证CPE,CPE需要用用户名/用户标识符,用户标识符是所有CPE制造商唯一的标志。

   特别是,CPE的用户名/用户标识符应该是以下两种格式的其中一种:

   <OUI>"_"<ProductClass>"_"<SerialNumber>

    <OUI>"_"<SerialNumber>

    If a username/userid of the above format is used, the <OUI>, <ProductClass>, and
<SerialNumber> fields MUST match exactly the corresponding Parameters included in
the DeviceIdStruct in the Inform message, as defined in Annex A, except that, in order to
guarantee that the Parameter values can be extracted from the username/userid, any
character in the <ProductClass> and <SerialNumber> that is not 0-9, A-Z, a-z, or an
underscore (“_”) MUST be escaped using URI percent-encoding, as defined in RFC 3986
 (不懂,以后翻译)。

Percent-encoding MUST be performed by converting each character to UTF-8 and then
percent-encoding each octet. For example, the character é (LATIN SMALL LETTER E
WITH ACUTE) is represented in UTF-8 as the two octets 0xC3 0xA9 and so would be
percent-encoded as “%C3%A9”.
Note – prior to the clarification that conversion to UTF-8 occurs before percent-encoding, the
escaped username/userid was ambiguous. For example, an implementation might have treated the
character é as the ISO Latin-1 octet 0xE9, which would have been percent-encoded as “%E9”.
 (好像是格式之类的,以后翻译)


如果用到以上格式中的其中之一,只有当参数ProductClass的值为空时,才能用第二种形式。

例如:
012345-0123456789
012345-STB-0123456789
012345-Set%2DTop%2DBox-0123456789

用于HTTP认证的密码对于CPE来说应该是一个唯一的值。也就是说,多个CPE不应该共享同一个密码。这个密码是个共享的秘密,并且必须被CPE和ACS所知。CPE和ACS都应该采用恰当的方式来防止在ACS端出现未经授权的访问密码或密码列表。
3.4.5 摘要认证
  本节概述了在广域网管理协议中使用摘要认证的必要项。这些必要项应用于因RPC信息交换和文件传输而建立的连接的认证。注意,在不同类型的连接中,ACS和CPE扮演的角色是HTTP客户端和服务器。当发起连接请求的时候,ACS扮演HTTP客户端的角色,当与ACS发起连接时,CPE扮演HTTP客户端的角色。CPE和ACS必须支持RFC2617的“qop”选项,并且包括该选项的值“auth”。根据RFC2617,this means that the HTTP client MUST use a new style digest mechanism when this option is provided to it by the HTTP server. (不理解哦)。
 当使用摘要认证时,打开一个新的TCP连接,ACS应该使用一个新的nonce值并且CPE也应该用一个新的cnone值。
  注意:如果会话中没有用TLS,ACS重复利用HTTP认证的nonce值会严重影响会话的安全性,尤其是,当ACS在多个TCP连接的过程中用已经使用过的nonce值进行认证时,面对attacks,ACS就会很脆弱,但是,如果在会话中使用了TLS,风险就会降低。CPE和ACS必须支持MD5摘要认证算法,CPE必须额外支持MD5-sess摘要认证算法。


  


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章