diff --git a/xep-0389.xml b/xep-0389.xml index 3e602545..35b77fcf 100644 --- a/xep-0389.xml +++ b/xep-0389.xml @@ -18,7 +18,7 @@ &LEGALNOTICE; 0389 - Deferred + Experimental Standards Track Standards Council @@ -31,6 +31,18 @@ ibr2 &sam; + + 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 @@ -42,9 +54,7 @@ 2017-03-16 XEP Editor (ssw) -
    -
  • Move to experimental.
  • -
+ Move to experimental.
@@ -67,9 +77,9 @@

- 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 + 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.

@@ -101,27 +111,12 @@ A client MUST be able to use the same mechanism to register an account and to recover a forgotten password (subject to server policy). +
  • + A client MUST be able to register with a server as well as external + components. +
  • - -
    - -
    Proof-of-work (PoW)
    -
    - A proof-of-work protocol requires that a client perform a - computationally intense task which is easily verified by the server. -
    -
    - -
    Proof-of-possession (PoP)
    -
    - A proof-of-possession protocol requires that a client prove that they - have posession of some resource (eg. a shared secret, or a valid mobile - phone number). -
    -
    -
    -
    • @@ -130,9 +125,8 @@ proof-of-work function before registration is completed.
    • - As a server operator I want to prevent zombie machines from registering - for accounts so I require that registrants submit a form which requires - user interaction. + As a server operator I want to prevent bots from registering accounts so I + require that registrants submit a form which requires user interaction.
    • As a user I do not want to lose access to my account if I forget my @@ -154,6 +148,7 @@
    +

    If a server supports registering for or recovering an account using Extensible IBR, it MUST inform the connecting client when returning stream @@ -164,7 +159,7 @@ 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 STARTTLS. + 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. @@ -173,13 +168,30 @@ For recovery or registration, the server MUST include a list of all challenge types which the client may receive during the course of registering or recovering an account. - The purpose of this list is to allow clients to detect if registration - requires a challenge type which the client does not support, so servers - SHOULD only include each type once; the list is merely informative, and - should not be relied upon by clients except to ensure that all mechanisms - are supported. - This list should comprise <challenge/> elements containing a string - that uniquely identifies the type of challenge being issued. + 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 a list of <challenge/> elements + representing the various challenges that must be completed to complete the + registration or recovery flow. + Each <challenge/> element contains a string that uniquely (within the + given parent element) identifies the type of challenge that will be offered. + If a flow would offer the same challenge twice (eg. two dataforms 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 dataform asking for a phone number + and then a second dataform asking for a token provided to the user in a + text message or phone call depending on which flow the user selects.

    @@ -190,23 +202,67 @@ PLAIN - jabber:x:data' - pow-example + + Verify with SMS + jabber:x:data + + + Verify by Phone Call + jabber:x:data + + + Verify with the web + jabber:x:data + jabber:x:oob + - jabber:x:oob + + Visit Password Recovery Site + jabber:x:oob + ]]> +
    + +

    + 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. +

    + ]]> +

    A client selects the registration or recovery feature for negotiation by - replying with an empty element of the same name and namespace. - For example, to attempt account recovery the client would send a - <recovery> element qualified by the 'urn:xmpp:register:0' namespace. + 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:

    + + +]]>

    - The server then replies with a challenge. + 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 containing the challenge type and containing a challenge data payload. @@ -275,41 +331,55 @@ ]]> + +

    - If after receiving a challenge a client 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 server that registration is complete. + 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 client submits invalid data, or the server wishes to cancel for some - other reason, it may reply with an empty <cancel/> element qualified - by the 'urn:xmpp:register:0' namespace. - If the client successfully completes the challenge, the server MAY 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 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 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). + 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; + For more information about language tags and matching, see &bcp47;.