Internet Engineering Task Force (IETF)                    P. Saint-Andre
Request for Comments: 7622                                          &yet
Obsoletes: 6122                                           September 2015
Category: Standards Track
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                    P. Saint-Andre
Request for Comments: 7622                                          &yet
Obsoletes: 6122                                           September 2015
Category: Standards Track
ISSN: 2070-1721
        

Extensible Messaging and Presence Protocol (XMPP): Address Format

可扩展消息和状态协议(XMPP):地址格式

Abstract

摘要

This document defines the address format for the Extensible Messaging and Presence Protocol (XMPP), including support for code points outside the ASCII range. This document obsoletes RFC 6122.

本文档定义了可扩展消息和状态协议(XMPP)的地址格式,包括对ASCII范围之外的代码点的支持。本文件淘汰了RFC 6122。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7622.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7622.

Copyright Notice

版权公告

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2015 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1. Introduction ....................................................2
   2. Terminology .....................................................3
   3. Addresses .......................................................3
      3.1. Fundamentals ...............................................3
      3.2. Domainpart .................................................5
      3.3. Localpart ..................................................7
      3.4. Resourcepart ...............................................8
      3.5. Examples ...................................................9
   4. Enforcement in JIDs and JID Parts ..............................13
   5. Internationalization Considerations ............................15
   6. IANA Considerations ............................................16
      6.1. Stringprep Profiles Registry ..............................16
   7. Security Considerations ........................................16
      7.1. Reuse of PRECIS ...........................................16
      7.2. Reuse of Unicode ..........................................16
      7.3. Address Spoofing ..........................................16
   8. Conformance Requirements .......................................19
   9. References .....................................................21
      9.1. Normative References ......................................21
      9.2. Informative References ....................................22
   Appendix A. Differences from RFC 6122 .............................26
   Acknowledgements ..................................................27
   Author's Address ..................................................27
        
   1. Introduction ....................................................2
   2. Terminology .....................................................3
   3. Addresses .......................................................3
      3.1. Fundamentals ...............................................3
      3.2. Domainpart .................................................5
      3.3. Localpart ..................................................7
      3.4. Resourcepart ...............................................8
      3.5. Examples ...................................................9
   4. Enforcement in JIDs and JID Parts ..............................13
   5. Internationalization Considerations ............................15
   6. IANA Considerations ............................................16
      6.1. Stringprep Profiles Registry ..............................16
   7. Security Considerations ........................................16
      7.1. Reuse of PRECIS ...........................................16
      7.2. Reuse of Unicode ..........................................16
      7.3. Address Spoofing ..........................................16
   8. Conformance Requirements .......................................19
   9. References .....................................................21
      9.1. Normative References ......................................21
      9.2. Informative References ....................................22
   Appendix A. Differences from RFC 6122 .............................26
   Acknowledgements ..................................................27
   Author's Address ..................................................27
        
1. Introduction
1. 介绍

The Extensible Messaging and Presence Protocol (XMPP) [RFC6120] is an application profile of the Extensible Markup Language [XML] for streaming XML data in close to real time between any two or more network-aware entities. The address format for XMPP entities was originally developed in the Jabber open-source community in 1999, first described by [XEP-0029] in 2002, and then defined canonically by [RFC3920] in 2004 and [RFC6122] in 2011.

可扩展消息和状态协议(XMPP)[RFC6120]是可扩展标记语言[XML]的应用程序配置文件,用于在任何两个或多个网络感知实体之间近实时地流式传输XML数据。XMPP实体的地址格式最初于1999年在Jabber开源社区中开发,最初由[XEP-0029]在2002年描述,然后由[RFC3920]在2004年和[RFC6122]在2011年进行规范定义。

As specified in RFCs 3920 and 6122, the XMPP address format used the "stringprep" technology for preparation and comparison of non-ASCII characters [RFC3454]. Following the movement of internationalized domain names away from stringprep, this document defines the XMPP address format in a way that no longer depends on stringprep (see the Preparation, Enforcement, and Comparison of Internationalized Strings (PRECIS) problem statement [RFC6885]). Instead, this document builds upon the internationalization framework defined by the IETF's PRECIS working group [RFC7564].

按照RFCs 3920和6122的规定,XMPP地址格式使用“stringprep”技术来准备和比较非ASCII字符[RFC3454]。随着国际化域名从stringprep转移,本文档以不再依赖stringprep的方式定义XMPP地址格式(请参阅国际化字符串的准备、实施和比较(PRECIS)问题声明[RFC6885])。相反,本文件建立在IETF PRECIS工作组[RFC7564]定义的国际化框架之上。

Although every attempt has been made to ensure that the characters allowed in Jabber Identifiers (JIDs) under stringprep are still allowed and handled in the same way under PRECIS, there is no guarantee of strict backward compatibility because of changes in Unicode and the fact that PRECIS handling is based on Unicode properties, not a hardcoded table of characters. Because it is possible that previously valid JIDs might no longer be valid (or previously invalid JIDs might now be valid), operators of XMPP services are advised to perform careful testing before migrating accounts and other data (see Section 6 of [RFC7613] for guidance).

尽管已尽一切努力确保stringprep下Jabber标识符(JID)中允许的字符在PRECIS下仍然以相同的方式允许和处理,但由于Unicode的变化以及PRECIS处理基于Unicode属性的事实,无法保证严格的向后兼容性,不是硬编码的字符表。由于以前有效的JID可能不再有效(或者以前无效的JID现在可能有效),建议XMPP服务的运营商在迁移帐户和其他数据之前进行仔细测试(请参阅[RFC7613]的第6节以获取指导)。

This document obsoletes RFC 6122.

本文件淘汰了RFC 6122。

2. Terminology
2. 术语

Many important terms used in this document are defined in [RFC7564], [RFC5890], [RFC6120], [RFC6365], and [Unicode].

本文档中使用的许多重要术语在[RFC7564]、[RFC5890]、[RFC6120]、[RFC6365]和[Unicode]中定义。

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

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照[RFC2119]中的说明进行解释。

3. Addresses
3. 地址
3.1. Fundamentals
3.1. 基本原理

An XMPP entity is anything that can communicate using XMPP. For historical reasons, the network address of an XMPP entity is called a JID. A valid JID is a string of Unicode code points [Unicode], encoded using UTF-8 [RFC3629], and structured as an ordered sequence of localpart, domainpart, and resourcepart, where the first two parts are demarcated by the '@' character used as a separator and the last two parts are similarly demarcated by the '/' character (e.g., <juliet@example.com/balcony>).

XMPP实体是可以使用XMPP进行通信的任何东西。由于历史原因,XMPP实体的网络地址称为JID。有效的JID是一组Unicode码点[Unicode],使用UTF-8[RFC3629]进行编码,并以localpart、domainpart和resourcepart的有序序列进行结构,其中前两部分由用作分隔符的“@”字符划分,后两部分由“/”字符类似地划分(例如:<juliet@example.com/阳台>)。

The syntax for a JID is defined as follows, using the Augmented Backus-Naur Form (ABNF) as specified in [RFC5234].

JID的语法定义如下,使用[RFC5234]中指定的增广Backus-Naur形式(ABNF)。

      jid          = [ localpart "@" ] domainpart [ "/" resourcepart ]
      localpart    = 1*1023(userbyte)
                     ;
                     ; a "userbyte" is a byte used to represent a
                     ; UTF-8 encoded Unicode code point that can be
                     ; contained in a string that conforms to the
                     ; UsernameCaseMapped profile of the PRECIS
                     ; IdentifierClass defined in RFC 7613
                     ;
      domainpart   = IP-literal / IPv4address / ifqdn
                     ;
                     ; the "IPv4address" and "IP-literal" rules are
                     ; defined in RFCs 3986 and 6874, respectively,
                     ; and the first-match-wins (a.k.a. "greedy")
                     ; algorithm described in Appendix B of RFC 3986
                     ; applies to the matching process
                     ;
      ifqdn        = 1*1023(domainbyte)
                     ;
                     ; a "domainbyte" is a byte used to represent a
                     ; UTF-8 encoded Unicode code point that can be
                     ; contained in a string that conforms to RFC 5890
                     ;
      resourcepart = 1*1023(opaquebyte)
                     ;
                     ; an "opaquebyte" is a byte used to represent a
                     ; UTF-8 encoded Unicode code point that can be
                     ; contained in a string that conforms to the
                     ; OpaqueString profile of the PRECIS
                     ; FreeformClass defined in RFC 7613
                     ;
        
      jid          = [ localpart "@" ] domainpart [ "/" resourcepart ]
      localpart    = 1*1023(userbyte)
                     ;
                     ; a "userbyte" is a byte used to represent a
                     ; UTF-8 encoded Unicode code point that can be
                     ; contained in a string that conforms to the
                     ; UsernameCaseMapped profile of the PRECIS
                     ; IdentifierClass defined in RFC 7613
                     ;
      domainpart   = IP-literal / IPv4address / ifqdn
                     ;
                     ; the "IPv4address" and "IP-literal" rules are
                     ; defined in RFCs 3986 and 6874, respectively,
                     ; and the first-match-wins (a.k.a. "greedy")
                     ; algorithm described in Appendix B of RFC 3986
                     ; applies to the matching process
                     ;
      ifqdn        = 1*1023(domainbyte)
                     ;
                     ; a "domainbyte" is a byte used to represent a
                     ; UTF-8 encoded Unicode code point that can be
                     ; contained in a string that conforms to RFC 5890
                     ;
      resourcepart = 1*1023(opaquebyte)
                     ;
                     ; an "opaquebyte" is a byte used to represent a
                     ; UTF-8 encoded Unicode code point that can be
                     ; contained in a string that conforms to the
                     ; OpaqueString profile of the PRECIS
                     ; FreeformClass defined in RFC 7613
                     ;
        

All JIDs are based on the foregoing structure. However, note that the formal syntax provided above does not capture all of the rules and restrictions that apply to JIDs, which are described below.

所有JID都基于上述结构。但是,请注意,上面提供的正式语法并没有捕获适用于JID的所有规则和限制,下面将介绍这些规则和限制。

Each allowable portion of a JID (localpart, domainpart, and resourcepart) is 1 to 1023 octets in length, resulting in a maximum total size (including the '@' and '/' separators) of 3071 octets.

JID的每个允许部分(localpart、domainpart和resourcepart)的长度为1到1023个八位字节,因此最大总大小(包括“@”和“/”分隔符)为3071个八位字节。

Implementation Note: The length limits on JIDs and parts of JIDs are based on octets (bytes), not characters. UTF-8 encoding can result in more than one octet per character.

实现说明:JID和部分JID的长度限制基于八位字节(字节),而不是字符。UTF-8编码可能导致每个字符超过一个八位组。

Implementation Note: When dividing a JID into its component parts, an implementation needs to match the separator characters '@' and '/' before applying any transformation algorithms, which might decompose certain Unicode code points to the separator characters.

实现说明:当将JID划分为其组件部分时,实现需要在应用任何转换算法之前匹配分隔符“@”和“/”,这可能会将某些Unicode代码点分解为分隔符。

Implementation Note: Reuse of the IP-literal rule from [RFC6874] implies that IPv6 addresses are enclosed within square brackets (i.e., beginning with '[' and ending with ']'), which was not the case with the definition of the XMPP address format in [RFC3920] but which was changed in [RFC6122]. Also note that the IP-literal rule was updated between [RFC3986] and [RFC6874] to optionally add a zone identifier to any literal address.

实施说明:重用[RFC6874]中的IP文字规则意味着IPv6地址被括在方括号内(即,以“[”开头,以“]”结尾),这与[RFC3920]中XMPP地址格式的定义不同,但在[RFC6122]中有所更改。还要注意的是,IP文字规则在[RFC3986]和[RFC6874]之间进行了更新,可以选择向任何文字地址添加区域标识符。

This document defines the native format for JIDs; see [RFC5122] for information about the representation of a JID as a Uniform Resource Identifier (URI) [RFC3986] or Internationalized Resource Identifier (IRI) [RFC3987] and the extraction of a JID from an XMPP URI or IRI.

本文件定义了JID的本机格式;有关将JID表示为统一资源标识符(URI)[RFC3986]或国际化资源标识符(IRI)[RFC3987]以及从XMPP URI或IRI提取JID的信息,请参见[RFC5122]。

3.2. Domainpart
3.2. 域部分

The domainpart of a JID is the portion that remains once the following parsing steps are taken:

JID的domainpart是执行以下解析步骤后剩下的部分:

1. Remove any portion from the first '/' character to the end of the string (if there is a '/' character present).

1. 删除从第一个“/”字符到字符串末尾的任何部分(如果存在“/”字符)。

2. Remove any portion from the beginning of the string to the first '@' character (if there is an '@' character present).

2. 删除从字符串开头到第一个“@”字符的任何部分(如果存在“@”字符)。

This parsing order is important, as illustrated by example 15 in Section 3.5.

这个解析顺序很重要,如第3.5节中的示例15所示。

The domainpart is the primary identifier and is the only REQUIRED element of a JID (a mere domainpart is a valid JID). Typically, a domainpart identifies the "home" server to which clients connect for XML routing and data management functionality. However, it is not necessary for an XMPP domainpart to identify an entity that provides core XMPP server functionality (e.g., a domainpart can identify an entity such as a multi-user chat service [XEP-0045], a publish-subscribe service [XEP-0060], or a user directory).

domainpart是主要标识符,是JID的唯一必需元素(仅domainpart是有效的JID)。通常,domainpart标识客户端为XML路由和数据管理功能连接的“主”服务器。然而,XMPP域部件不需要识别提供核心XMPP服务器功能的实体(例如,域部件可以识别诸如多用户聊天服务[XEP-0045]、发布-订阅服务[XEP-0060]或用户目录等实体)。

The domainpart for every XMPP service MUST be a fully qualified domain name (FQDN), an IPv4 address, an IPv6 address, or an unqualified hostname (i.e., a text label that is resolvable on a local network).

每个XMPP服务的domainpart必须是完全限定的域名(FQDN)、IPv4地址、IPv6地址或非限定的主机名(即,可在本地网络上解析的文本标签)。

Informational Note: The term "fully qualified domain name" is not well defined. In [RFC1034], it is also called an absolute domain name, and the two terms are associated in [RFC1535]. The earliest use of the term can be found in [RFC1123]. References to those older specifications ought not to be construed as limiting the

信息性说明:术语“完全限定域名”的定义不明确。在[RFC1034]中,它也称为绝对域名,这两个术语在[RFC1535]中关联。该术语的最早用法见[RFC1123]。对那些旧规范的引用不应被解释为限制

characters of a fully qualified domain name to the ASCII range; for example, [RFC5890] mentions that a fully qualified domain name can contain one or more U-labels.

ASCII范围内的完全限定域名的字符;例如,[RFC5890]提到完全限定的域名可以包含一个或多个U型标签。

Interoperability Note: Domainparts that are IP addresses might not be accepted by other services for the purpose of server-to-server communication, and domainparts that are unqualified hostnames cannot be used on public networks because they are resolvable only on a local network.

互操作性说明:出于服务器到服务器通信的目的,作为IP地址的DomainPart可能不被其他服务接受,并且作为非限定主机名的DomainPart不能在公共网络上使用,因为它们只能在本地网络上解析。

If the domainpart includes a final character considered to be a label separator (dot) by [RFC1034], this character MUST be stripped from the domainpart before the JID of which it is a part is used for the purpose of routing an XML stanza, comparing against another JID, or constructing an XMPP URI or IRI [RFC5122]. In particular, such a character MUST be stripped before any other canonicalization steps are taken.

如果domainpart包含[RFC1034]认为是标签分隔符(dot)的最后一个字符,则必须在将该字符作为其一部分的JID用于路由XML节、与另一个JID进行比较或构造XMPP URI或IRI[RFC5122]之前,从domainpart中删除该字符。特别是,在采取任何其他规范化步骤之前,必须先剥离此类字符。

In general, the content of a domainpart is an Internationalized Domain Name (IDN) as described in the specifications for Internationalized Domain Names in Applications (commonly called "IDNA2008"), and a domainpart is an "IDNA-aware domain name slot" as defined in [RFC5890].

通常,domainpart的内容是《应用程序中的国际化域名规范》(通常称为“IDNA2008”)中所述的国际化域名(IDN),domainpart是[RFC5890]中定义的“识别IDNA的域名槽”。

After any and all normalization, conversion, and mapping of code points as well as encoding of the string as UTF-8, a domainpart MUST NOT be zero octets in length and MUST NOT be more than 1023 octets in length. (Naturally, the length limits of [RFC1034] apply, and nothing in this document is to be interpreted as overriding those more fundamental limits.)

在对代码点进行任何和所有规范化、转换和映射以及将字符串编码为UTF-8之后,domainpart的长度不得为零个八位字节,长度不得超过1023个八位字节。(当然,[RFC1034]的长度限制适用,本文件中的任何内容都不能解释为覆盖了这些更基本的限制。)

Detailed rules and considerations for preparation, enforcement, and comparison are provided in the following sections.

以下章节提供了准备、实施和比较的详细规则和注意事项。

3.2.1. Preparation
3.2.1. 准备

An entity that prepares a string for inclusion in an XMPP domainpart slot MUST ensure that the string consists only of Unicode code points that are allowed in NR-LDH labels or U-labels as defined in [RFC5890]. This implies that the string MUST NOT include A-labels as defined in [RFC5890]; each A-label MUST be converted to a U-label during preparation of a string for inclusion in a domainpart slot. In addition, the string MUST be encoded as UTF-8 [RFC3629].

准备包含在XMPP domainpart插槽中的字符串的实体必须确保该字符串仅包含[RFC5890]中定义的NR-LDH标签或U标签中允许的Unicode代码点。这意味着字符串不得包含[RFC5890]中定义的A标签;在准备要包含在domainpart插槽中的字符串期间,每个A标签必须转换为U标签。此外,字符串必须编码为UTF-8[RFC3629]。

3.2.2. Enforcement
3.2.2. 执行

An entity that performs enforcement in XMPP domainpart slots MUST prepare a string as described in Section 3.2.1 and MUST also apply the normalization, case-mapping, and width-mapping rules defined in [RFC5892].

在XMPP domainpart插槽中执行强制的实体必须按照第3.2.1节所述准备字符串,并且还必须应用[RFC5892]中定义的规范化、大小写映射和宽度映射规则。

Informational Note: The order in which the rules are applied for IDNA2008 (see [RFC5892] and [RFC5895]) is different from the order for localparts and resourceparts as described under Sections 3.3 and 3.4.

信息性说明:IDNA2008应用规则的顺序(参见[RFC5892]和[RFC5895])不同于第3.3节和第3.4节中描述的localparts和resourceparts的顺序。

3.2.3. Comparison
3.2.3. 比较

An entity that performs comparison of two strings before or after their inclusion in XMPP domainpart slots MUST prepare each string as specified in Section 3.2.1 and then enforce the normalization, case-mapping, and width-mapping rules specified in Section 3.2.2. The two strings are to be considered equivalent if they are an exact octet-for-octet match (sometimes called "bit-string identity").

在XMPP domainpart插槽中包含两个字符串之前或之后执行比较的实体必须按照第3.2.1节中的规定准备每个字符串,然后执行第3.2.2节中规定的规范化、大小写映射和宽度映射规则。如果这两个字符串是八位字节匹配的精确八位字节(有时称为“位字符串标识”),则认为它们是等效的。

3.3. Localpart
3.3. 局部

The localpart of a JID is an optional identifier placed before the domainpart and separated from the latter by the '@' character. Typically, a localpart uniquely identifies the entity requesting and using network access provided by a server (i.e., a local account), although it can also represent other kinds of entities (e.g., a chatroom associated with a multi-user chat service [XEP-0045]). The entity represented by an XMPP localpart is addressed within the context of a specific domain (i.e., <localpart@domainpart>).

JID的localpart是一个可选标识符,位于domainpart之前,并用“@”字符与后者隔开。通常,localpart唯一地标识请求并使用服务器(即本地帐户)提供的网络访问的实体,尽管它也可以表示其他类型的实体(例如,与多用户聊天服务[XEP-0045]关联的聊天室)。XMPP localpart表示的实体在特定域的上下文中寻址(即<localpart@domainpart>).

The localpart of a JID MUST NOT be zero octets in length and MUST NOT be more than 1023 octets in length. This rule is to be enforced after any normalization and mapping of code points as well as encoding of the string as UTF-8.

JID的localpart的长度不得为零个八位字节,且不得超过1023个八位字节。在对代码点进行任何规范化和映射以及将字符串编码为UTF-8之后,将强制执行此规则。

The localpart of a JID is an instance of the UsernameCaseMapped profile of the PRECIS IdentifierClass, which is specified in [RFC7613]. The rules and considerations provided in that specification MUST be applied to XMPP localparts.

JID的localpart是PRECIS IdentifierClass的UsernameCaseMapped配置文件的实例,在[RFC7613]中指定。该规范中提供的规则和注意事项必须应用于XMPP localparts。

Implementation Note: XMPP uses the Simple Authentication and Security Layer (SASL) [RFC4422] for authentication. At the time of this writing, some SASL mechanisms use SASLprep [RFC4013] for the handling of usernames and passwords; in the future, these SASL mechanisms will likely transition to the use of PRECIS-based handling rules as specified in [RFC7613]. For a detailed

实现说明:XMPP使用简单身份验证和安全层(SASL)[RFC4422]进行身份验证。在撰写本文时,一些SASL机制使用SASLprep[RFC4013]来处理用户名和密码;将来,这些SASL机制可能会过渡到使用[RFC7613]中规定的基于PRECIS的处理规则。详细的

discussion about the implications of that transition (including the potential need to modify or remove certain characters in the underlying account database), see both Section 6 and Appendix A of [RFC7613].

关于该转换影响的讨论(包括修改或删除基础帐户数据库中某些字符的潜在需要),请参见[RFC7613]第6节和附录A。

3.3.1. Further Excluded Characters
3.3.1. 进一步排除的字符

In XMPP, the following characters are explicitly disallowed in XMPP localparts, even though they are allowed by the IdentifierClass base class and the UsernameCaseMapped profile:

在XMPP中,以下字符在XMPP localparts中被明确禁止,即使IdentifierClass基类和UsernameCaseMapped概要文件允许它们:

" U+0022 (QUOTATION MARK)

“U+0022(引号)

& U+0026 (AMPERSAND)

&U+0026(与符号)

' U+0027 (APOSTROPHE)

'U+0027(撇号)

/ U+002F (SOLIDUS)

/U+002F(索利多金币)

: U+003A (COLON)

:U+003A(冒号)

< U+003C (LESS-THAN SIGN)

<U+003C(小于符号)

> U+003E (GREATER-THAN SIGN)

>U+003E(大于号)

@ U+0040 (COMMERCIAL AT)

@U+0040(商用AT)

Implementation Note: An XMPP-specific method for escaping the foregoing characters (along with U+0020, i.e., ASCII space) has been defined in the JID Escaping specification [XEP-0106].

实现说明:JID转义规范[XEP-0106]中定义了用于转义上述字符(以及U+0020,即ASCII空格)的XMPP特定方法。

3.4. Resourcepart
3.4. 资源部分

The resourcepart of a JID is an optional identifier placed after the domainpart and separated from the latter by the '/' character. A resourcepart can modify either a <localpart@domainpart> address or a mere <domainpart> address. Typically, a resourcepart uniquely identifies a specific connection (e.g., a device or location) or object (e.g., an occupant in a multi-user chatroom [XEP-0045]) belonging to the entity associated with an XMPP localpart at a domain (i.e., <localpart@domainpart/resourcepart>).

JID的resourcepart是一个可选标识符,位于domainpart之后,并用“/”字符与后者隔开。resourcepart可以修改<localpart@domainpart>地址或仅仅是<domainpart>地址。通常,resourcepart唯一标识属于域中与XMPP localpart关联的实体的特定连接(例如,设备或位置)或对象(例如,多用户聊天室[XEP-0045]中的占用者)(即<localpart@domainpart/资源部分>)。

XMPP entities SHOULD consider resourceparts to be opaque strings and SHOULD NOT impute meaning to any given resourcepart. In particular:

XMPP实体应该考虑资源部分是不透明的字符串,并且不应该将含义归咎于任何给定的资源部分。特别地:

o Use of the '/' character as a separator between the domainpart and the resourcepart does not imply that XMPP addresses are hierarchical in the way that, say, HTTP URIs are hierarchical (see [RFC3986] for general discussion); thus, for example, an XMPP address of the form <localpart@domainpart/foo/bar> does not identify a resource "bar" that exists below a resource "foo" in a hierarchy of resources associated with the entity "localpart@domainpart".

o 使用“/”字符作为domainpart和resourcepart之间的分隔符并不意味着XMPP地址的层次结构与HTTP URI的层次结构相同(一般性讨论请参见[RFC3986]);因此,例如,表单的XMPP地址<localpart@domainpart/foo/bar>未标识与实体关联的资源层次结构中资源“foo”下方存在的资源“bar”localpart@domainpart".

o The '@' character is allowed in the resourcepart and is often used in the "handle" shown in XMPP chatrooms [XEP-0045]. For example, the JID <room@chat.example.com/user@host> describes an entity who is an occupant of the room <room@chat.example.com> with a handle of <user@host>. However, chatroom services do not necessarily check such an asserted handle against the occupant's real JID.

o resourcepart中允许使用“@”字符,并且经常在XMPP聊天室[XEP-0045]中显示的“句柄”中使用。例如,JID<room@chat.example.com/user@host>描述作为房间占用者的实体<room@chat.example.com>有点<user@host>. 然而,聊天室服务不一定要对照使用者的真实JID检查这样一个断言的句柄。

The resourcepart of a JID MUST NOT be zero octets in length and MUST NOT be more than 1023 octets in length. This rule is to be enforced after any normalization and mapping of code points as well as encoding of the string as UTF-8.

JID的resourcepart长度不得为零个八位字节,且不得超过1023个八位字节。在对代码点进行任何规范化和映射以及将字符串编码为UTF-8之后,将强制执行此规则。

The resourcepart of a JID is an instance of the OpaqueString profile of the PRECIS FreeformClass, which is specified in [RFC7613]. The rules and considerations provided in that specification MUST be applied to XMPP resourceparts.

JID的resourcepart是PRECIS FreeformClass的不透明字符串配置文件的实例,在[RFC7613]中指定。该规范中提供的规则和注意事项必须应用于XMPP resourceparts。

3.4.1. Applicability to XMPP Extensions
3.4.1. 对XMPP扩展的适用性

In some contexts, it might be appropriate to apply more restrictive rules to the preparation, enforcement, and comparison of XMPP resourceparts. For example, in XMPP Multi-User Chat [XEP-0045] it might be appropriate to apply the rules specified in [PRECIS-Nickname]. However, the application of more restrictive rules is out of scope for resourceparts in general and is properly defined in specifications for the relevant XMPP extensions.

在某些上下文中,对XMPP resourceparts的准备、实施和比较应用更严格的规则可能是合适的。例如,在XMPP多用户聊天[XEP-0045]中,可能适合应用[PRECIS昵称]中指定的规则。然而,更严格的规则的应用通常不在resourceparts的范围内,并且在相关XMPP扩展的规范中得到了正确的定义。

3.5. Examples
3.5. 例子

The following examples illustrate a small number of JIDs that are consistent with the format defined above (note that the characters "<" and ">" are used to delineate the actual JIDs and are not part of the JIDs themselves).

以下示例说明了与上述格式一致的少量JID(请注意,字符“<”和“>”用于描述实际JID,而不是JID本身的一部分)。

   +----------------------------------+-------------------------------+
   | # | JID                          | Notes                         |
   +----------------------------------+-------------------------------+
   | 1 | <juliet@example.com>         | A "bare JID"                  |
   +----------------------------------+-------------------------------+
   | 2 | <juliet@example.com/foo>     | A "full JID"                  |
   +----------------------------------+-------------------------------+
   | 3 | <juliet@example.com/foo bar> | Single space in resourcepart  |
   +----------------------------------+-------------------------------+
   | 4 | <juliet@example.com/foo@bar> | "At" sign in resourcepart     |
   +----------------------------------+-------------------------------+
   | 5 | <foo\20bar@example.com>      | Single space in localpart, as |
   |   |                              | optionally escaped using the  |
   |   |                              | XMPP JID Escaping extension   |
   +----------------------------------+-------------------------------+
   | 6 | <fussball@example.com>       | Another bare JID              |
   +----------------------------------+-------------------------------+
   | 7 | <fu&#xDF;ball@example.com>   | The third character is LATIN  |
   |   |                              | SMALL LETTER SHARP S (U+00DF) |
   +----------------------------------+-------------------------------+
   | 8 | <&#x3C0;@example.com>        | A localpart of GREEK SMALL    |
   |   |                              | LETTER PI (U+03C0)            |
   +----------------------------------+-------------------------------+
   | 9 | <&#x3A3;@example.com/foo>    | A localpart of GREEK CAPITAL  |
   |   |                              | LETTER SIGMA (U+03A3)         |
   +----------------------------------+-------------------------------+
   | 10| <&#x3C3;@example.com/foo>    | A localpart of GREEK SMALL    |
   |   |                              | LETTER SIGMA (U+03C3)         |
   +----------------------------------+-------------------------------+
   | 11| <&#x3C2;@example.com/foo>    | A localpart of GREEK SMALL    |
   |   |                              | LETTER FINAL SIGMA (U+03C2)   |
   +----------------------------------+-------------------------------+
   | 12| <king@example.com/&#x265A>;  | A resourcepart of the Unicode |
   |   |                              | character BLACK CHESS KING    |
   |   |                              | (U+265A)                      |
   +----------------------------------+-------------------------------+
   | 13| <example.com>                | A domainpart                  |
   +----------------------------------+-------------------------------+
   | 14| <example.com/foobar>         | A domainpart and resourcepart |
   +----------------------------------+-------------------------------+
   | 15| <a.example.com/b@example.net>| A domainpart followed by a    |
   |   |                              | resourcepart that contains an |
   |   |                              | "at" sign                     |
   +----------------------------------+-------------------------------+
        
   +----------------------------------+-------------------------------+
   | # | JID                          | Notes                         |
   +----------------------------------+-------------------------------+
   | 1 | <juliet@example.com>         | A "bare JID"                  |
   +----------------------------------+-------------------------------+
   | 2 | <juliet@example.com/foo>     | A "full JID"                  |
   +----------------------------------+-------------------------------+
   | 3 | <juliet@example.com/foo bar> | Single space in resourcepart  |
   +----------------------------------+-------------------------------+
   | 4 | <juliet@example.com/foo@bar> | "At" sign in resourcepart     |
   +----------------------------------+-------------------------------+
   | 5 | <foo\20bar@example.com>      | Single space in localpart, as |
   |   |                              | optionally escaped using the  |
   |   |                              | XMPP JID Escaping extension   |
   +----------------------------------+-------------------------------+
   | 6 | <fussball@example.com>       | Another bare JID              |
   +----------------------------------+-------------------------------+
   | 7 | <fu&#xDF;ball@example.com>   | The third character is LATIN  |
   |   |                              | SMALL LETTER SHARP S (U+00DF) |
   +----------------------------------+-------------------------------+
   | 8 | <&#x3C0;@example.com>        | A localpart of GREEK SMALL    |
   |   |                              | LETTER PI (U+03C0)            |
   +----------------------------------+-------------------------------+
   | 9 | <&#x3A3;@example.com/foo>    | A localpart of GREEK CAPITAL  |
   |   |                              | LETTER SIGMA (U+03A3)         |
   +----------------------------------+-------------------------------+
   | 10| <&#x3C3;@example.com/foo>    | A localpart of GREEK SMALL    |
   |   |                              | LETTER SIGMA (U+03C3)         |
   +----------------------------------+-------------------------------+
   | 11| <&#x3C2;@example.com/foo>    | A localpart of GREEK SMALL    |
   |   |                              | LETTER FINAL SIGMA (U+03C2)   |
   +----------------------------------+-------------------------------+
   | 12| <king@example.com/&#x265A>;  | A resourcepart of the Unicode |
   |   |                              | character BLACK CHESS KING    |
   |   |                              | (U+265A)                      |
   +----------------------------------+-------------------------------+
   | 13| <example.com>                | A domainpart                  |
   +----------------------------------+-------------------------------+
   | 14| <example.com/foobar>         | A domainpart and resourcepart |
   +----------------------------------+-------------------------------+
   | 15| <a.example.com/b@example.net>| A domainpart followed by a    |
   |   |                              | resourcepart that contains an |
   |   |                              | "at" sign                     |
   +----------------------------------+-------------------------------+
        

Table 1: A Sample of Legal JIDs

表1:法律JID样本

Several points are worth noting. Regarding examples 6 and 7: although in German the character esszett (LATIN SMALL LETTER SHARP S (U+00DF)) can mostly be used interchangeably with the two characters "ss", the localparts in these examples are different, and (if desired) a server would need to enforce a registration policy that disallows one of them if the other is registered. Regarding examples 9, 10, and 11: case-mapping of GREEK CAPITAL LETTER SIGMA (U+03A3) to lowercase (i.e., to GREEK SMALL LETTER SIGMA (U+03C3)) during comparison would result in matching the JIDs in examples 9 and 10; however, because the PRECIS mapping rules do not account for the special status of GREEK SMALL LETTER FINAL SIGMA (U+03C2), the JIDs in examples 9 and 11 or examples 10 and 11 would not be matched. Regarding example 12: symbol characters such as BLACK CHESS KING (U+265A) are allowed by the PRECIS FreeformClass and thus can be used in resourceparts. Regarding examples 14 and 15: JIDs consisting of a domainpart and resourcepart are rarely seen in the wild but are allowed according to the XMPP address format. Example 15 illustrates the need for careful extraction of the domainpart as described in Section 3.2.

有几点值得注意。关于示例6和示例7:虽然在德语中,字符esszett(拉丁文小写字母SHARP S(U+00DF))大部分可以与两个字符“ss”互换使用,但这些示例中的LocalPart是不同的,并且(如果需要)服务器需要强制执行一个注册策略,如果其中一个已注册,则不允许其中一个。关于示例9、10和11:在比较期间,希腊大写字母SIGMA(U+03A3)到小写字母(即,到希腊小写字母SIGMA(U+03C3))的大小写映射将导致匹配示例9和10中的JID;然而,由于PRECIS映射规则没有考虑希腊小写字母FINAL SIGMA(U+03C2)的特殊状态,示例9和11或示例10和11中的JID将不匹配。关于示例12:PRECIS FreeformClass允许使用黑棋王(U+265A)等符号字符,因此可以在resourceparts中使用。关于示例14和15:由domainpart和resourcepart组成的JID在野外很少见到,但根据XMPP地址格式允许。示例15说明了如第3.2节所述仔细提取domainpart的必要性。

The following examples illustrate strings that are not JIDs because they violate the format defined above.

下面的示例演示了不是JID的字符串,因为它们违反了上面定义的格式。

   +----------------------------------+-------------------------------+
   | # | Non-JID string               | Notes                         |
   +----------------------------------+-------------------------------+
   | 16| <"juliet"@example.com>       | Quotation marks (U+0022) in   |
   |   |                              | localpart                     |
   +----------------------------------+-------------------------------+
   | 17| <foo bar@example.com>        | Space (U+0020) in localpart   |
   +----------------------------------+-------------------------------+
   | 18| <juliet@example.com/ foo>    | Leading space in resourcepart |
   +----------------------------------+-------------------------------+
   | 19| <@example.com/>              | Zero-length localpart and     |
   |   |                              | resourcepart                  |
   +----------------------------------+-------------------------------+
   | 20| <henry&#x2163;@example.com>  | The sixth character is ROMAN  |
   |   |                              | NUMERAL FOUR (U+2163)         |
   +----------------------------------+-------------------------------+
   | 21| <&#x265A;@example.com>       | A localpart of BLACK CHESS    |
   |   |                              | KING (U+265A)                 |
   +----------------------------------+-------------------------------+
   | 22| <juliet@>                    | A localpart without a         |
   |   |                              | domainpart                    |
   +----------------------------------+-------------------------------+
   | 23| </foobar>                    | A resourcepart without a      |
   |   |                              | domainpart                    |
   +----------------------------------+-------------------------------+
        
   +----------------------------------+-------------------------------+
   | # | Non-JID string               | Notes                         |
   +----------------------------------+-------------------------------+
   | 16| <"juliet"@example.com>       | Quotation marks (U+0022) in   |
   |   |                              | localpart                     |
   +----------------------------------+-------------------------------+
   | 17| <foo bar@example.com>        | Space (U+0020) in localpart   |
   +----------------------------------+-------------------------------+
   | 18| <juliet@example.com/ foo>    | Leading space in resourcepart |
   +----------------------------------+-------------------------------+
   | 19| <@example.com/>              | Zero-length localpart and     |
   |   |                              | resourcepart                  |
   +----------------------------------+-------------------------------+
   | 20| <henry&#x2163;@example.com>  | The sixth character is ROMAN  |
   |   |                              | NUMERAL FOUR (U+2163)         |
   +----------------------------------+-------------------------------+
   | 21| <&#x265A;@example.com>       | A localpart of BLACK CHESS    |
   |   |                              | KING (U+265A)                 |
   +----------------------------------+-------------------------------+
   | 22| <juliet@>                    | A localpart without a         |
   |   |                              | domainpart                    |
   +----------------------------------+-------------------------------+
   | 23| </foobar>                    | A resourcepart without a      |
   |   |                              | domainpart                    |
   +----------------------------------+-------------------------------+
        

Table 2: A Sample of Strings That Violate the JID Rules

表2:违反JID规则的字符串示例

Here again, several points are worth noting. Regarding example 17: even though ASCII space (U+0020) is disallowed in the PRECIS IdentifierClass, it can be escaped to "\20" in XMPP localparts by using the JID Escaping rules defined in [XEP-0106], as illustrated by example 5 in Table 1. Regarding example 20: the Unicode character ROMAN NUMERAL FOUR (U+2163) has a compatibility equivalent of the string formed of LATIN CAPITAL LETTER I (U+0049) and LATIN CAPITAL LETTER V (U+0056), but characters with compatibility equivalents are not allowed in the PRECIS IdentifierClass. Regarding example 21: symbol characters such as BLACK CHESS KING (U+265A) are not allowed in the PRECIS IdentifierClass; however, both of the non-ASCII characters in examples 20 and 21 are allowed in the PRECIS FreeformClass and therefore in the XMPP resourcepart (as illustrated for U+265A by example 12 in Table 1). Regarding examples 22 and 23: the domainpart is required in a JID.

在这里,有几点值得注意。关于示例17:尽管PRECIS IdentifierClass中不允许使用ASCII空格(U+0020),但可以使用[XEP-0106]中定义的JID转义规则将其转义到XMPP localparts中的“\20”,如表1中的示例5所示。关于示例20:Unicode字符罗马数字4(U+2163)具有与由拉丁大写字母I(U+0049)和拉丁大写字母V(U+0056)构成的字符串的兼容性等价物,但PRECIS IdentifierClass中不允许具有兼容性等价物的字符。关于示例21:PRECIS IdentifierClass中不允许使用黑棋王(U+265A)等符号字符;但是,示例20和21中的非ASCII字符在PRECIS FreeformClass中都是允许的,因此在XMPP resourcepart中也是允许的(如表1中示例12针对U+265A所示)。关于示例22和23:在JID中需要domainpart。

4. Enforcement in JIDs and JID Parts
4. JID和JID部分的执行

Enforcement entails applying all of the rules specified in this document. Enforcement of the XMPP address format rules is the responsibility of XMPP servers. Although XMPP clients SHOULD prepare complete JIDs and parts of JIDs in accordance with this document before including them in protocol slots within XML streams, XMPP servers MUST enforce the rules wherever possible and reject stanzas and other XML elements that violate the rules (for stanzas, by returning a <jid-malformed/> error to the sender as described in Section 8.3.3.8 of [RFC6120]).

强制执行需要应用本文件中规定的所有规则。XMPP地址格式规则的实施是XMPP服务器的责任。尽管XMPP客户机在将JID包含在XML流中的协议槽中之前,应该根据本文档准备完整的JID和部分JID,但XMPP服务器必须尽可能执行规则,并拒绝违反规则的节和其他XML元素(对于节,如[RFC6120]第8.3.3.8节所述,通过向发送方返回<jid畸形/>错误)。

Entities that enforce the rules specified in this document are encouraged to be liberal in what they accept by following this procedure:

鼓励执行本文件规定规则的实体通过以下程序自由接受:

1. Where possible, map characters (e.g., through width mapping, additional mapping, special mapping, case mapping, or normalization) and accept the mapped string.

1. 在可能的情况下,映射字符(例如,通过宽度映射、附加映射、特殊映射、大小写映射或规范化)并接受映射字符串。

2. If mapping is not possible (e.g., because a character is disallowed in the FreeformClass), reject the string and return a <jid-malformed/> error.

2. 如果无法进行映射(例如,因为FreeformClass中不允许使用字符),请拒绝该字符串并返回<jid-malformed/>错误。

Enforcement applies to complete JIDs and to parts of JIDs. To facilitate implementation, this document defines the concepts of "JID slot", "localpart slot", and "resourcepart slot" (similar to the concept of a "domain name slot" for IDNA2008 as defined in Section 2.3.2.6 of [RFC5890]):

强制执行适用于完整的JID和部分JID。为便于实施,本文件定义了“JID插槽”、“localpart插槽”和“resourcepart插槽”的概念(类似于[RFC5890]第2.3.2.6节中定义的IDNA2008“域名插槽”的概念):

JID Slot: An XML element or attribute explicitly designated in XMPP or in XMPP extensions for carrying a complete JID.

JID插槽:在XMPP或XMPP扩展中显式指定的XML元素或属性,用于承载完整的JID。

Localpart Slot: An XML element or attribute explicitly designated in XMPP or in XMPP extensions for carrying the localpart of a JID.

Localpart插槽:在XMPP或XMPP扩展中显式指定的XML元素或属性,用于承载JID的Localpart。

Resourcepart Slot: An XML element or attribute explicitly designated in XMPP or in XMPP extensions for carrying the resourcepart of a JID.

Resourcepart插槽:在XMPP或XMPP扩展中显式指定的XML元素或属性,用于承载JID的Resourcepart。

A server is responsible for enforcing the address format rules when receiving protocol elements from clients where the server is expected to handle such elements directly or to use them for purposes of routing a stanza to another domain or delivering a stanza to a local entity; two examples from [RFC6120] are the 'to' attribute on XML stanzas (which is a JID slot used by XMPP servers for routing of outbound stanzas) and the <resource/> child of the <bind/> element (which is a resourcepart slot used by XMPP servers for binding of a

当从客户端接收协议元素时,服务器负责强制执行地址格式规则,其中服务器预期直接处理这些元素,或使用它们将节路由到另一个域或将节传递到本地实体;[RFC6120]中的两个示例是XML节上的“to”属性(这是XMPP服务器用于路由出站节的JID插槽)和<bind/>元素的<resource/>子元素(这是XMPP服务器用于绑定数据的resourcepart插槽)

resource to an account for routing of stanzas between the server and a particular client). An example from [RFC6121] is the 'jid' attribute of the roster <item/> element.

资源,用于在服务器和特定客户端之间路由节)。[RFC6121]中的一个例子是花名册<item/>元素的“jid”属性。

A server is not responsible for enforcing the rules when the protocol elements are intended for communication among other entities, typically within the payload of a stanza that the server is merely routing to another domain or delivering to a local entity. Two examples are the 'initiator' attribute in the Jingle extension [XEP-0166] (which is a JID slot used for client-to-client coordination of multimedia sessions) and the 'nick' attribute in the Multi-User Chat extension [XEP-0045] (which is a resourcepart slot used for administrative purposes in the context of XMPP chatrooms). In such cases, the entities involved SHOULD enforce the rules themselves and not depend on the server to do so, and client implementers need to understand that not enforcing the rules can lead to a degraded user experience or to security vulnerabilities. However, when an add-on service (e.g., a multi-user chat service) handles a stanza directly, it ought to enforce the rules as well, as defined in the relevant specification for that type of service.

当协议元素用于其他实体之间的通信时,服务器不负责实施规则,通常在服务器仅路由到另一个域或传递到本地实体的节的有效负载内。两个示例是叮当扩展[XEP-0166]中的“启动器”属性(用于客户端到客户端协调多媒体会话的JID插槽)和多用户聊天扩展[XEP-0045]中的“尼克”属性(用于XMPP聊天室上下文中的管理目的的resourcepart插槽)。在这种情况下,所涉及的实体应该自己强制执行规则,而不是依赖服务器来执行,客户端实现者需要理解,不强制执行规则可能导致用户体验降级或安全漏洞。但是,当一个附加服务(例如,多用户聊天服务)直接处理一个节时,它也应该强制执行规则,正如该类型服务的相关规范中所定义的那样。

This document does not provide an exhaustive list of JID slots, localpart slots, or resourcepart slots. However, implementers of core XMPP servers are advised to consider as JID slots at least the following elements and attributes when they are handled directly or used for purposes of routing to another domain or delivering to a local entity:

本文档不提供JID插槽、localpart插槽或resourcepart插槽的详尽列表。然而,核心XMPP服务器的实现者被建议在直接处理或用于路由到另一个域或传递到本地实体时考虑JID时隙,至少考虑以下元素和属性:

o The 'from' and 'to' stream attributes and the 'from' and 'to' stanza attributes [RFC6120].

o “从”和“到”流属性以及“从”和“到”节属性[RFC6120]。

o The 'jid' attribute of the roster <item/> element for contact list management [RFC6121].

o 联系人列表管理[RFC6121]的花名册<item/>元素的“jid”属性。

o The 'value' attribute of the <item/> element for Privacy Lists [RFC3921] [XEP-0016] when the value of the 'type' attribute is "jid".

o 当“type”属性的值为“jid”时,隐私列表[RFC3921][XEP-0016]的<item/>元素的“value”属性。

o The 'jid' attribute of the <item/> element for Service Discovery defined in [XEP-0030].

o [XEP-0030]中定义的服务发现的<item/>元素的“jid”属性。

o The <value/> element for Data Forms [XEP-0004] when the 'type' attribute is "jid-single" or "jid-multi".

o 当“type”属性为“jid single”或“jid multi”时,数据表单[XEP-0004]的<value/>元素。

o The 'jid' attribute of the <conference/> element for Bookmark Storage [XEP-0048].

o 书签存储[XEP-0048]的<conference/>元素的“jid”属性。

o The <JABBERID/> of the <vCard/> element for vCard 3.0 [XEP-0054] and the <uri/> child of the <impp/> element for vCard 4.0 [XEP-0292] when the XML character data identifies an XMPP URI [RFC5122].

o 当XML字符数据标识XMPP uri[RFC5122]时,vCard 3.0[XEP-0054]的<vCard/>元素的<JABBERID/>和vCard 4.0[XEP-0292]的<impp/>元素的<uri/>子元素。

o The 'from' attribute of the <delay/> element for Delayed Delivery [XEP-0203].

o 延迟交付的<delay/>元素的“from”属性[XEP-0203]。

o The 'jid' attribute of the <item/> element for the Blocking Command [XEP-0191].

o 阻塞命令[XEP-0191]的<item/>元素的“jid”属性。

o The 'from' and 'to' attributes of the <result/> and <verify/> elements for Server Dialback [XEP-0220].

o 服务器回拨[XEP-0220]的<result/>和<verify/>元素的“from”和“to”属性。

o The 'from' and 'to' attributes of the <iq/>, <message/>, and <presence/> elements for the Jabber Component Protocol [XEP-0114].

o Jabber组件协议[XEP-0114]的<iq/>、<message/>和<presence/>元素的“from”和“to”属性。

Developers of XMPP clients and specialized XMPP add-on services are advised to check the appropriate specifications for JID slots, localpart slots, and resourcepart slots in XMPP protocol extensions such as Service Discovery [XEP-0030], Multi-User Chat [XEP-0045], Publish-Subscribe [XEP-0060], SOCKS5 Bytestreams [XEP-0065], In-Band Registration [XEP-0077], Roster Item Exchange [XEP-0144], and Jingle [XEP-0166].

建议XMPP客户端和专用XMPP附加服务的开发人员检查XMPP协议扩展中JID插槽、localpart插槽和resourcepart插槽的适当规范,如服务发现[XEP-0030]、多用户聊天[XEP-0045]、发布订阅[XEP-0060]、SOCKS5 ByTestStreams[XEP-0065]、带内注册[XEP-0077]、花名册项目交换[XEP-0144]和叮当[XEP-0166]。

5. Internationalization Considerations
5. 国际化考虑

XMPP applications MUST support IDNA2008 for domainparts as described under Section 3.2, the UsernameCaseMapped profile for localparts as described under Section 3.3, and the OpaqueString profile for resourceparts as described under Section 3.4. This enables XMPP addresses to include a wide variety of characters outside the ASCII range. Rules for enforcement of the XMPP address format are provided in [RFC6120] and specifications for various XMPP extensions.

XMPP应用程序必须支持第3.2节所述domainparts的IDNA2008、第3.3节所述localparts的UsernameCaseMapped配置文件以及第3.4节所述resourceparts的OpaqueString配置文件。这使XMPP地址能够包含ASCII范围之外的多种字符。[RFC6120]和各种XMPP扩展规范中提供了XMPP地址格式的实施规则。

Interoperability Note: For backward compatibility, many existing XMPP implementations and deployments support IDNA2003 [RFC3490] for domainparts, and the stringprep [RFC3454] profiles Nodeprep and Resourceprep [RFC3920] for localparts and resourceparts.

互操作性说明:为了向后兼容,许多现有的XMPP实现和部署支持domainparts的IDNA2003[RFC3490],以及localparts和resourceparts的stringprep[RFC3454]配置文件Nodeprep和Resourceprep[RFC3920]。

6. IANA Considerations
6. IANA考虑
6.1. Stringprep Profiles Registry
6.1. Stringprep配置文件注册表

The stringprep specification [RFC3454] did not provide for entries in the "Stringprep Profiles" registry to have any state except "Current" or "Not Current". Because this document obsoletes RFC 6122, which registered the Nodeprep and Resourceprep profiles of stringprep, IANA has marked those profiles as "Not Current" and cited this document as an additional reference.

stringprep规范[RFC3454]未规定“stringprep配置文件”注册表中的条目具有除“当前”或“非当前”之外的任何状态。由于本文件淘汰了注册stringprep的Nodeprep和Resourceprep配置文件的RFC 6122,IANA将这些配置文件标记为“非最新”,并引用本文件作为补充参考。

7. Security Considerations
7. 安全考虑
7.1. Reuse of PRECIS
7.1. PRECIS的再利用

The security considerations described in [RFC7564] apply to the IdentifierClass and FreeformClass base string classes used in this document for XMPP localparts and resourceparts, respectively. The security considerations described in [RFC5890] apply to internationalized domain names, which are used here for XMPP domainparts.

[RFC7564]中描述的安全注意事项分别适用于本文档中用于XMPP localparts和resourceparts的IdentifierClass和FreeformClass基字符串类。[RFC5890]中描述的安全注意事项适用于国际化域名,这里用于XMPP domainparts。

7.2. Reuse of Unicode
7.2. Unicode的重用

The security considerations described in [UTS39] apply to the use of Unicode characters in XMPP addresses.

[UTS39]中描述的安全注意事项适用于在XMPP地址中使用Unicode字符。

7.3. Address Spoofing
7.3. 地址欺骗

There are two forms of address spoofing: forging and mimicking.

地址欺骗有两种形式:伪造和模仿。

7.3.1. Address Forging
7.3.1. 地址伪造

In the context of XMPP technologies, address forging occurs when an entity is able to generate an XML stanza whose 'from' address does not correspond to the account credentials with which the entity authenticated onto the network (or an authorization identity provided during negotiation of SASL authentication [RFC4422] as described in [RFC6120]). For example, address forging occurs if an entity that authenticated as "juliet@im.example.com" is able to send XML stanzas from "nurse@im.example.com" or "romeo@example.net".

在XMPP技术的上下文中,当一个实体能够生成一个XML节,该节的“发件人”地址与该实体在网络上进行身份验证时使用的帐户凭据(或在SASL身份验证[RFC4422]协商期间提供的授权标识[RFC6120]中所述)不一致时,就会发生地址伪造。例如,如果验证为“”的实体发生地址伪造juliet@im.example.com“能够从发送XML节”nurse@im.example.com“或”romeo@example.net".

Address forging is difficult in XMPP systems, given the requirement for sending servers to stamp 'from' addresses and for receiving servers to verify sending domains via server-to-server authentication (see [RFC6120]). However, address forging is possible if:

在XMPP系统中,地址伪造是很困难的,因为发送服务器需要标记“发件人”地址,接收服务器需要通过服务器到服务器身份验证验证发送域(请参见[RFC6120])。但是,如果:

o A poorly implemented server ignores the requirement for stamping the 'from' address. This would enable any entity that authenticated with the server to send stanzas from any localpart@domainpart as long as the domainpart matches the sending domain of the server.

o 实现不佳的服务器忽略了在“发件人”地址上加盖戳记的要求。这将使任何通过服务器身份验证的实体都能够从任何服务器发送节localpart@domainpart只要domainpart与服务器的发送域匹配。

o An actively malicious server generates stanzas on behalf of any registered account at the domain or domains hosted at that server.

o 主动恶意服务器代表该服务器托管的域中的任何注册帐户生成节。

Therefore, an entity outside the security perimeter of a particular server cannot reliably distinguish between JIDs of the form <localpart@domainpart> at that server and thus can authenticate only the domainpart of such JIDs with any level of assurance. This specification does not define methods for discovering or counteracting the kind of poorly implemented or rogue servers just described. However, the end-to-end authentication or signing of XMPP stanzas could help to mitigate this risk, because it would require the rogue server to generate false credentials for signing or encryption of each stanza, in addition to modifying 'from' addresses.

因此,特定服务器安全外围之外的实体无法可靠地区分表单的JID<localpart@domainpart>在该服务器上,因此只能以任何级别的保证对此类JID的域部分进行身份验证。本规范未定义用于发现或抵制上述实现不佳或恶意服务器的方法。但是,XMPP节的端到端身份验证或签名可能有助于降低这一风险,因为除了修改“发件人”地址外,这将要求恶意服务器生成用于每个节的签名或加密的虚假凭据。

7.3.2. Address Mimicking
7.3.2. 地址模拟

Address mimicking occurs when an entity provides legitimate authentication credentials for, and sends XML stanzas from, an account whose JID appears to a human user to be the same as another JID. Because many characters are visually similar, it is relatively easy to mimic JIDs in XMPP systems. As one simple example, the localpart "ju1iet" (using the Arabic numeral one as the third character) might appear the same as the localpart "juliet" (using lowercase "L" as the third character).

当实体为一个帐户提供合法的身份验证凭据,并从该帐户发送XML节时,地址模拟就会发生。在人类用户看来,该帐户的JID与另一个JID相同。因为许多角色在视觉上相似,所以在XMPP系统中模仿JID相对容易。作为一个简单的例子,localpart“ju1iet”(使用阿拉伯数字one作为第三个字符)可能与localpart“juliet”(使用小写字母“L”作为第三个字符)看起来相同。

As explained in [RFC5890], [RFC7564], [UTR36], and [UTS39], there is no straightforward solution to the problem of visually similar characters. Furthermore, IDNA and PRECIS technologies do not attempt to define such a solution. As a result, XMPP domainparts, localparts, and resourceparts could contain such characters, leading to security vulnerabilities such as the following:

如[RFC5890]、[RFC7564]、[UTR36]和[UTS39]中所述,对于视觉上相似的字符问题没有直接的解决方案。此外,IDNA和PRECIS technologies并未试图定义此类解决方案。因此,XMPP domainparts、localparts和resourceparts可能包含此类字符,从而导致以下安全漏洞:

o A domainpart is always employed as one part of an entity's address in XMPP. One common usage is as the address of a server or server-side service, such as a multi-user chat service [XEP-0045]. The security of such services could be compromised based on different interpretations of the internationalized domainpart; for

o 在XMPP中,domainpart始终用作实体地址的一部分。一种常见用法是用作服务器或服务器端服务的地址,例如多用户聊天服务[XEP-0045]。基于对国际化域名部分的不同解释,此类服务的安全性可能会受到损害;对于

example, a user might authorize a malicious entity at a fake server to view the user's presence information, or a user could join chatrooms at a fake multi-user chat service.

例如,用户可能授权假服务器上的恶意实体查看用户的状态信息,或者用户可能加入假多用户聊天服务的聊天室。

o A localpart can be employed as one part of an entity's address in XMPP. One common usage is as the username of an instant messaging user; another is as the name of a multi-user chatroom; and many other kinds of entities could use localparts as part of their addresses. The security of such services could be compromised based on different interpretations of the internationalized localpart; for example, a user entering a single internationalized localpart could access another user's account information, or a user could gain access to a hidden or otherwise restricted chatroom or service.

o localpart可以用作XMPP中实体地址的一部分。一种常见用法是作为即时消息用户的用户名;另一种是作为多用户聊天室的名称;许多其他类型的实体可以使用localparts作为其地址的一部分。基于对国际化本地部分的不同解释,此类服务的安全性可能会受到损害;例如,输入单个国际化localpart的用户可以访问其他用户的帐户信息,或者用户可以访问隐藏的或受限的聊天室或服务。

o A resourcepart can be employed as one part of an entity's address in XMPP. One common usage is as the name for an instant messaging user's connected resource; another is as the nickname of a user in a multi-user chatroom; and many other kinds of entities could use resourceparts as part of their addresses. The security of such services could be compromised based on different interpretations of the internationalized resourcepart; for example, two or more confusable resources could be bound at the same time to the same account (resulting in inconsistent authorization decisions in an XMPP application that uses full JIDs), or a user could send a private message to someone other than the intended recipient in a multi-user chatroom.

o resourcepart可以用作XMPP中实体地址的一部分。一种常见用法是作为即时消息用户连接资源的名称;另一种是多用户聊天室中用户的昵称;许多其他类型的实体可以使用resourceparts作为其地址的一部分。基于对国际化资源部分的不同解释,此类服务的安全性可能会受到损害;例如,两个或多个易混淆的资源可以同时绑定到同一个帐户(导致使用完整JID的XMPP应用程序中的授权决策不一致),或者用户可以向多用户聊天室中的预期收件人以外的其他人发送私人消息。

XMPP services and clients are strongly encouraged to define and implement consistent policies regarding the registration, storage, and presentation of visually similar characters in XMPP systems. In particular, service providers and software implementers are strongly encouraged to apply the policies recommended in [RFC7564].

强烈鼓励XMPP服务和客户机定义和实施有关XMPP系统中视觉相似字符的注册、存储和表示的一致策略。特别是,强烈鼓励服务提供商和软件实施者应用[RFC7564]中建议的政策。

8. Conformance Requirements
8. 一致性要求

This section describes a protocol feature set that summarizes the conformance requirements of this specification (similar feature sets are provided for XMPP in [RFC6120] and [RFC6121]). The summary is purely informational, and the conformance keywords of [RFC2119] as used here are intended only to briefly describe the referenced normative text from the body of this specification. This feature set is appropriate for use in software certification, interoperability testing, and implementation reports. For each feature, this section provides the following information:

本节描述了一个协议功能集,该功能集总结了本规范的一致性要求(在[RFC6120]和[RFC6121]中为XMPP提供了类似的功能集)。摘要仅供参考,此处使用的[RFC2119]合规性关键字仅用于简要描述本规范正文中引用的规范性文本。此功能集适用于软件认证、互操作性测试和实施报告。对于每个功能,本节提供以下信息:

o A human-readable name

o 人名

o An informational description

o 信息性描述

o A reference to the particular section of this document that normatively defines the feature

o 对本文件中规范性定义特征的特定章节的参考

o Whether the feature applies to the client role, the server role, or both (where "N/A" signifies that the feature is not applicable to the specified role)

o 该功能是否适用于客户端角色、服务器角色或两者(其中“N/A”表示该功能不适用于指定角色)

o Whether the feature MUST or SHOULD be implemented, where the capitalized terms are to be understood as described in [RFC2119]

o 是否必须或应该实施该功能,其中大写术语的理解如[RFC2119]所述

The feature set specified here provides a basis for interoperability testing and follows the spirit of a proposal made by Larry Masinter within the IETF's NEWTRK working group in 2005 [INTEROP].

此处指定的功能集为互操作性测试提供了基础,并遵循Larry Masinter在IETF的NEWTRK工作组内于2005年提出的建议的精神[INTEROP]。

Feature: address-domain-length

功能:地址域长度

Description: Ensure that the domainpart of an XMPP address is at least one octet in length and at most 1023 octets in length, and that it conforms to the underlying length limits of the DNS.

描述:确保XMPP地址的domainpart长度至少为一个八位字节,最多为1023个八位字节,并且符合DNS的基本长度限制。

Section: Section 3.2

第3.2节

Roles: Server MUST, client SHOULD.

角色:服务器必须,客户端应该。

Feature: address-domain-prep

功能:地址域准备

Description: Ensure that the domainpart of an XMPP address conforms to IDNA2008, that it contains only NR-LDH labels and U-labels (not A-labels), and that all uppercase and titlecase code points are mapped to their lowercase equivalents.

描述:确保XMPP地址的domainpart符合IDNA2008,它只包含NR-LDH标签和U标签(不是A标签),并且所有大写和titlecase代码点都映射到它们的小写等价物。

Section: Section 3.2

第3.2节

Roles: Server MUST, client SHOULD.

角色:服务器必须,客户端应该。

Feature: address-localpart-length

功能:地址局部部分长度

Description: Ensure that the localpart of an XMPP address is at least one octet in length and at most 1023 octets in length.

描述:确保XMPP地址的localpart的长度至少为一个八位字节,最多为1023个八位字节。

Section: Section 3.3

第节:第3.3节

Roles: Server MUST, client SHOULD.

角色:服务器必须,客户端应该。

Feature: address-localpart-prep

功能:地址localpartprep

Description: Ensure that the localpart of an XMPP address conforms to the UsernameCaseMapped profile of the PRECIS IdentifierClass.

描述:确保XMPP地址的localpart符合PRECIS IdentifierClass的UsernameCaseMapped配置文件。

Section: Section 3.3

第节:第3.3节

Roles: Server MUST, client SHOULD.

角色:服务器必须,客户端应该。

Feature: address-resource-length

功能:地址资源长度

Description: Ensure that the resourcepart of an XMPP address is at least one octet in length and at most 1023 octets in length.

描述:确保XMPP地址的resourcepart长度至少为一个八位字节,最多为1023个八位字节。

Section: Section 3.4

第3.4节

Roles: Server MUST, client SHOULD.

角色:服务器必须,客户端应该。

Feature: address-resource-prep

功能:地址资源准备

Description: Ensure that the resourcepart of an XMPP address conforms to the OpaqueString profile of the PRECIS FreeformClass.

描述:确保XMPP地址的resourcepart符合PRECIS FreeformClass的OpaqueString配置文件。

Section: Section 3.4

第3.4节

Roles: Server MUST, client SHOULD.

角色:服务器必须,客户端应该。

9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, <http://www.rfc-editor.org/info/rfc1034>.

[RFC1034]Mockapetris,P.,“域名-概念和设施”,STD 13,RFC 1034,DOI 10.17487/RFC1034,1987年11月<http://www.rfc-editor.org/info/rfc1034>.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.

[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003, <http://www.rfc-editor.org/info/rfc3629>.

[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,DOI 10.17487/RFC3629,2003年11月<http://www.rfc-editor.org/info/rfc3629>.

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, <http://www.rfc-editor.org/info/rfc3986>.

[RFC3986]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,DOI 10.17487/RFC3986,2005年1月<http://www.rfc-editor.org/info/rfc3986>.

[RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.

[RFC5234]Crocker,D.,Ed.,和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,DOI 10.17487/RFC5234,2008年1月<http://www.rfc-editor.org/info/rfc5234>.

[RFC5890] Klensin, J., "Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework", RFC 5890, DOI 10.17487/RFC5890, August 2010, <http://www.rfc-editor.org/info/rfc5890>.

[RFC5890]Klensin,J.,“应用程序的国际化域名(IDNA):定义和文档框架”,RFC 5890,DOI 10.17487/RFC5890,2010年8月<http://www.rfc-editor.org/info/rfc5890>.

[RFC5892] Faltstrom, P., Ed., "The Unicode Code Points and Internationalized Domain Names for Applications (IDNA)", RFC 5892, DOI 10.17487/RFC5892, August 2010, <http://www.rfc-editor.org/info/rfc5892>.

[RFC5892]Faltstrom,P.,Ed.“Unicode码点和应用程序的国际化域名(IDNA)”,RFC 5892,DOI 10.17487/RFC5892,2010年8月<http://www.rfc-editor.org/info/rfc5892>.

[RFC6120] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, March 2011, <http://www.rfc-editor.org/info/rfc6120>.

[RFC6120]Saint Andre,P.,“可扩展消息和状态协议(XMPP):核心”,RFC 6120,DOI 10.17487/RFC6120,2011年3月<http://www.rfc-editor.org/info/rfc6120>.

[RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in Internationalization in the IETF", BCP 166, RFC 6365, DOI 10.17487/RFC6365, September 2011, <http://www.rfc-editor.org/info/rfc6365>.

[RFC6365]Hoffman,P.和J.Klensin,“IETF国际化中使用的术语”,BCP 166,RFC 6365,DOI 10.17487/RFC6365,2011年9月<http://www.rfc-editor.org/info/rfc6365>.

[RFC6874] Carpenter, B., Cheshire, S., and R. Hinden, "Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers", RFC 6874, DOI 10.17487/RFC6874, February 2013, <http://www.rfc-editor.org/info/rfc6874>.

[RFC6874]Carpenter,B.,Cheshire,S.和R.Hinden,“以地址文本和统一资源标识符表示IPv6区域标识符”,RFC 6874,DOI 10.17487/RFC6874,2013年2月<http://www.rfc-editor.org/info/rfc6874>.

[RFC7564] Saint-Andre, P. and M. Blanchet, "PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols", RFC 7564, DOI 10.17487/RFC7564, May 2015, <http://www.rfc-editor.org/info/rfc7564>.

[RFC7564]Saint Andre,P.和M.Blanchet,“PRECIS框架:应用协议中国际化字符串的准备、实施和比较”,RFC 7564,DOI 10.17487/RFC7564,2015年5月<http://www.rfc-editor.org/info/rfc7564>.

[RFC7613] Saint-Andre, P. and A. Melnikov, "Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords", RFC 7613, DOI 10.17487/RFC7613, August 2015, <http://www.rfc-editor.org/info/rfc7613>.

[RFC7613]Saint Andre,P.和A.Melnikov,“代表用户名和密码的国际化字符串的准备、实施和比较”,RFC 7613,DOI 10.17487/RFC7613,2015年8月<http://www.rfc-editor.org/info/rfc7613>.

[Unicode] The Unicode Consortium, "The Unicode Standard", <http://www.unicode.org/versions/latest/>.

[Unicode]Unicode联盟,“Unicode标准”<http://www.unicode.org/versions/latest/>.

[UTR36] Unicode Technical Report #36, "Unicode Security Considerations", edited by Mark Davis and Michel Suignard, <http://www.unicode.org/reports/tr36/>.

[UTR36]Unicode技术报告#36,“Unicode安全注意事项”,由Mark Davis和Michel Suignard编辑<http://www.unicode.org/reports/tr36/>.

9.2. Informative References
9.2. 资料性引用

[INTEROP] Masinter, L., "Formalizing IETF Interoperability Reporting", Work in Progress, draft-ietf-newtrk-interop-reports-00, October 2005.

[INTEROP]Masinter,L.,“IETF互操作性报告的形式化”,正在进行的工作,草稿-IETF-newtrk-INTEROP-reports-00,2005年10月。

[PRECIS-Nickname] Saint-Andre, P., "Preparation, Enforcement, and Comparison of Internationalized Strings Representing Nicknames", Work in Progress, draft-ietf-precis-nickname-18, June 2015.

[PRECIS昵称]Saint Andre,P.,“代表昵称的国际化字符串的准备、实施和比较”,正在进行的工作,草稿-ietf-PRECIS-昵称-18,2015年6月。

[RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, DOI 10.17487/RFC1123, October 1989, <http://www.rfc-editor.org/info/rfc1123>.

[RFC1123]Braden,R.,Ed.“互联网主机的要求-应用和支持”,STD 3,RFC 1123,DOI 10.17487/RFC1123,1989年10月<http://www.rfc-editor.org/info/rfc1123>.

[RFC1535] Gavron, E., "A Security Problem and Proposed Correction With Widely Deployed DNS Software", RFC 1535, DOI 10.17487/RFC1535, October 1993, <http://www.rfc-editor.org/info/rfc1535>.

[RFC1535]Gavron,E.,“广泛部署DNS软件的安全问题和建议的纠正”,RFC 1535,DOI 10.17487/RFC1535,1993年10月<http://www.rfc-editor.org/info/rfc1535>.

[RFC3454] Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("stringprep")", RFC 3454, DOI 10.17487/RFC3454, December 2002, <http://www.rfc-editor.org/info/rfc3454>.

[RFC3454]Hoffman,P.和M.Blanchet,“国际化字符串的准备(“stringprep”)”,RFC 3454,DOI 10.17487/RFC3454,2002年12月<http://www.rfc-editor.org/info/rfc3454>.

[RFC3490] Faltstrom, P., Hoffman, P., and A. Costello, "Internationalizing Domain Names in Applications (IDNA)", RFC 3490, DOI 10.17487/RFC3490, March 2003, <http://www.rfc-editor.org/info/rfc3490>.

[RFC3490]Faltstrom,P.,Hoffman,P.,和A.Costello,“应用程序中的域名国际化(IDNA)”,RFC 3490,DOI 10.17487/RFC3490,2003年3月<http://www.rfc-editor.org/info/rfc3490>.

[RFC3920] Saint-Andre, P., Ed., "Extensible Messaging and Presence Protocol (XMPP): Core", RFC 3920, DOI 10.17487/RFC3920, October 2004, <http://www.rfc-editor.org/info/rfc3920>.

[RFC3920]Saint Andre,P.,Ed.“可扩展消息和状态协议(XMPP):核心”,RFC 3920,DOI 10.17487/RFC3920,2004年10月<http://www.rfc-editor.org/info/rfc3920>.

[RFC3921] Saint-Andre, P., Ed., "Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence", RFC 3921, DOI 10.17487/RFC3921, October 2004, <http://www.rfc-editor.org/info/rfc3921>.

[RFC3921]Saint Andre,P.,Ed.,“可扩展消息和状态协议(XMPP):即时消息和状态”,RFC 3921,DOI 10.17487/RFC3921,2004年10月<http://www.rfc-editor.org/info/rfc3921>.

[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, DOI 10.17487/RFC3987, January 2005, <http://www.rfc-editor.org/info/rfc3987>.

[RFC3987]Duerst,M.和M.Suignard,“国际化资源标识符(IRIs)”,RFC 3987,DOI 10.17487/RFC3987,2005年1月<http://www.rfc-editor.org/info/rfc3987>.

[RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names and Passwords", RFC 4013, DOI 10.17487/RFC4013, February 2005, <http://www.rfc-editor.org/info/rfc4013>.

[RFC4013]Zeilenga,K.,“SASLprep:用户名和密码的Stringprep配置文件”,RFC 4013,DOI 10.17487/RFC4013,2005年2月<http://www.rfc-editor.org/info/rfc4013>.

[RFC4422] Melnikov, A., Ed., and K. Zeilenga, Ed., "Simple Authentication and Security Layer (SASL)", RFC 4422, DOI 10.17487/RFC4422, June 2006, <http://www.rfc-editor.org/info/rfc4422>.

[RFC4422]Melnikov,A.,Ed.,和K.Zeilenga,Ed.,“简单身份验证和安全层(SASL)”,RFC 4422,DOI 10.17487/RFC4422,2006年6月<http://www.rfc-editor.org/info/rfc4422>.

[RFC5122] Saint-Andre, P., "Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)", RFC 5122, DOI 10.17487/RFC5122, February 2008, <http://www.rfc-editor.org/info/rfc5122>.

[RFC5122]Saint Andre,P.,“可扩展消息和状态协议(XMPP)的国际化资源标识符(IRI)和统一资源标识符(URI)”,RFC 5122,DOI 10.17487/RFC5122,2008年2月<http://www.rfc-editor.org/info/rfc5122>.

[RFC5895] Resnick, P. and P. Hoffman, "Mapping Characters for Internationalized Domain Names in Applications (IDNA) 2008", RFC 5895, DOI 10.17487/RFC5895, September 2010, <http://www.rfc-editor.org/info/rfc5895>.

[RFC5895]Resnick,P.和P.Hoffman,“应用程序中国际化域名的映射字符(IDNA)2008”,RFC 5895,DOI 10.17487/RFC5895,2010年9月<http://www.rfc-editor.org/info/rfc5895>.

[RFC6121] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence", RFC 6121, DOI 10.17487/RFC6121, March 2011, <http://www.rfc-editor.org/info/rfc6121>.

[RFC6121]Saint Andre,P.,“可扩展消息和状态协议(XMPP):即时消息和状态”,RFC 6121DOI 10.17487/RFC6121,2011年3月<http://www.rfc-editor.org/info/rfc6121>.

[RFC6122] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Address Format", RFC 6122, DOI 10.17487/RFC6122, March 2011, <http://www.rfc-editor.org/info/rfc6122>.

[RFC6122]Saint Andre,P.,“可扩展消息和状态协议(XMPP):地址格式”,RFC 6122,DOI 10.17487/RFC6122,2011年3月<http://www.rfc-editor.org/info/rfc6122>.

[RFC6885] Blanchet, M. and A. Sullivan, "Stringprep Revision and Problem Statement for the Preparation and Comparison of Internationalized Strings (PRECIS)", RFC 6885, DOI 10.17487/RFC6885, March 2013, <http://www.rfc-editor.org/info/rfc6885>.

[RFC6885]Blanchet,M.和A.Sullivan,“编制和比较国际化字符串(PRECIS)的Stringprep修订和问题声明”,RFC 6885,DOI 10.17487/RFC6885,2013年3月<http://www.rfc-editor.org/info/rfc6885>.

[UTS39] Unicode Technical Standard #39, "Unicode Security Mechanisms", edited by Mark Davis and Michel Suignard, <http://unicode.org/reports/tr39/>.

[UTS39]Unicode技术标准#39,“Unicode安全机制”,由Mark Davis和Michel Suignard编辑<http://unicode.org/reports/tr39/>.

[XEP-0004] Eatmon, R., Hildebrand, J., Miller, J., Muldowney, T., and P. Saint-Andre, "Data Forms", XSF XEP 0004, August 2007, <http://xmpp.org/extensions/xep-0004.html>.

[XEP-0004]Eatmon,R.,Hildebrand,J.,Miller,J.,Muldowney,T.,和P.Saint Andre,“数据表格”,XSF XEP 0004,2007年8月<http://xmpp.org/extensions/xep-0004.html>.

[XEP-0016] Millard, P. and P. Saint-Andre, "Privacy Lists", XSF XEP 0016, February 2007, <http://xmpp.org/extensions/xep-0016.html>.

[XEP-0016]Millard,P.和P.Saint Andre,“隐私列表”,XSF XEP 0016,2007年2月<http://xmpp.org/extensions/xep-0016.html>.

[XEP-0029] Kaes, C., "Definition of Jabber Identifiers (JIDs)", XSF XEP 0029, October 2003, <http://xmpp.org/extensions/xep-0029.html>.

[XEP-0029]Kaes,C.“Jabber标识符(JID)的定义”,XSF XEP 00292003年10月<http://xmpp.org/extensions/xep-0029.html>.

[XEP-0030] Hildebrand, J., Millard, P., Eatmon, R., and P. Saint-Andre, "Service Discovery", XSF XEP 0030, June 2008, <http://xmpp.org/extensions/xep-0030.html>.

[XEP-0030]Hildebrand,J.,Millard,P.,Eatmon,R.,和P.Saint Andre,“服务发现”,XSF XEP 0030,2008年6月<http://xmpp.org/extensions/xep-0030.html>.

[XEP-0045] Saint-Andre, P., "Multi-User Chat", XSF XEP 0045, February 2012, <http://xmpp.org/extensions/xep-0045.html>.

[XEP-0045]圣安德烈,P.,“多用户聊天”,XSF XEP 00452012年2月<http://xmpp.org/extensions/xep-0045.html>.

[XEP-0048] Blackman, R., Millard, P., and P. Saint-Andre, "Bookmarks", XSF XEP 0048, November 2007, <http://xmpp.org/extensions/xep-0048.html>.

[XEP-0048]R.布莱克曼、P.米拉德和P.圣安德烈,“书签”,XSF XEP 0048,2007年11月<http://xmpp.org/extensions/xep-0048.html>.

[XEP-0054] Saint-Andre, P., "vcard-temp", XSF XEP 0054, July 2008, <http://xmpp.org/extensions/xep-0054.html>.

[XEP-0054]圣安德烈,P.,“vcard temp”,XSF XEP 0054,2008年7月<http://xmpp.org/extensions/xep-0054.html>.

[XEP-0060] Millard, P., Saint-Andre, P., and R. Meijer, "Publish-Subscribe", XSF XEP 0060, July 2010, <http://xmpp.org/extensions/xep-0060.html>.

[XEP-0060]Millard,P.,Saint Andre,P.,和R.Meijer,“发布-订阅”,XSF XEP 0060,2010年7月<http://xmpp.org/extensions/xep-0060.html>.

[XEP-0065] Smith, D., Miller, M., Saint-Andre, P., and J. Karneges, "SOCKS5 Bytestreams", XSF XEP 0065, April 2011, <http://xmpp.org/extensions/xep-0065.html>.

[XEP-0065]Smith,D.,Miller,M.,Saint Andre,P.,和J.Karneges,“SOCKS5 ByTestStreams”,XSF XEP 0065,2011年4月<http://xmpp.org/extensions/xep-0065.html>.

[XEP-0077] Saint-Andre, P., "In-Band Registration", XSF XEP 0077, January 2012, <http://xmpp.org/extensions/xep-0077.html>.

[XEP-0077]圣安德烈,P.,“带内注册”,XSF XEP 0077,2012年1月<http://xmpp.org/extensions/xep-0077.html>.

[XEP-0106] Hildebrand, J. and P. Saint-Andre, "JID Escaping", XSF XEP 0106, June 2007, <http://xmpp.org/extensions/xep-0106.html>.

[XEP-0106]Hildebrand,J.和P.Saint Andre,“JID逃逸”,XSF XEP 0106,2007年6月<http://xmpp.org/extensions/xep-0106.html>.

[XEP-0114] Saint-Andre, P., "Jabber Component Protocol", XSF XEP 0114, January 2012, <http://xmpp.org/extensions/xep-0114.html>.

[XEP-0114]圣安德烈,P.,“Jabber组件协议”,XSF XEP 0114,2012年1月<http://xmpp.org/extensions/xep-0114.html>.

[XEP-0144] Saint-Andre, P., "Roster Item Exchange", XSF XEP 0144, August 2005, <http://xmpp.org/extensions/xep-0144.html>.

[XEP-0144]圣安德烈,P.,“名册项目交换”,XSF XEP 0144,2005年8月<http://xmpp.org/extensions/xep-0144.html>.

[XEP-0166] Ludwig, S., Beda, J., Saint-Andre, P., McQueen, R., Egan, S., and J. Hildebrand, "Jingle", XSF XEP 0166, December 2009, <http://xmpp.org/extensions/xep-0166.html>.

[XEP-0166]路德维希,S.,贝达,J.,圣安德烈,P.,麦昆,R.,伊根,S.,和J.希尔德布兰德,“叮当声”,XSF XEP 0166,2009年12月<http://xmpp.org/extensions/xep-0166.html>.

[XEP-0191] Saint-Andre, P., "Blocking Command", XSF XEP 0191, July 2012, <http://xmpp.org/extensions/xep-0191.html>.

[XEP-0191]圣安德烈,P.,“封锁命令”,XSF XEP 01912012年7月<http://xmpp.org/extensions/xep-0191.html>.

[XEP-0203] Saint-Andre, P., "Delayed Delivery", XSF XEP 0203, September 2009, <http://xmpp.org/extensions/xep-0203.html>.

[XEP-0203]圣安德烈,P.,“延迟交付”,XSF XEP 02032009年9月<http://xmpp.org/extensions/xep-0203.html>.

[XEP-0220] Miller, J., Saint-Andre, P., and P. Hancke, "Server Dialback", XSF XEP 0220, August 2014, <http://xmpp.org/extensions/xep-0220.html>.

[XEP-0220]Miller,J.,Saint Andre,P.,和P.Hancke,“服务器拨号”,XSF XEP 0220,2014年8月<http://xmpp.org/extensions/xep-0220.html>.

[XEP-0292] Saint-Andre, P. and S. Mizzi, "vCard4 Over XMPP", XSF XEP 0292, September 2013, <http://xmpp.org/extensions/xep-0292.html>.

[XEP-0292]Saint Andre,P.和S.Mizzi,“XMPP上的vCard4”,XSF XEP 0292,2013年9月<http://xmpp.org/extensions/xep-0292.html>.

[XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", World Wide Web Consortium Recommendation REC-xml-20081126, November 2008, <http://www.w3.org/TR/2008/REC-xml-20081126>.

[XML]Bray,T.,Paoli,J.,Sperberg McQueen,C.,Maler,E.,和F.Yergeau,“可扩展标记语言(XML)1.0(第五版)”,万维网联盟建议REC-XML-20081126,2008年11月<http://www.w3.org/TR/2008/REC-xml-20081126>.

Appendix A. Differences from RFC 6122
附录A.与RFC 6122的差异

Based on consensus derived from working group discussion, implementation and deployment experience, and formal interoperability testing, the following substantive modifications were made from RFC 6122.

基于从工作组讨论、实施和部署经验以及正式互操作性测试中得出的共识,RFC 6122进行了以下实质性修改。

o Changed domainpart preparation to use IDNA2008 (instead of IDNA2003).

o 将domainpart准备更改为使用IDNA2008(而不是IDNA2003)。

o Changed localpart preparation to use the UsernameCaseMapped profile of the PRECIS IdentifierClass (instead of the Nodeprep profile of stringprep).

o 将localpart准备更改为使用PRECIS IdentifierClass的UsernameCaseMapped配置文件(而不是stringprep的Nodeprep配置文件)。

o Changed resourcepart preparation to use the OpaqueString profile of the PRECIS FreeformClass (instead of the Resourceprep profile of stringprep).

o 将resourcepart准备更改为使用PRECIS FreeformClass的不透明字符串配置文件(而不是stringprep的Resourceprep配置文件)。

o Specified that internationalized labels within domainparts must be U-labels (instead of "should be" U-labels).

o 指定domainparts中的国际化标签必须是U标签(而不是“应该是”U标签)。

o Specified that fullwidth and halfwidth characters must be mapped to their decomposition mappings (previously handled through the use of Normalization Form KC).

o 指定必须将全宽和半宽字符映射到其分解映射(以前通过使用规范化表单KC进行处理)。

o Specified the use of Unicode Normalization Form C (instead of Unicode Normalization Form KC as specified in the Nodeprep and Resourceprep profiles of stringprep).

o 指定使用Unicode规范化表单C(而不是stringprep的Nodeprep和Resourceprep配置文件中指定的Unicode规范化表单KC)。

o Specified that servers must enforce the address-formatting rules.

o 指定服务器必须强制执行地址格式化规则。

Acknowledgements

致谢

Thanks to Ben Campbell, Dave Cridland, Miguel Garcia, Joe Hildebrand, Jonathan Lennox, Matt Miller, Florian Schmaus, Sam Whited, and Florian Zeitz for their input during working group discussion.

感谢Ben Campbell、Dave Cridland、Miguel Garcia、Joe Hildebrand、Jonathan Lennox、Matt Miller、Florian Schmaus、Sam Whited和Florian Zeitz在工作组讨论期间提供的意见。

Dan Romascanu completed a helpful review on behalf of the General Area Review Team.

Dan Romascanu代表一般区域审查小组完成了一项有用的审查。

During IESG review, Alissa Cooper, Brian Haberman, and Barry Leiba provided comments that led to improvements in the document.

在IESG审查期间,Alissa Cooper、Brian Haberman和Barry Leiba提供了意见,这些意见导致了文件的改进。

Thanks also to Matt Miller in his role as document shepherd, Joe Hildebrand in his role as working group chair, and Ben Campbell in his role as sponsoring Area Director.

还要感谢马特·米勒(Matt Miller)担任文件管理员,乔·希尔德布兰德(Joe Hildebrand)担任工作组主席,本·坎贝尔(Ben Campbell)担任赞助区域总监。

The author wishes to acknowledge Cisco Systems, Inc., for employing him during his work on earlier draft versions of this document.

作者希望感谢Cisco Systems,Inc.在编写本文件早期草稿期间雇用了他。

Author's Address

作者地址

Peter Saint-Andre &yet

彼得·圣安德烈&还没有

   Email: peter@andyet.com
   URI:   https://andyet.com/
        
   Email: peter@andyet.com
   URI:   https://andyet.com/