%ents; BCP 47 BCP 47: Tags for Identifying Languages <http://tools.ietf.org/html/bcp47>." > ]>
Extensible In-Band Registration This specification defines an XMPP protocol extension for in-band registration with instant messaging servers and other services with which an XMPP entity may initiate a stream. It aims to improve upon the state of the art and replace XEP-0077: In-Band Registration by allowing multi-factor registration mechanisms, and account recovery. &LEGALNOTICE; 0389 Experimental Standards Track Standards Council XMPP Core XEP-0077 ibr2 &sam; 0.4.0 2020-04-22 ssw
  • Add OOB challenge type.
  • Add IQ query for flows.
  • Add a glossary.
  • Make challenge listings more consistent.
  • Cleanup and expand the registrar considerations section.
  • Clarifications and typo fixes throughout the text.
0.3.0 2020-04-19 ssw
  • Move back to experimental.
  • Add IQ variant of registration/recovery.
  • Allow client to select between multiple flows.
0.2.0 2018-10-01 XEP Editor (jsc) Defer due to lack of activity. 0.1.0 2017-03-16 XEP Editor (ssw) Move to experimental. 0.0.2 2017-02-15 ssw
  • Don't allow feature to act as auth.
  • Use a more conventional list for challenge type listings.
0.0.1 2017-02-08 ssw

First draft.

Historically, registering with an XMPP service has been difficult. Each server either used customized out-of-band registration mechanisms such as web forms which were difficult to discover, or they used &xep0077; which could easily be abused by spammers to register large numbers of accounts and which allowed for only limited extensibility.

To solve these issues this specification provides a new in-band registration protocol that allows servers to present the user with a series of "challenges". This allows for both multi-stage proof-of-possession registration flows and spam prevention mechanisms such as proof-of-work functions.

Challenge
A challenge is an action taken during account registration or recovery that requires a response. For example, displaying a form to a user or asking for a token.
Challenge Type
The type of a challenge is a unique string that identifies the type of payload that can be expected. For example, a challenge element with type "jabber:x:data" can be expected to contain a data form. Challenge types must be defined and registered in the challenge types registry. When defining a challenge it is often convenient to reuse an XML namespace from the document defining the challenge.
Flow
A flow, or more specifically a "registration flow" or "recovery flow", is a collection of challenges that together can be used to gather enough information to register a new account or recover an existing account.

If a server supports registering for or recovering an account using Extensible IBR, it MUST inform the connecting client when returning stream features during the stream negotiation process. This is done by including a <register/> element, qualified by the 'urn:xmpp:register:0' namespace for account registration, or a <recovery/> element qualified by the same namespace for account recovery. The register and recovery features are always voluntary-to-negotiate. The registration and recovery features MUST NOT be advertised before encryption has been negotiated, eg. using direct TLS or opportunistic TLS. They SHOULD be advertised at the same time as the SASL authentication feature, meaning that after registration or recovery is completed SASL authentication can proceed.

For recovery or registration, the server MUST include a list of all challenges which the client may receive during the course of registering or recovering an account. These are grouped into "flows" and let the client pick a registration workflow that only contains challenges which the client supports. Each <flow/> element MUST have a unique "id" attribute which is used by the client to identify the flow being selected. They must also have at least one <name/> element containing a short, human readable description of the flow. If multiple <name/> elements are present they MUST have unique values for the "xml:lang" attribute. Clients MAY use the name element to show the different flows to the user and ask them to pick between them. Each flow must also contain an unordered set of <challenge/> elements representing the various challenges that must be completed to complete the registration or recovery flow. Each <challenge/> element contains a "type" attribute that uniquely identifies the challenge for the purpose of determining if it is supported. If a flow would offer the same challenge twice (eg. two data forms asking for different data), the challenge SHOULD only be listed once in the flow element.

For example, a server may advertise a "Verify with SMS" flow and a "Verify by Phone Call" flow that both show a data form asking for a phone number and then a second data form asking for a token provided to the user in a text message or phone call depending on which flow the user selects.

EXTERNAL SCRAM-SHA-1-PLUS SCRAM-SHA-1 PLAIN Verify with SMS Verify by Phone Call Verify with the web Visit Password Recovery Site ]]>

Clients, servers, and other services such as components that support Extensible IBR after stream negotiation is complete MUST advertise the fact by including a feature of "urn::xmpp:register:0" in response to &xep0030; information requests and in their &xep0115; profiles.

… ]]>

To find what flows an entity provides (if any) after stream negotiation is complete the requester can send an IQ of type "get" containing a <register> or <recovery> element qualified by the "urn:xmpp:register:0" namespace.

When responding to a query for registration or recovery flows the list of challenges should be included just as it would be if during stream feature negotiation. That is, a "register" or "recovery" element containing a list of flows, each with an id, containing a name and a list of challenges. If an entity supports this specification but does not provide any flows after stream negotiation it MUST respond with an empty list.

]]> Verify with SMS Verify by Phone Call Verify with the web ]]> ]]>

A client selects the registration or recovery feature for negotiation by replying with an element of the same name and namespace. The element MUST contain a <flow> element that MUST have an "id" attribute matching one of the flows advertised by the server. For example, to select the "Verify by Phone Call" registration flow from the previous example, the client would reply with:

]]>

If the client is initiating registration or recovery after a stream has already been initiated it uses the same registration element wrapped in an IQ of type "set".

]]>

The server then replies to the IQ or feature selection with a challenge. If replying to an IQ, the challenge must be wrapped in an IQ of type "result". Challenges take the form of a <challenge/> element qualified by the 'urn:xmpp:register:0' namespace with a 'type' attribute that uniquely identifies the type of payload a client might expect the element to contain.

Payload ]]>

After a challenge is received, the client replies to the challenge by sending a <response/> element qualified by the 'urn:xmpp:register:0' namespace or a cancellation as defined later in this document. If the client sends a response, it MUST also include the payload corresponding to the challenges 'type' element (which may be empty).

Example Response ]]>

This document defines a type of 'jabber:x:data' which MUST always contain a data form (an 'x' element with type 'form') as defined by &xep0004;.

Chat Registration Please provide the following information to sign up to view our chat rooms! urn:xmpp:register:0 ]]>

The response to a "jabber:x:data" challenge MUST be a form submission (an 'x' element of type 'submit'). For instance, to reply to the data form challenge from the previous example a client might send:

urn:xmpp:register:0 Juliet Capulet Jule juliet@capulet.com ]]>

Challenges of the type "jabber:x:oob" MUST contain an <x/> element qualified by the "jabber:x:oob" namespace as defined in &xep0066;.

http://example.net/login?token=foo ]]>

If the client sends a response to the OOB challenge it MUST be empty.

]]>

If after receiving a challenge or response a client or server does not wish to continue registration or recovery, it may send an empty <cancel/> element qualified by the 'urn:xmpp:register:0' namespace. This informs the client or server that registration is complete. This is the same as submitting a data form of type 'cancel' in response to a data form challenge.

]]>

If the IQ based registration or recovery flow is being used and the server wishes to cancel the flow, it MAY respond to any IQ from the client with the cancel element and type "result".

]]>

If the client successfully completes all required challenges during stream negotiation the server MUST return an empty <success/> element qualified by the 'urn:xmpp:register:0' namespace, at which point it may continue with the stream negotiation process. If the server needs more information, for example, in the previous challenge the user entered an email and now the server wishes to ask for a code that was sent to that email, the server MAY send another challenge.

]]>

If the IQ based flow is being used and the server wishes to indicate success it sends an empty IQ response of type "result".

]]>

When providing instructions in a data form, or in the name element of a registration or recovery flow, the server SHOULD use the language specified in the XML stream's current xml:lang, or the closest language for which the server has a translation (eg. based on mutual intelligibility between scripts and languages).

For more information about language tags and matching, see &bcp47;.

Servers that allow in-band registration need to take measures to prevent abuse. Common techniques to prevent spam registrations include displaying CAPTCHAs or requiring proof-of-possession of a valid email address or telephone number by sending a unique code (e.g. an HMAC that can later be verified as having originated at the server) to the users email and requiring that they enter the code before continuing. Servers that do not take such measures risk being black listed by other servers in the network.

This document requires no interaction with &IANA;.

This specification defines the following XML namespace:

  • urn:xmpp:register:0

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespace to the registries located at &STREAMFEATURES;, and &DISCOFEATURES; as described in Section 4 of &xep0053;.

urn:xmpp:register:0 Support for in band registration and password reset. &xep0389; ]]> urn:xmpp:register:0 Extensible In-Band Registration register Support for in band registration and password reset. &xep0389; ]]>

The ®ISTRAR; shall also add the foregoing namespace to the Jabber/XMPP Protocol Namespaces Registry located at &NAMESPACES;. Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall remove the provisional status from this registry entry.

urn:xmpp:register:0 &xep0389; provisional ]]>

The XMPP Registrar shall maintain a registry of IBR challenges. Challenges defined within the XEP series MUST be registered with the XMPP Registrar.

®PROCESS; A name that uniquely identifies the challenge. A natural-language summary of the challenge. The document (or documents) in which the IBR challenge and its payload are defined. ]]>

For an example registration, see the next section.

This specification defines the following IBR challenge:

  • jabber:x:data
  • jabber:x:oob

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the following definitions to the IBR challenges registry, as described in this document:

jabber:x:data Requests that the client fill out an XEP-0004 data form. &xep0389;, &xep0004; ]]> jabber:x:oob Requests that the client execute a URI. &xep0066; ]]>
&NSVER;