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-0172.xml 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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>User Nickname</title>
  10. <abstract>This specification defines a protocol for communicating user nicknames, either in XMPP presence subscription requests or in XMPP messages.</abstract>
  11. &LEGALNOTICE;
  12. <number>0172</number>
  13. <status>Draft</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>nick</shortname>
  23. <schemaloc>
  24. <url>http://www.xmpp.org/schemas/nick.xsd</url>
  25. </schemaloc>
  26. &stpeter;
  27. &val;
  28. <revision>
  29. <version>1.1</version>
  30. <date>2012-03-21</date>
  31. <initials>psa</initials>
  32. <remark><p>Based on implementation and deployment experience, discouraged use in Multi-User Chat; also removed text about Waiting Lists because of lack of deployment.</p></remark>
  33. </revision>
  34. <revision>
  35. <version>1.0</version>
  36. <date>2006-06-05</date>
  37. <initials>psa</initials>
  38. <remark><p>Per a vote of the Jabber Council, advanced status to Draft.</p></remark>
  39. </revision>
  40. <revision>
  41. <version>0.9</version>
  42. <date>2006-05-10</date>
  43. <initials>psa</initials>
  44. <remark><p>Added pubsub examples.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>0.8</version>
  48. <date>2006-04-28</date>
  49. <initials>psa</initials>
  50. <remark><p>Clarified terminology; explicitly mentioned that nicknames must not be included in presence broadcasts (only subscription requests); added implementation note about display names.</p></remark>
  51. </revision>
  52. <revision>
  53. <version>0.7</version>
  54. <date>2006-04-21</date>
  55. <initials>psa/vm</initials>
  56. <remark><p>Added further detail to waitlist example; added schema.</p></remark>
  57. </revision>
  58. <revision>
  59. <version>0.6</version>
  60. <date>2006-03-27</date>
  61. <initials>psa</initials>
  62. <remark><p>Specified security considerations.</p></remark>
  63. </revision>
  64. <revision>
  65. <version>0.5</version>
  66. <date>2006-03-22</date>
  67. <initials>psa</initials>
  68. <remark><p>Fixed MUC invite example; clarified that nick refers to entity associated with nearest ancestor element that specifies a sender; added waitlist example.</p></remark>
  69. </revision>
  70. <revision>
  71. <version>0.4</version>
  72. <date>2006-03-20</date>
  73. <initials>psa</initials>
  74. <remark><p>To reflect use of dedicated namespace, (1) changed document type from Informational to Standards Track and (2) updated XMPP Registrar Considerations.</p></remark>
  75. </revision>
  76. <revision>
  77. <version>0.3</version>
  78. <date>2006-03-16</date>
  79. <initials>psa/vm</initials>
  80. <remark><p>Modified to use dedicated namespace; added example for multi-user chat invitations.</p></remark>
  81. </revision>
  82. <revision>
  83. <version>0.2</version>
  84. <date>2006-03-08</date>
  85. <initials>psa</initials>
  86. <remark><p>Added wrapper element from XEP-0154.</p></remark>
  87. </revision>
  88. <revision>
  89. <version>0.1</version>
  90. <date>2006-01-24</date>
  91. <initials>psa</initials>
  92. <remark><p>Initial version.</p></remark>
  93. </revision>
  94. <revision>
  95. <version>0.0.3</version>
  96. <date>2006-01-22</date>
  97. <initials>psa/vm</initials>
  98. <remark><p>Added message exchange use case.</p></remark>
  99. </revision>
  100. <revision>
  101. <version>0.0.2</version>
  102. <date>2006-01-18</date>
  103. <initials>psa/vm</initials>
  104. <remark><p>Added MUC and nickname management use cases; specified profile data syntax.</p></remark>
  105. </revision>
  106. <revision>
  107. <version>0.0.1</version>
  108. <date>2005-09-12</date>
  109. <initials>psa</initials>
  110. <remark><p>Initial version.</p></remark>
  111. </revision>
  112. </header>
  113. <section1 topic='Introduction' anchor='intro'>
  114. <p>A nickname is a global, memorable (but not necessarily unique) friendly or informal name chosen by the owner of a bare JID &LOCALBARE; for the purpose of associating a distinctive mapping between the person's unique JID and non-unique nickname. While nicknames have been a common feature of instant messaging systems for many years, they have not always featured prominently in Jabber/XMPP IM systems (e.g., nicknames were not specified in &rfc3921; or &rfc6121;). However, there are several reasons why nicknames are important:</p>
  115. <ul>
  116. <li>Users like them.</li>
  117. <li>They are easier to remember than JIDs.</li>
  118. <li>They can be used to help prevent mimicking of JIDs (see &xep0165;).</li>
  119. </ul>
  120. <p>This document defines best practices that enable IM users to advertise their preferred nicknames over Jabber/XMPP instant messaging networks.</p>
  121. </section1>
  122. <section1 topic='Terminology' anchor='terms'>
  123. <p>This proposal draws a distinction between the following kinds of names, where a JID is an innate feature of a user's identity on an XMPP system, a nickname is asserted by a user, and a handle is assigned by a contact to a user.</p>
  124. <table caption='JIDs, Nicknames, and Handles'>
  125. <tr>
  126. <th>Name</th>
  127. <th>Definition</th>
  128. </tr>
  129. <tr>
  130. <td>Jabber ID (JID)</td>
  131. <td>A global and unique XMPP identifier registered to a particular user, of the form &LOCALBARE;; represented in the 'from' attribute of XML stanzas sent by that user, the 'jid' attribute of items associated with that user in a contact's roster, etc.</td>
  132. </tr>
  133. <tr>
  134. <td>Nickname</td>
  135. <td>A global and memorable (but not necessarily unique) friendly name or informal name asserted by an IM user. Typically, a nickname is different from a familiar name, such as "Chuck" for "Charles", "Bill" for "William", "Pete" for "Peter", or "Dave" for "David"; instead, a nickname is even less formal, such as "stpeter" or "dizzyd". A nickname is thus typically different from a "display name" as that term is understood in SMTP (see &rfc2821;) and SIP (see &rfc3261;).</td>
  136. </tr>
  137. <tr>
  138. <td>Handle</td>
  139. <td>A private, unique, and memorable "petname" or "alias" assigned by a contact to a user; represented in the 'name' attribute of the item associated with that user's JID in the contact's roster. <note>In RFC 3921, the name here called a "handle" was described as an "alias"; RFC 6121; was modified to use the term "handle" instead.</note></td>
  140. </tr>
  141. </table>
  142. </section1>
  143. <section1 topic='Format' anchor='format'>
  144. <p>A nickname MUST be encapsulated as the XML character data of a &lt;nick/&gt; element qualified by the 'http://jabber.org/protocol/nick' namespace. Here is an example:</p>
  145. <example caption='A Nickname'><![CDATA[
  146. <nick xmlns='http://jabber.org/protocol/nick'>Ishmael</nick>
  147. ]]></example>
  148. <p>A nickname of this form has the same semantic meaning as the following data fields:</p>
  149. <ul>
  150. <li>The "NICKNAME" field specified in &xep0054;.</li>
  151. <li>The "nickname" field specified in &xep0154;.</li>
  152. <li>The "nickname" field specified in &xep0077;.</li>
  153. <li>The "nick" field specified in &foaf;.</li>
  154. <li>The "Alias" field specified in the <cite>Extensible Name and Address Language</cite> <note>See &lt;<link url='http://xml.coverpages.org/xnal.html'>http://xml.coverpages.org/xnal.html</link>&gt;.</note> developed by &OASIS;.</li>
  155. </ul>
  156. <p>The entity to which the &lt;nick/&gt; refers is the from address (no matter how encapsulated in XML) of the nearest ancestor element that specifies the sender (which might be a parent or grandparent element, e.g. the 'from' attribute of an &IQ; stanza).</p>
  157. </section1>
  158. <section1 topic='Use Cases' anchor='usecases'>
  159. <p>In general, a user SHOULD include his or her nickname when establishing initial communication with a contact or group of contacts (i.e., the user has never been in communication with and does not have a prior relationship with the contact or group of contacts). Appropriate use cases therefore include:</p>
  160. <ul>
  161. <li>Presence subscription requests</li>
  162. <li>Message exchange</li>
  163. <li>Multi-user chat</li>
  164. <li>Waiting lists</li>
  165. </ul>
  166. <section2 topic='Presence Subscription Requests' anchor='subscription'>
  167. <p>As defined in <cite>RFC 6121</cite>, a presence subscription request contains only the JID of the sender:</p>
  168. <example caption='A Basic Subscription Request'><![CDATA[
  169. <presence from='narrator@moby-dick.lit' to='starbuck@moby-dick.lit' type='subscribe'/>
  170. ]]></example>
  171. <p>Naturally, based on the JID of the sender, it is possible for the client to pull information about the sender from a persistent data store such as an LDAP database, &xep0054; node, or <cite>XEP-0154</cite> store. However, to speed interactions, this document recommends that when a client sends a subscription request, it SHOULD include the preferred nickname of the sender:</p>
  172. <example caption='Including Nickname with Subscription Request'><![CDATA[
  173. <presence from='narrator@moby-dick.lit' to='starbuck@moby-dick.lit' type='subscribe'>
  174. <nick xmlns='http://jabber.org/protocol/nick'>Ishmael</nick>
  175. </presence>
  176. ]]></example>
  177. <p>Note: This document recommends sending the nickname only in presence subscription requests; the nickname MUST NOT be included in presence broadcasts (i.e., &PRESENCE; stanzas with no 'type' attribute or of type "unavailable").</p>
  178. </section2>
  179. <section2 topic='Message Exchange' anchor='message'>
  180. <p>When a user begins to chat with a contact but the two parties have no pre-existing relationship or prior communications (e.g., no presence subscription or previous message exchange), the user SHOULD include the nickname with the first message sent to the contact:</p>
  181. <example caption='Including Nickname with First Message'><![CDATA[
  182. <message from='narrator@moby-dick.lit/pda' to='starbuck@moby-dick.lit' type='chat'>
  183. <body>Call me Ishmael</body>
  184. <nick xmlns='http://jabber.org/protocol/nick'>Ishmael</nick>
  185. </message>
  186. ]]></example>
  187. </section2>
  188. <section2 topic='Nickname Management' anchor='manage'>
  189. <p>In order for a user to modify his or her nickname and notify contacts of that change, it is RECOMMENDED for clients to use &xep0163; (a.k.a. PEP).</p>
  190. <example caption='User Publishes Updated Nickname to PEP Node'><![CDATA[
  191. <iq from='narrator@moby-dick.lit/pda'
  192. type='set'
  193. id='pub1'>
  194. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  195. <publish node='http://jabber.org/protocol/nick'>
  196. <item>
  197. <nick xmlns='http://jabber.org/protocol/nick'>CallMeIshmael</nick>
  198. </item>
  199. </publish>
  200. </pubsub>
  201. </iq>
  202. ]]></example>
  203. <example caption='PEP Node Generates Notifications'><![CDATA[
  204. <message from='narrator@moby-dick.lit'
  205. to='starbuck@moby-dick.lit'
  206. type='headline'
  207. id='foo'>
  208. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  209. <items node='http://jabber.org/protocol/nick'>
  210. <item>
  211. <nick xmlns='http://jabber.org/protocol/nick'>CallMeIshmael</nick>
  212. </item>
  213. </items>
  214. </event>
  215. <addresses xmlns='http://jabber.org/protocol/address'>
  216. <address type='replyto' jid='narrator@moby-dick.lit/pda'/>
  217. </addresses>
  218. </message>
  219. .
  220. .
  221. .
  222. ]]></example>
  223. <p>If a XEP-0163-compliant personal eventing service is not available, a client SHOULD use a standalone &xep0060; service.</p>
  224. <example caption='User Publishes Updated Nickname to PubSub Node'><![CDATA[
  225. <iq from='narrator@moby-dick.lit/pda'
  226. to='pubsub.mody-dick.lit'
  227. type='set'
  228. id='pub2'>
  229. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  230. <publish node='841f3c8955c4c41a0cf99620d78a33b996659ded'>
  231. <item>
  232. <nick xmlns='http://jabber.org/protocol/nick'>CallMeIshmael</nick>
  233. </item>
  234. </publish>
  235. </pubsub>
  236. </iq>
  237. ]]></example>
  238. <example caption='PubSub Node Generates Notifications'><![CDATA[
  239. <message from='pubsub.mody-dick.lit'
  240. to='starbuck@moby-dick.lit'
  241. type='headline'
  242. id='foo'>
  243. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  244. <items node='841f3c8955c4c41a0cf99620d78a33b996659ded'>
  245. <item>
  246. <nick xmlns='http://jabber.org/protocol/nick'>CallMeIshmael</nick>
  247. </item>
  248. </items>
  249. </event>
  250. <addresses xmlns='http://jabber.org/protocol/address'>
  251. <address type='replyto' jid='narrator@moby-dick.lit/pda'/>
  252. </addresses>
  253. </message>
  254. .
  255. .
  256. .
  257. ]]></example>
  258. <p>If a client does not support <cite>XEP-0060</cite> or the subset thereof specified in <cite>XEP-0163</cite>, it MAY send one &MESSAGE; stanza to each of its contacts, containing the updated nickname (note: the client SHOULD send the messages in a staggered fashion in order to avoid server-enforced rate limiting, commonly known as "karma").</p>
  259. <example caption='Nickname Change Notification via Message'><![CDATA[
  260. <message from='narrator@moby-dick.lit/pda' to='starbuck@moby-dick.lit'>
  261. <nick xmlns='http://jabber.org/protocol/nick'>CallMeIshmael</nick>
  262. </message>
  263. .
  264. .
  265. .
  266. ]]></example>
  267. </section2>
  268. </section1>
  269. <section1 topic='Implementation Notes' anchor='impl'>
  270. <p>An IM client MAY use the user's own nickname as all or part of the "display name" shown to the user of that client (e.g., as the sending name in one-to-one chats and groupchats). For example, if the user whose JID is narrator@moby-dick.lit asserts that his nickname is "Ishmael", that user's client may show "Ishmael" as all or part of the user's display name. How the client shall store the display name is out of scope for this document; possible mechanisms include the user's local vCard, an organizational LDAP directory, &xep0049;, or <cite>XEP-0154</cite>.</p>
  271. </section1>
  272. <section1 topic='Former Usages' anchor='former'>
  273. <p>Earlier versions of this document described how to include the User Nickname extension in presence stanzas and invitations sent in relation to &xep0045; rooms. Based on deployment experience, that usage is now discouraged, since it is confusing to display multiple nicknames to an end user and inclusion of user-generated nicknames can override or work around local service policies for "nick lockdown" in chatrooms.</p>
  274. <p>Earlier versions also described usage in relation to the &xep0130; protocol. Because that protocol is now obsolete, documentation of such usage has been removed from this specification.</p>
  275. </section1>
  276. <section1 topic='Security Considerations' anchor='security'>
  277. <p>A nickname is a memorable, friendly name asserted by a user. There is no guarantee that any given nickname will be unique even within a particular community (such as an enterprise or university), let alone across the Internet through federation of communities. Clients SHOULD warn users that nicknames asserted by contacts are not unique and that nickname collisions are possible. Clients also MUST NOT depend on nicknames to validate the identity of contacts; instead, nicknames SHOULD be used in conjunction with JIDs (which are globally unique) and user-assigned handles (which are private and unique) as described in <cite>XEP-0165</cite> in order to provide a three-pronged approach to identity validation, preferably in combination with X.509 certificates.</p>
  278. </section1>
  279. <section1 topic='IANA Considerations' anchor='iana'>
  280. <p>This document requires no interaction with &IANA;.</p>
  281. </section1>
  282. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  283. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  284. <p>The &REGISTRAR; includes 'http://jabber.org/protocol/nick' in its registry of protocol namespaces (see &NAMESPACES;).</p>
  285. </section2>
  286. </section1>
  287. <section1 topic="XML Schema" anchor='schema'>
  288. <code><![CDATA[
  289. <?xml version='1.0' encoding='UTF-8'?>
  290. <xs:schema
  291. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  292. targetNamespace='http://jabber.org/protocol/nick'
  293. xmlns='http://jabber.org/protocol/nick'
  294. elementFormDefault='qualified'>
  295. <xs:annotation>
  296. <xs:documentation>
  297. The protocol documented by this schema is defined in
  298. XEP-0172: http://www.xmpp.org/extensions/xep-0172.html
  299. </xs:documentation>
  300. </xs:annotation>
  301. <xs:element name='nick' type='xs:string'/>
  302. </xs:schema>
  303. ]]></code>
  304. </section1>
  305. <section1 topic='Acknowledgements' anchor='ack'>
  306. <p>Thanks to Ian Paterson for his feedback.</p>
  307. <p>Unbeknownst to the authors of this document, work on user nicknames was previously done by Richard Dobson.</p>
  308. </section1>
  309. </xep>