No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0029.xml 7.0KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM "xep.ent">
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Definition of Jabber Identifiers (JIDs)</title>
  10. <abstract>Note well: this document was superseded by RFC 3920, which in turn has been superseded by RFC 6122. This document defines the exact nature of a Jabber Identifier (JID).</abstract>
  12. <number>0029</number>
  13. <status>Retracted</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies/>
  17. <supersedes/>
  18. <supersededby><spec>RFC 6122</spec></supersededby>
  19. <shortname>N/A</shortname>
  20. <author>
  21. <firstname>Craig</firstname>
  22. <surname>Kaes</surname>
  23. <email></email>
  24. <jid></jid>
  25. </author>
  26. <revision>
  27. <version>1.1</version>
  28. <date>2003-10-03</date>
  29. <initials>psa</initials>
  30. <remark>Changed status to Retracted. This document is superseded by the XMPP Core memo defined by the IETF's XMPP Working Group.</remark>
  31. </revision>
  32. <revision>
  33. <version>1.0</version>
  34. <date>2002-05-15</date>
  35. <initials>psa</initials>
  36. <remark>Changed status to Draft.</remark>
  37. </revision>
  38. <revision>
  39. <version>0.2</version>
  40. <date>2002-05-01</date>
  41. <initials>cak</initials>
  42. <remark>
  43. Added info on restricting resource identifier length; standardized nomenclature.
  44. </remark>
  45. </revision>
  46. <revision>
  47. <version>0.1</version>
  48. <date>2002-04-24</date>
  49. <initials>cak</initials>
  50. <remark>Initial version</remark>
  51. </revision>
  52. </header>
  53. <section1 topic='Introduction'>
  54. <p class='box'>Note: This document was superseded by &rfc3920;, which in turn has been superseded by &rfc6122;.</p>
  55. <p>Jabber Identifiers (JIDs) uniquely identify individual entities in the Jabber network. To date, their syntax has been defined by convention, existing implementations, and available documentation. As it exists, certain characters that are allowed in JIDs cause ambiguity, and the lack of a size limit on resources defies database schemas and causes some trivial JID operations to require dynamic memory allocation. This document seeks to both define and improve the existing JID syntax. This document will not explain the general usage or nature of JIDs, instead focusing on syntax.</p>
  56. </section1>
  57. <section1 topic='JIDs'>
  58. <p>JIDs consist of three main parts:</p>
  59. <ol>
  60. <li>The node identifier (optional)</li>
  61. <li>The domain identifier (required)</li>
  62. <li>The resource identifier (optional)</li>
  63. </ol>
  64. <p>JIDs are encoded UTF-8. A grammar will be presented first, followed by specific clarifying and further restricting remarks.</p>
  65. <section2 topic='Grammar'>
  66. <code>
  67. &lt;JID&gt; ::= [&lt;node&gt;"@"]&lt;domain&gt;["/"&lt;resource&gt;]
  68. &lt;node&gt; ::= &lt;conforming-char&gt;[&lt;conforming-char&gt;]*
  69. &lt;domain&gt; ::= &lt;hname&gt;["."&lt;hname&gt;]*
  70. &lt;resource&gt; ::= &lt;any-char&gt;[&lt;any-char&gt;]*
  71. &lt;hname&gt; ::= &lt;let&gt;|&lt;dig&gt;[[&lt;let&gt;|&lt;dig&gt;|"-"]*&lt;let&gt;|&lt;dig&gt;]
  72. &lt;let&gt; ::= [a-z] | [A-Z]
  73. &lt;dig&gt; ::= [0-9]
  74. &lt;conforming-char&gt; ::= #x21 | [#x23-#x25] | [#x28-#x2E] |
  75. [#x30-#x39] | #x3B | #x3D | #x3F |
  76. [#x41-#x7E] | [#x80-#xD7FF] |
  77. [#xE000-#xFFFD] | [#x10000-#x10FFFF]
  78. &lt;any-char&gt; ::= [#x20-#xD7FF] | [#xE000-#xFFFD] |
  79. [#x10000-#x10FFFF]
  80. </code>
  81. </section2>
  82. <section2 topic='Domain Identifier'>
  83. <p>A domain identifier is a standard DNS hostname as specified in RFC952 <note><link url=''></link></note> and RFC1123. <note><link url=''></link></note> It is case-insensitive 7-bit ASCII and limited to 255 bytes. It is the only required component of a JID.</p>
  84. </section2>
  85. <section2 topic='Node Identifier'>
  86. <p>Node identifiers are restricted to 256 bytes, They may contain any Unicode character higher than #x20 with the exception of the following:</p>
  87. <ol>
  88. <li>#x22 (")</li>
  89. <li>#x26 (&amp;)</li>
  90. <li>#x27 (')</li>
  91. <li>#x2F (/)</li>
  92. <li>#x3A (:)</li>
  93. <li>#x3C (&lt;)</li>
  94. <li>#x3E (&gt;)</li>
  95. <li>#x40 (@)</li>
  96. <li>#x7F (del)</li>
  97. <li>#xFFFE (BOM)</li>
  98. <li>#xFFFF (BOM)</li>
  99. </ol>
  100. <p>Case is preserved, but comparisons will be made in case-normalized canonical form.</p>
  101. </section2>
  102. <section2 topic='Resource Identifier'>
  103. <p>Resources identifiers are case-sensitive and are limited to 256 bytes. They may include any Unicode character greater than #x20, except #xFFFE and #xFFFF.</p>
  104. </section2>
  105. <section2 topic='Limited Resources'>
  106. <p>To date, resource identifiers have not had a fixed limit on their length. This document seeks to limit it to 256 bytes for the following reasons:</p>
  107. <ol>
  108. <li>In order to perform JID manipulations safely, one cannot use stack space if there is no limit. This forces temporary calculations onto the heap which is unnecessarily costly.</li>
  109. <li>As a fixed length character field, a resource identifier is more easily stored in, searched on, and retrieved from a database. If an end user may store an encyclopedia's worth of information in their resource, then the only way it can be stored without truncating it is to store it as a large object (BLOB or CLOB). Depending on the database used, that makes it either grossly inefficient or impossible to search on.</li>
  110. <li>There exist denial of service attacks stemming from an unlimited resource length.</li>
  111. </ol>
  112. <p>In a worst-case encoding, such as Han ideographs, 256 bytes will provide enough storage space for 64 character points. This provides a lower bound on the number of characters a node may have in its resource.</p>
  113. <p>Specifying limits in terms of bytes instead of characters is somewhat arbitrary once a lower bound for characters is established. This document proposes limits in terms of bytes mainly because doing so results in parsing efficiency; specifically, an implementation does not have to un-encode the UTF-8 string for the sole purpose of further restricting character sets that require fewer than four bytes per character point. It is sufficient to have a lower bound on characters and an upper bound on bytes.</p>
  114. </section2>
  115. </section1>
  116. </xep>