JEP-0172: User Nickname

This document defines best practices for handling of user nicknames.


WARNING: This Informational JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software Foundation. Implementation of the best practice or protocol profile described herein is encouraged in exploratory implementations, although production systems should not deploy implementations of this protocol until it advances to a status of Draft.


JEP Information

Status: Experimental
Type: Informational
Number: 0172
Version: 0.2
Last Updated: 2006-03-08
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: N/A
Wiki Page: <http://wiki.jabber.org/index.php/User Nickname (JEP-0172)>

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Valerie Mercier

Email: valerie.mercier@francetelecom.com
JID: vmercier@jabber.com

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2006 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this JEP has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

The keywords "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 RFC 2119.


Table of Contents

1. Introduction
2. Terminology
3. Format
4. Use Cases
4.1. Message Exchange
4.2. Presence Subscription
4.3. Multi-User Chat
4.4. Nickname Management
5. Security Considerations
6. IANA Considerations
7. Jabber Registrar Considerations
Notes
Revision History


1. Introduction

A nickname is a global, memorable (but not necessarily unique) friendly or informal name chosen by the owner of a bare JID (<node@domain.tld>) 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 are not specified in RFC 3921 [1]). However, there are several reasons why nicknames are important:

This document defines best practices that enable IM users to advertise their preferred nicknames over Jabber/XMPP instant messaging networks.

2. Terminology

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.

Table 1: JIDs, Nicknames, and Handles

Name Definition
Jabber ID (JID) A global and unique XMPP identifier registered to a particular user, of the form <node@domain.tld>; 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.
Nickname 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 RFC 2821 [3]) and SIP (see RFC 3261 [4]).
Handle A private, unique, and memorable "petname" 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.

3. Format

A nickname SHOULD be encapsulated via the User Profile [5] format. [6] Here is an example:

Example 1. A Nickname

  <x xmlns='jabber:x:data' type='result'>
    <field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/profile</value></field>
    <field var='nickname'><value>BernieBoy</value></field>
  </x>
  

4. Use Cases

In general, a user SHOULD include the nickname when establishing initial communication with a contact or group of contacts. Appropriate use cases therefore include:

4.1 Message Exchange

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:

Example 2. Including Nickname with First Message

<message from='bernardo@shakespeare.lit/pda' to='francisco@shakespeare.lit' type='chat'>
  <body>Who's there?</body>
  <profile xmlns='http://jabber.org/protocol/profile'>
    <x xmlns='jabber:x:data' type='result'>
      <field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/profile</value></field>
      <field var='nickname'><value>BernieBoy</value></field>
    </x>
  </profile>
</message>
    

4.2 Presence Subscription

As defined in RFC 3921, a subscription request contains only the JID of the sender:

Example 3. A Basic Subscription Request

<presence from='bernardo@shakespeare.lit' to='francisco@shakespeare.lit' type='subscribe'/>
    

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, vcard-temp [7] node, or JEP-0154 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:

Example 4. Including Nickname with Subscription Request

<presence from='bernardo@shakespeare.lit' to='francisco@shakespeare.lit' type='subscribe'>
  <profile xmlns='http://jabber.org/protocol/profile'>
    <x xmlns='jabber:x:data' type='result'>
      <field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/profile</value></field>
      <field var='nickname'><value>BernieBoy</value></field>
    </x>
  </profile>
</presence>
    

4.3 Multi-User Chat

Multi-User Chat [8] defines a protocol for groupchat rooms. A user specifies a "room nickname" when joining such a room (the resource identifier of the 'to' address):

Example 5. A Basic Room Join Request

<presence from='bernardo@shakespeare.lit/patrol' to='jdev@conference.jabber.org/stpeter'/>
    

A user MAY specify his or her persistent nickname as well: [9]

Example 6. Including Nickname with Room Join Request

<presence from='bernardo@shakespeare.lit/patrol' to='jdev@conference.jabber.org/stpeter'>
  <profile xmlns='http://jabber.org/protocol/profile'>
    <x xmlns='jabber:x:data' type='result'>
      <field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/profile</value></field>
      <field var='nickname'><value>BernieBoy</value></field>
    </x>
  </profile>
</presence>
    

If a user includes his or her persistent nickname in the room join request, the nickname SHOULD also be included in any presence changes sent to the room:

Example 7. Presence Change With Nickname

<presence from='bernardo@shakespeare.lit/patrol' to='jdev@conference.jabber.org/stpeter'>
  <show>away</show>
  <status>Out to lunch</status>
  <profile xmlns='http://jabber.org/protocol/profile'>
    <x xmlns='jabber:x:data' type='result'>
      <field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/profile</value></field>
      <field var='nickname'><value>BernieBoy</value></field>
    </x>
  </profile>
</presence>
    

4.4 Nickname Management

In order for a user to modify his or her nickname and notify contacts of that change, it is RECOMMENDED for clients to use the protocol defined in JEP-0154. If a Personal Eventing Protocol [10] service is not available, a client SHOULD use a standalone Publish-Subscribe [11] service. If a client does not support JEP-0060 or the subset thereof specified in JEP-0163, it MAY send one <message/> stanza to each of its contacts, containing the updated nickname:

Example 8. Nickname Change

<message from='bernardo@shakespeare.lit/patrol' to='francisco@shakespeare.lit'>
  <profile xmlns='http://jabber.org/protocol/profile'>
    <x xmlns='jabber:x:data' type='result'>
      <field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/profile</value></field>
      <field var='nickname'><value>BernieBoy</value></field>
    </x>
  </profile>
</message>
.
.
.
    

The client SHOULD send the messages in a staggered fashion in order to avoid rate limiting.

5. Security Considerations

The best practices described in this document introduce no known security vulnerabilities.

6. IANA Considerations

This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [12].

7. Jabber Registrar Considerations

This JEP requires no interaction with the Jabber Registrar [13].


Notes

1. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://www.ietf.org/rfc/rfc3921.txt>.

2. JEP-0165: Prevention of JID Spoofing <http://www.jabber.org/jeps/jep-0165.html>.

3. RFC 2821: Simple Mail Transfer Protocol <http://www.ietf.org/rfc/rfc2821.txt>.

4. RFC 3261: Session Initiation Protocol (SIP) <http://www.ietf.org/rfc/rfc3261.txt>.

5. JEP-0154: User Profile <http://www.jabber.org/jeps/jep-0154.html>.

6. While it could be argued that a less verbose format would be preferable (e.g., a specialized XML format), the use cases described herein are infrequent enough that the slightly more verbose format of User Profiles (JEP-0154) is acceptable.

7. JEP-0054: vcard-temp <http://www.jabber.org/jeps/jep-0054.html>.

8. JEP-0045: Multi-User Chat <http://www.jabber.org/jeps/jep-0045.html>.

9. This may be desirable because the user's preferred room nickname is already taken, because the user would like to log in to the same room from multiple resources, or because the service "locks down" room nicknames.

10. JEP-0163: Personal Eventing Protocol <http://www.jabber.org/jeps/jep-0163.html>.

11. JEP-0060: Publish-Subscribe <http://www.jabber.org/jeps/jep-0060.html>.

12. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

13. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.


Revision History

Version 0.2 (2006-03-08)

Added wrapper element from JEP-0154.

(psa)

Version 0.1 (2006-01-24)

Initial JEP version.

(psa)

Version 0.0.3 (2006-01-22)

Added message exchange use case.

(psa)

Version 0.0.2 (2006-01-18)

Added MUC and nickname management use cases; specified profile data syntax.

(psa)

Version 0.0.1 (2005-09-12)

Initial version.

(psa)


END