XEP-0401: Easy User Onboarding

Abstract:

This document defines a protocol and URI scheme for user invitation in order to allow a third party to register on a server. The goal of this is to make onboarding for XMPP IM newcomers as easy as possible.

WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.

Romeo is an active XMPP IM (Instant Messaging) user or the operator of
an XMPP server. He convinces Juliet (who may not have an XMPP account yet)
to install a client but she may still need to choose an XMPP server,
create an account, and add Romeo as a contact.
This specification defines two ways for Romeo to simplify this process for Juliet:

The token should be unique, sufficiently
long and generated by a strong random number generator.

A server MUST provide the uri field which contains an
XMPP URI of the following format:

xmpp:inviter@example.com?roster;preauth=TOKEN;ibr=y

The ibr query component in the XMPP URI indicates that
the invitee is allowed to create an account on Romeo's server, using the
'preauth' token.
If the server does not support or allow in-band registration for invited
users, the server MUST omit the ibr query component.

Additionally, the server SHOULD provide the landing-url
field which contains an HTTPS URL of a web-based landing page as described
in Pre-Authenticated Roster Subscription (XEP-0379) [3] § 3.3. The URL format may differ from the example shown here
depending on where the landing page is hosted.

If the server omits the landing-page field, Romeo's
client SHOULD generate an appropriate landing page URL hosted by the
client developer or a trusted third party.

A server MAY provide a field which provides the expiration date of the
generated token. The expiration date MUST conform to the DateTime profile
specified in XMPP Date and Time Profiles (XEP-0082) [5]. If the field is not provided, the token does not
expire.

Romeo's client should provide adequate means to export the
landing-page URL, possibly accompanied with a short
description and the expire information, so that Romeo can
share it with Juliet by other means than XMPP, like e-mail or a QR code.

If Juliet does not have an XMPP client installed, she will not be able
to open the xmpp: link from the invitation page.
For this case, the landing page needs to indicate that a client must be
installed first, and that the link will not work as intended without.
The automatic installation of an appropriate IM client when a user
clicks on an xmpp: is outside of the scope of this
document.

With an XMPP client installed, Juliet can open the
xmpp: link and have the client process it
appropriately, as follows:

If Juliet's client is already configured with an account, the default
action for the presented
xmpp:inviter@example.com?roster;... URI is to add the
inviter to Juliet's roster. This should be performed as described in
§3.4 of XEP-0379, by sending a presence subscription
request containing the 'preauth' token.

If Juliet already has Romeo in her roster, her client should open the
appropriate chat interface instead.

If Juliet's client does not have an XMPP account configured, she
needs to login or register an account first. Therefore, the client
should provide an interface with the following options:

Login with an existing XMPP account.

Register an account with Romeo's server (if the URI contains a
ibr=y parameter).

Register an account with a public or client-endorsed server.

If the xmpp: URI provided by Romeo contains the
ibr=y parameter, it indicates that the server
supports the Pre-Authenticated In-Band
Registration defined in this document. If Juliet chooses this
approach, the server will ensure that after the registration, Romeo is
added to her roster with a full presence subscription.

If
Juliet chooses to login or register with a different server, her
client must complete the respective process and issue a subscription
request as described in §3.4 of XEP-0379.

If Romeo is the administrator of an XMPP server, he might want to
ensure that Juliet obtains an account on this server, with a username
defined either by Romeo or by Juliet, and in a way that does not require
the out-of-band communication of user passwords.

A server MAY require a username to be specified for account creation.
In this case, the server MUST add the <required/> element to the
username field.
The username MUST be a valid localpart as defined in RFC 6122 [6] §2.3.

In order to allow invited users to register on a server, the
registration processs as defined in In-Band Registration (XEP-0077) [7] needs to be extended. The
invited user's client MUST add a <preauth> element in the 'TODO'
namespace to the 'jabber:iq:register' query in order to inform the
server that it wants to perform Pre-Authenticated IBR:

After the invitee has successfully registered on the inviter's server
and roster subscription is enabled for account creation, the server MUST
use roster pushes as defined in RFC 6121 [8] §2.1.6 in order to inform the
inviter about the invitee's new account without the need to reconnect.

If a username was specified during the account creation process, the
server SHOULD NOT create an account on the server until the invitee
actually registers it with the corresponding token.
The server MUST reserve the username at least until the corresponding
token expires.

If the invitee opens an invitation URI with ibr=y and
chooses to create a new account, the client SHOULD pre-fill the
inviter JID's domain part as the new account's domain. The client MAY
provide a mechanism to enter or choose a different server, though.

Appendix B: Author Information

Marc Schink

Appendix C: Legal Notices

Copyright

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards 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 document 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.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

9. 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/>.