%ents; ]>
In-Band Registration This specification defines an XMPP protocol extension for in-band registration with XMPP-based instant messaging servers and other services hosted on an XMPP network (such as groupchat rooms and gateways to non-XMPP IM services). The protocol is extensible via use of data forms, thus enabling services to gather a wide range of information during the registration process. The protocol also supports in-band password changes and cancellation of an existing registration. &LEGALNOTICE; 0077 Final Standards Track Standards XMPP Core iq-register http://www.xmpp.org/schemas/iq-register.xsd &stpeter; 2.3 2009-09-15 psa

Clarified that fields for "first" and "last" in fact always represent given name and family name, respectively.

2.2 2006-01-24 psa

Further specified integration with data forms, specifically if needed to require additional information when cancelling an existing registration (e.g., username and password) or changing a password (e.g., old password); also clarified server handling of cancelled registrations.

2.1 2005-07-14 psa

Clarified the extensibility rules; removed expiration date; modified schema to document optional inclusion of jabber:x:data and jabber:x:oob information.

2.0 2004-08-30 psa

Per a vote of the Jabber Council, advanced status to Final; also specified that by server is meant an instant messaging server.

1.6 2004-08-23 psa

In order to address Council concerns, clarified precedence order of x:data, iq:register, and x:oob; further specified server handling of initial registration requests from unregistered entities.

1.5 2004-07-21 psa

Specified server handling of requests from unregistered entities.

1.4 2004-05-10 psa

Removed conformance language regarding servers and services (belongs in a protocol suite specification).

1.3 2004-02-24 psa

Added text about redirection to web registration.

1.2 2003-11-26 psa

Documented use of <key/> element; added optional stream feature; added XMPP error handling; specified handling of empty passwords.

1.1 2003-10-02 psa

Moved change password use case from XEP-0078.

1.0 2003-06-18 psa

Per a vote of the Jabber Council, advanced status to Draft.

0.9 2003-06-18 psa

Changes to address Council concerns.

0.8 2003-06-13 psa

Restored the <misc/> and <text/> elements; added the old <key/> element; specified these three elements as obsolete.

0.7 2003-06-12 psa

Added <registered/> element; specified FORM_TYPE for x:data form; clarified that support for the extensibility mechanism is optional; removed the <misc/> and <text/> elements (not necessary given extensibility option); added <nick/>, <first/>, and <last/> elements that were traditionally documented as part of jabber:iq:register.

0.6 2003-06-06 psa

Removed XMPP-style error conditions until formats are stable.

0.5 2003-05-30 psa

Removed "encrypted secret" content, added information about expiration date.

0.4 2003-05-28 psa

Added "encrypted secret" content.

0.3 2003-05-20 psa

Slight editorial revisions.

0.2 2003-04-29 psa

Fixed schema, made minor editorial changes.

0.1 2003-04-06 psa

Initial version.

The Jabber protocols have long included a method for in-band registration with instant messaging servers and associated services. This method makes use of the 'jabber:iq:register' namespace and has been documented variously in Internet-Drafts and elsewhere. Because in-band registration is not required by &rfc2779;, documentation of the 'jabber:iq:register' namespace was removed from &xmppim;. This specification fills the void for canonical documentation.

In-band registration must make it possible for an entity to register with a host, cancel an existing registration with a host, or change a password with a host. By "host" is meant either of the following:

  1. an instant messaging server, such as described in XMPP IM and identified by the "server/im" &xep0030; category+type
  2. an add-on service, such as a gateway (see &xep0100;) or a &xep0045; service

If needed, extensibility with regard to information gathered should be done using &xep0004;.

In order to determine which fields are required for registration with a host, an entity SHOULD first send an IQ get to the host. The entity SHOULD NOT attempt to guess at the required fields by first sending an IQ set, since the nature of the required data is subject to service provisioning.

]]>

If the entity is not already registered and the host supports In-Band Registration, the host MUST inform the entity of the required registration fields. If the host does not support In-Band Registration, it MUST return a &unavailable; error. If the host is redirecting registration requests to some other medium (e.g., a website), it MAY return an <instructions/> element only, as shown in the Redirection section of this document.

Choose a username and password for use with this service. Please also provide your email address. ]]>

If the host determines (based on the 'from' address) that the entity is already registered, the IQ result that it sends in response to the IQ get MUST contain an empty <registered/> element (indicating that the entity is already registered), SHOULD contain the registration information currently on file for the entity (although the <password/> element MAY be empty), and SHOULD contain an <instructions/> element (whose XML character data MAY be modified to reflect the fact that the entity is currently registered).

If the host is an instant messaging server, it SHOULD assume that the requesting entity is unregistered at this stage unless the entity has already authenticated (for details, see the Registration with a Server section below).

juliet R0m30 juliet@capulet.com ]]>

If the entity is not already registered, the entity SHOULD provide the required information.

bill Calliope bard@shakespeare.lit ]]>

Note: The requesting entity MUST provide information for all of the elements (other than <instructions/>) contained in the IQ result.

]]>

Alternatively, registration may fail. Possible causes of failure include a username conflict (the desired username is already in use by another entity) and the fact that the requesting entity neglected to provide all of the required information.

bill m1cro$oft billg@bigcompany.com ]]>

If the requesting entity does not provide all of the requested information during registration This includes providing an empty password element or a password element that contains no XML character data, i.e., either <password/> or <password></password>. then the server or service MUST return a ¬acceptable; error to the requesting entity.

bill Calliope ]]>

If the host requires additional information above and beyond the data elements specified in the schema, it SHOULD use Data Forms as described in the Extensibility section of this document. (The next three examples show registration of an existing account with a third-party service, not of an entity with a server for the purpose of account registration.)

]]> Use the enclosed form to register. If your Jabber client does not support Data Forms, visit http://www.shakespeare.lit/contests.php Contest Registration Please provide the following information to sign up for our special contests! jabber:iq:register ]]>

The user then SHOULD return the form:

jabber:iq:register Juliet Capulet juliet@capulet.com F ]]>

Special care must be taken when an unregistered entity interacts with a server rather than a service. Normally, a server enables in-band registration so that entities can "bootstrap" their participation in the Jabber network; this bootstrapping happens when an unregistered and unauthenticated entity opens a TCP connection to a server and immediately completes the registration use case with the server, then authenticates using the newly-registered identity. As noted, when a server receives an IQ-get for registration information, it SHOULD assume that the requesting entity is unregistered unless the entity has already authenticated.

Depending on local service provisioning, a server MAY return a ¬acceptable; stanza error if an unregistered entity attempts to register too many times before authenticating or if an entity attempts to register a second identity after successfully completing the registration use case; a server MAY also return a <not-authorized/> stream error if the unregistered entity waits too long before authenticating or attempts to complete a task other than authentication after successfully completing the registration use case.

The 'jabber:iq:register' namespace also makes it possible for an entity to cancel a registration with a host by sending a <remove/> element in an IQ set. The host MUST determine the identity of the requesting entity based on the 'from' address of the IQ get.

]]> ]]>

There are two scenarios:

  1. If the entity cancels its registration with its "home" server (i.e., the server at which it has maintained its XMPP account), then the entity SHOULD NOT include a 'from' or 'to' address in the remove request the server SHOULD then return a <not-authorized/> stream error and terminate all active sessions for the entity. The server SHOULD perform the remove based on the bare JID &LOCALBARE; associated with the current session or connection over which it received the remove request. If the server is an instant messaging and presence server that conforms to &rfc3921;, the server SHOULD also cancel all existing presence subscriptions related to that entity (as stored in the entity's roster).

  2. If the entity cancels its registration with a service other than its home server, its home server MUST stamp a 'from' address on the remove request, which in accordance with XMPP Core will be the entity's full JID &LOCALFULL;. The service MUST perform the remove based on the bare JID &LOCALBARE; portion of the 'from' address.

As specified below, several error cases are possible.

ConditionDescription
&badrequest;The <remove/> element was not the only child element of the <query/> element.
&forbidden;The sender does not have sufficient permissions to cancel the registration.
¬allowed;No sender is allowed to cancel registrations in-band.
®istration;The entity sending the remove request was not previously registered.
&unexpected;The host is an instant messaging server and the IQ get does not contain a 'from' address because the entity is not registered with the server.
]]> ]]> ]]>

A given deployment MAY choose to require additional information (such as the old password or previously-gathered personal information) before cancelling the registration. In order to do so, the server or service SHOULD return a Data Form in the error stanza:

Cancel Registration Use this form to cancel your registration. jabber:iq:register:cancel ]]>

The user then SHOULD return the form:

jabber:iq:register:cancel bill@shakespeare.lit theglobe Throckmorton ]]>

The 'jabber:iq:register' namespace enables a user to change his or her password with a server or service. Once registered, the user can change passwords by sending an XML stanza of the following form:

bill newpass ]]>

Because the password change request contains the password in plain text, a client SHOULD NOT send such a request unless the underlying stream is encrypted (using SSL or TLS) and the client has verified that the server certificate is signed by a trusted certificate authority. A given deployment MAY choose to disable password changes if the stream is not properly encrypted, to disable in-band password changes, or to require additional information (such as the old password or previously-gathered personal information) before changing the password.

If the user provides an empty password element or a password element that contains no XML character data (i.e., either <password/> or <password></password>), the server or service MUST NOT change the password to a null value, but instead MUST maintain the existing password.

]]>

Several error conditions are possible:

ConditionDescription
&badrequest;The password change request does not contain complete information (e.g., the service requires inclusion of the <username/> element).
¬authorized;The server or service does not consider the channel safe enough to enable a password change.
¬allowed;The server or service does not allow password changes.
&unexpected;The host is an instant messaging server and the IQ set does not contain a 'from' address because the entity is not registered with the server.

The server or service SHOULD NOT return the original XML sent in IQ error stanzas related to password changes.

]]> ]]> ]]>

In order to require additional information before changing the password, the server or service SHOULD return a Data Form in the error stanza:

Password Change Use this form to change your password. jabber:iq:register:changepassword ]]>

The user then SHOULD return the form:

jabber:iq:register:changepassword bill@shakespeare.lit theglobe groundlings Throckmorton ]]>

The fields defined for the 'jabber:iq:register' namespace are strictly limited to those specified in the schema. If a host needs to gather additional information, XEP-0004: Data Forms ("x:data") SHOULD be used according to the following rules:

  1. A host MUST NOT add new fields to the 'jabber:iq:register' namespace; instead, extensibility SHOULD be pursued via the Data Forms protocol as specified herein.
  2. The x:data form shall be contained as a child element of the <query xmlns='jabber:iq:register'/> element (it cannot be a child of the &IQ; stanza and comply with Section 9.2.3 of &rfc3920;).
  3. The x:data form SHOULD contain x:data fields that correspond to all of the iq:register fields (e.g., username and password).
  4. The x:data form SHOULD use a hidden FORM_TYPE field for the purpose of standardizing field names within the form, as defined in &xep0068;.
  5. The x:data form shall take precedence over the iq:register fields; if the submitting entity supports the Data Forms protocol, it SHOULD submit the data form rather than the predefined 'jabber:iq:register' fields, and MUST NOT submit both the data form and the predefined fields (see the Precedence Order section of this document).

Support for extensibility via Data Forms is RECOMMENDED but is not required for compliance with this document.

A given deployment MAY wish to redirect users to another medium (e.g., a website) for registration, rather than allowing in-band registration. The recommended approach is to include only the <instructions/> element rather than the required fields or a data form in the IQ result, as well as a URL encoded using &xep0066; (see the Precedence Order section below for further details).

To register, visit http://www.shakespeare.lit/contests.php http://www.shakespeare.lit/contests.php ]]>

Given the foregoing discussion, it is evident that an entity could receive any combination of iq:register, x:data, and x:oob namespaces from a service in response to a request for information. The precedence order is as follows:

  1. x:data
  2. iq:register
  3. x:oob

(Naturally, if the receiving application does not understand any of the foregoing namespaces, it MUST ignore the data qualified by that namespace.)

Thus it is possible that the host may return any of the following combinations, in which case the submitting application MUST proceed as defined in the table below (it is assumed that "iq:register fields" means instructions plus fields, whereas "iq:register instructions" means the <instructions/> element only):

Included Data Recommended Processing Notes
iq:register fields Submit the completed iq:register fields. This is the normal processing model for "legacy" services and clients.
x:data form + iq:register fields Submit the completed x:data form if understood, otherwise submit the completed iq:register fields; however, an application MUST NOT submit both. The iq:register fields would be included for "legacy" clients; this combination SHOULD NOT be used if the x:data form includes required fields (e.g., a public key) that are not equivalent to defined iq:register fields (the next combination SHOULD be used instead).
x:data form + iq:register instructions Submit the completed x:data form if understood, otherwise present the iq:register instructions to the user. This combination SHOULD be used if the x:data form includes required fields (e.g., a public key) that are not equivalent to defined iq:register fields and an alternate URL is not available.
x:data form + x:oob URL Submit the completed x:data form if understood, otherwise present the provided URL as an alternative. This combination MAY be returned by a host, but a host SHOULD return the next combination instead in order to support the full range of legacy clients.
x:data form + iq:register instructions + x:oob URL Submit the completed x:data form if understood, otherwise present the iq:register instructions and provided URL as an alternative. This combination SHOULD be used if the x:data form includes required fields (e.g., a public key) that are not equivalent to defined iq:register fields and an alternate URL is available.
iq:register instructions + x:oob URL Present the iq:register instructions and provided URL as a redirect. This combination MAY be returned by a host that wishes to redirect registration to a URL.
iq:register fields + x:oob URL Submit the completed iq:register fields but optionally present the provided URL as an alternative. This combination is NOT RECOMMENDED.

This element is obsolete, but is documented here for historical completeness.

The <key/> element was used as a "transaction key" in certain IQ interactions in order to verify the identity of the sender. In particular, it was used by servers (but generally not services) during in-band registration, since normally a user does not yet have a 'from' address before registering. The flow is as follows:

  1. Client sends IQ-get request to server.
  2. Server returns required elements to client, including <key/> element containing a random string (often a SHA-1 hash).
  3. Client sends registration information to server, including <key/> element with the same value provided by the server.
  4. Server checks key information and processes registration request; if key is missing or the key value does not match the transaction key provided, the server returns an error.

The <key/> element was also used during registration removal.

RFC 3920 defines methods for advertising feature support during stream negotiation. For the sake of efficiency, it may be desirable for a server to advertise support for in-band registration as a stream feature. The namespace for reporting support within <stream:features/> is "http://jabber.org/features/iq-register". Upon receiving a stream header qualified by the 'jabber:client' namespace, a server returns a stream header to the client and MAY announce support for in-band registration by including the relevant stream feature:

... ... ]]>

A server SHOULD NOT advertise in-band registration to another server (i.e., if the initial stream header was qualified by the 'jabber:server' namespace).

As defined herein, the 'jabber:iq:register' namespace supports both the old (HTTP-style) error codes and the extensible error classes and conditions specified in XMPP Core. A compliant server or service implementation MUST support both old-style and new-style error handling. A compliant client implementation SHOULD support both. For mappings of HTTP-style errors to XMPP-style conditions, refer to &xep0086;.

In-band registration is usually not included in other messaging protocols (for example, SMTP does not include a method for registering with an email server), often for reasons of security. The registration methods defined herein are known to be insecure and SHOULD NOT be used unless the channel between the registrant and the entity that accepts registration has been secured. For these reasons, the deployment of in-band registration is a policy matter and a given deployment MAY choose to disable in-band registration and password changes. Furthermore, this document should be deprecated as soon as a successor protocol is defined and implemented.

This document requires no interaction with &IANA;.

The ®ISTRAR; includes the 'jabber:iq:register' namespace in its registry of protocol namespaces.

The XMPP Registrar includes the 'http://jabber.org/features/iq-register' namespace in its registry of stream feature namespaces.

As authorized by &xep0147;, the XMPP Registrar maintains a registry of queries and key-value pairs for use in XMPP URIs (see &QUERYTYPES;).

As described below, the registered querytypes for registration management are "register" and "unregister".

The 'jabber:iq:register' namespace include a mechanism for creating a registration. The registered querytype for doing so is "register".

Because registration is a two-step process, the application MUST then send an IQ-get to the entity in order to retrieve the required registration fields:

]]> ]]>

The application MUST then present an appropriate interface that enables the user to complete the registration form. Once the user provides the information, the application MUST send an IQ-set to the entity.

juliet R0m30 ]]>

The following submission registers the "register" querytype.

register jabber:iq:register enables registering with a server or service XEP-0077 ]]>

The 'jabber:iq:register' namespace include a mechanism for cancelling an existing registration. The registered querytype for doing so is "unregister".

]]>

The following submission registers the "unregister" querytype.

unregister jabber:iq:register enables cancellation of a registration with a server or service XEP-0077 ]]>

There is one FORM_TYPE and set of associated field types and names for field standardization in relation to each major use case for the 'jabber:iq:register' namespace: registration, cancellation of registration, and change of password. The initial submissions for these FORM_TYPES are provided below (additional fields may be provided in future submissions).

jabber:iq:register XEP-0077 Standardization of fields related to registration use case. ]]> jabber:iq:register:cancel XEP-0077 Standardization of fields related to cancellation use case. ]]> jabber:iq:register:changepassword XEP-0077 Standardization of fields related to change password use case. ]]>
The protocol documented by this schema is defined in XEP-0077: http://www.xmpp.org/extensions/xep-0077.html ]]> The protocol documented by this schema is defined in XEP-0077: http://www.xmpp.org/extensions/xep-0077.html ]]>