From e6bffd62da4132c57a0cb28cec64846ec7d2d5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Tue, 21 Jul 2020 17:27:35 +0200 Subject: [PATCH 1/9] Advance XEP-0338 to Draft --- xep-0338.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xep-0338.xml b/xep-0338.xml index b55e6e69..b684067a 100644 --- a/xep-0338.xml +++ b/xep-0338.xml @@ -10,7 +10,7 @@ This specification provides an XML mapping for translating the RFC 5888 SDP Grouping Framework to Jingle &LEGALNOTICE; 0338 - Proposed + Draft 2020-06-30 Standards Track Standards @@ -22,6 +22,12 @@ NOT_YET_ASSIGNED &fippo; + + 1.0.0 + 2020-07-21 + XEP Editor (jsc) + Advance to Draft as per Council vote from 2020-07-01 + 0.2 2017-09-11 From a3e6d1065177318a2702d299a6a4479d7c38aa07 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 31 Mar 2020 17:26:16 +0100 Subject: [PATCH 2/9] XEP-0313: new revision 0.7 Plus (after ML discussion): - Clarify intention of 'with' field rule - Add 'ids' field for fetching specific messages - Add archive metadata query - relax language about inclusion of RSM count/index These were always optional, but the XEP encouraged their use. Implementation experience has shown that generating the count has significant performance cost, while most/all current clients ignore it anyway. --- xep-0313.xml | 572 ++++++++++++++++++++++++++------------------------- 1 file changed, 296 insertions(+), 276 deletions(-) diff --git a/xep-0313.xml b/xep-0313.xml index 29958428..8a6ddb2c 100644 --- a/xep-0313.xml +++ b/xep-0313.xml @@ -10,7 +10,7 @@ This document defines a protocol to query and control an archive of messages stored on a server. &LEGALNOTICE; 0313 - Deferred + Experimental 2017-11-15 Standards Track Standards @@ -28,6 +28,16 @@ &mwild; &ksmith; + + 0.7.0 + 2020-03-20 + mw + +

Add 'before-id' and 'after-id' fields, flipped pages, single-item retrieval and a new mandatory disco feature

+

Split preferences protocol into a separate document

+

Split the details of pubsub archives into a separate document

+
+
0.6.3 2018-07-16 @@ -176,9 +186,9 @@
  • The remote JID that the stanza is to (for an outgoing message) or from (for an incoming message).
  • A server-assigned UID that MUST be unpredictable and unique within the archive.
  • -
  • The message stanza itself. The entire original stanza SHOULD be stored, but at a - minimum only the &BODY; tag MUST be preserved (ie. the server might, at its - discretion, strip certain extensions from messages before storage).
  • +
  • The message stanza itself. The entire original stanza SHOULD be stored, but at a minimum only the &BODY; tag MUST + be preserved (ie. the server might, at its discretion, strip certain extensions from messages before storage), in + addition to all standard attributes of the stanza (e.g. to, from, type, id).
  • Note that 'incoming' and 'outgoing' messages are viewed within the context of the archived JID, rather than the system as a whole. For example, if romeo@montegue.lit sent a message to juliet@capulet.lit, it would be an outgoing message in the context of archiving for Romeo, and an incoming message in the context of archiving for Juliet.

    @@ -200,7 +210,7 @@ or cache that clients may keep.

    -

    There is no restriction on which services can expose archives, although only user, MUC and pubsub node archives are discussed here.

    +

    There is no restriction on which services can expose archives, although only user and MUC archives are discussed here.

    The most typical address is that of a user's own bare JID, within which those messages sent to or from that user's account would generally automatically be stored by the server. The collection @@ -211,9 +221,6 @@

    A MUC service allowing MAM queries for a room MUST expose the MAM archive on the room's bare JID

    - -

    A pubsub service allowing MAM queries for a node's data MUST expose this for queries addressed to the pubsub service

    -

    While this document talks about 'clients' and 'servers', as these are the common cases, the querying entity (referred to as a 'client') need not be an XMPP client as defined by RFC6120, but could potentially be any type of entity, and the queried entity (referred to as a 'server') need not be an XMPP server as defined by RFC6120, although access controls might prohibit any given entity from being able to access an archive.

    @@ -272,30 +279,36 @@ ]]>

    To ensure that the client knows when the results are complete, the server MUST send the &IQ; result after last query result has been sent to the client. The client can optionally include a 'queryid' attribute in their query, which allows the client to match results to their initiating query.

    -

    When querying a pubsub node's archive, the 'node' attribute is added to the <query> element.

    - - + ]]>

    By default all messages match a query, and filters are used to request a subset of the archived messages. Filters are specified in a &xep0004; data form included with the query. The hidden FORM_TYPE field - MUST be set to this protocol's namespace, 'urn:xmpp:mam:2'. Three further fields are defined by this + MUST be set to this protocol's namespace, 'urn:xmpp:mam:2'. Six further fields are defined by this XEP and MUST be supported by servers, though all of them are optional for the client. These fields are:

    • start
    • end
    • with
    • +
    • before-id (*)
    • +
    • after-id (*)
    • +
    • ids (*)
    + +

    Servers supporting fields marked with an asterisk (*) MUST advertise the disco feature 'urn:xmpp:mam:2#extended' and clients + that depend on these fields MUST verify that the server advertises this feature before attempting to use them.

    +

    Other fields may be used, but are not defined in this document - the naming of new fields MUST be consistent with the format defined in &xep0068;. Servers MUST NOT mark any fields in the form as being required (i.e. with the data forms <required/> element), regardless of whether they are defined in this document or elsewhere.

    If a 'with' field is present in the form, it contains a JID against which to match messages. The - server MUST only return messages if they match the supplied JID. A message in a user's archive matches if the JID matches either the to or from of the message. An item in a pubsub or MUC archive matches if the publisher of the item matches the JID; note that this should only be available to entities that would already have been allowed to know the publisher of the events (e.g. this could not be used by a visitor to a semi-anonymous MUC).

    -

    If the 'with' field's value is the bare JID of the archive, the server must only return results where both the 'to' and 'from' match the bare JID (either as bare or by ignoring the resource), as otherwise every message in the archive would match

    + server MUST only return messages if they match the supplied JID. A message in a user's archive matches if the JID matches either the to or from of the message. An item in a MUC archive matches if the publisher of the item matches the JID; note that this should only be available to entities that would already have been allowed to know the publisher of the events (e.g. this could not be used by a visitor to a semi-anonymous MUC).

    +

    To allow querying for messages the user sent to themselves, the client needs to set the 'with' attribute to the account JID. In that case, the server MUST only return results where both the 'to' and 'from' match the bare JID (either as bare or by ignoring the resource), as otherwise every message in the archive would match.

    If 'with' is omitted, the server MUST match all messages in the selected timespan with the query, regardless of the to/from addresses on each message.

    ]]>
    - -

    Finally, in order for the client or server to limit the number of results transmitted at - a time a server MUST support &xep0059; and MUST support the paging mechanism defined therein. - A client MAY include a <set/> element in its query.

    -

    For the purposes of this protocol, the UIDs used by RSM correspond with the UIDs of the - stanzas stored in the archive.

    - + +

    If the client has already seen some messages, it may choose to restrict its query to + before and/or after messages it already knows about. This may be done through the 'before-id' + and 'after-id' fields.

    + urn:xmpp:mam:2 - - 2010-08-07T00:00:00Z + + 09af3-cc343-b409f - - 10 - ]]> -

    To conserve resources, a server MAY place a reasonable limit on how many stanzas may be - pushed to a client in one request. Whether or not the client query included a <set/> element, the server MAY simply return - its limited results, modifying the <set/> element it returns appropriately.

    - - - - - 28482-98726-73623 - 09af3-cc343-b409f - 20 - - - - ]]> -

    The <first> and <last> elements specify the UID of the first and last returned - results (not necessarily of all the messages that matched the query, if the results have been limited).

    -

    The RSM <count> element and the 'index' attribute on the RSM <first> element are optional, - but servers SHOULD include them. Please refer to the RSM specification for more information - surrounding their meaning and use.

    -
    - -

    Having previously made a query that returned results limited by the server (as described above), a client - can re-send the same request and receive the next 'page' of results. It does this by including a <set> - element with its request, containing an <after/> with the UID of the last message it received - from the previous query.

    - + - - urn:xmpp:mam:2 - 2010-08-07T00:00:00Z - - - 10 - 09af3-cc343-b409f - + + + urn:xmpp:mam:2 + + + 28482-98726-73623 + + + 09af3-cc343-b409f + + ]]> -

    Note: There is no concept of an "open query", and servers MUST be prepared to receive arbitrary page requests at any time.

    -

    If the UID contained within an <after> or <before> element is not present in the archive, the server MUST return an item-not-found error in response to the query.

    -

    When the results returned by the server are complete (that is: when they have not been limited by the maximum size of the result page (either as specified or enforced by the server)), the server MUST include a 'complete' attribute on the <fin> element, with a value of 'true'; this informs the client that it doesn't need to perform further paging to retreive the requested data. If it is not the last page of the result set, the server MUST either omit the 'complete' attribute, or give it a value of 'false'.

    - - - - - 23452-4534-1 - 390-2342-22 - 16 - - + +

    If the client already knows the UID of one or more messages it wants to fetch, it can use + the 'ids' field:

    + + + + + + urn:xmpp:mam:2 + + + 28482-98726-73623 + + +
    ]]>
    -

    Sometimes (e.g. due to network or storage partitioning, or other transient errors) the server might return results to a client that are unstable (e.g. they might later change in sequence or content). In such a situation the server MUST stamp the <fin> element with a 'stable' attribute with a value of 'false'. If the server knows that the data it's serving are stable it MUST either stamp a 'stable' attribute with a value of 'true', or no such attribute. An example of when unstable might legitimately be returned is if the MAM service uses a clustered data store and a query covers a time period for which the data store has not yet converged; it the server could return best-guess results and tell the client that they may be unstable. A client SHOULD NOT cache unstable results long-term without later confirming (by reissuing appropriate queries) that they have become stable.

    + +

    If any UID requested by the client in any of the 'before-id', 'after-id' or 'ids' form fields, the server MUST return an item-not-found error in response to the query.

    +
    - -

    In order for the client find out about additional fields the server might support, it can send an iq stanza of type 'get' addressed to the archive like this:

    - +

    In order for the client find out about additional fields the server might support, it can send an iq stanza of type 'get' addressed to the archive like this:

    + ]]> -

    The server replies with all the form fields it supports in queries, which MUST include the mandatory fields specified in this document.

    - The server replies with all the form fields it supports in queries, which MUST include the mandatory fields specified in this document.

    + @@ -461,14 +451,23 @@ - - + + + + + + + + + ]]> -

    If the client understands any of the additional fields it MAY proceed to include any of them in subsequent queries. It is not required to include any or all of the supported fields in queries.

    - If the client understands any of the additional fields it MAY proceed to include any of them in subsequent queries. It is not required to include any or all of the supported fields in queries.

    +

    A special note about the 'ids' field: this field is of type 'list-multi' which typically is used to allow the client to select from a provided list of options. In this case the list of all possible ids MUST NOT be provided by the server, as it is likely to be extremely large. Instead the server MUST include a &xep0122; <validate/> element that signals the list is open to arbitrary values provided by the client.

    +

    As specified in &xep0068;, names of custom fields SHOULD use Clark notation to avoid conflicts with other extensions.

    + @@ -485,9 +484,11 @@ ]]> -

    Note that as the 'with', 'start' and 'end' fields MUST be implemented by servers, clients are able to submit forms using combinations of only these fields without needing to first fetch the form from the server and the types of these fields MUST be 'jid-single', 'text-single' and 'text-single' respectively. A server MUST NOT rely on a client having first requested the form before submitting queries

    -
    +

    Note that as the 'with', 'start' and 'end' fields MUST be implemented by servers, clients are able to submit forms using combinations of only these fields without needing to first fetch the form from the server and the types of these fields MUST be 'jid-single', 'text-single' and 'text-single' respectively. A server MUST NOT rely on a client having first requested the form before submitting queries

    +

    If a client includes a form field that the server does not recognise, the server MUST respond with a 'feature-not-implemented' error.

    +
    +

    The server responds to the archive query by transmitting to the client all the messages that match the criteria the client requested, subject to implementation limits. The results are sent as individual stanzas, @@ -534,6 +535,167 @@ ]]> + + + +

    A client or server will typically want to limit the number of results transmitted at + a time, thereby breaking the result stream into smaller 'pages'. For this purpose a + server MUST support &xep0059; and MUST support the paging mechanism defined therein. + A client MAY include a <set/> element in its query.

    +

    For the purposes of this protocol, the UIDs used by RSM correspond with the UIDs of the + stanzas stored in the archive.

    + + + + + urn:xmpp:mam:2 + + + 2010-08-07T00:00:00Z + + + + 10 + + + + ]]> +

    To conserve resources, a server MAY place a reasonable limit on how many stanzas may be + pushed to a client in one request. Whether or not the client query included a <set/> element, the server MAY simply return + its limited results, modifying the <set/> element it returns appropriately.

    + + + + + 28482-98726-73623 + 09af3-cc343-b409f + 20 + + + + ]]> + + +

    The <first> and <last> elements specify the UID of the first and last returned + results (not necessarily of all the messages that matched the query, if the results have been limited).

    + +

    The RSM <count> element and the 'index' attribute on the RSM <first> element are optional, + a server MAY include them, but a client MUST NOT depend on them being present. Please refer to the RSM + specification for more information surrounding their meaning and use.

    +

    Having previously made a query that returned results limited by the server (as described above), a client + can re-send the same request and receive the next 'page' of results. It does this by including a <set> + element with its request, containing an <after/> with the UID of the last message it received + from the previous query.

    + + + + urn:xmpp:mam:2 + 2010-08-07T00:00:00Z + + + 10 + 09af3-cc343-b409f + + + + ]]> +

    Note: There is no concept of an "open query", and servers MUST be prepared to receive arbitrary page requests at any time.

    +

    RSM does not define the behaviour of including both <before> and <after> in the same request. To retrieve a range of items between two known ids, use before-id and after-id in the query form instead.

    +

    If the UID contained within an <after> or <before> element is not present in the archive, the server MUST return an item-not-found error in response to the query.

    + + + + + + ]]> +

    When the results returned by the server are complete (that is: when they have not been limited by the maximum size of the result page (either as specified or enforced by the server)), the server MUST include a 'complete' attribute on the <fin> element, with a value of 'true'; this informs the client that it doesn't need to perform further paging to retreive the requested data. If it is not the last page of the result set, the server MUST either omit the 'complete' attribute, or give it a value of 'false'.

    + + + + + 23452-4534-1 + 390-2342-22 + 16 + + + + ]]> +

    Sometimes (e.g. due to network or storage partitioning, or other transient errors) the server might return results to a client that are unstable (e.g. they might later change in sequence or content). In such a situation the server MUST stamp the <fin> element with a 'stable' attribute with a value of 'false'. If the server knows that the data it's serving are stable it MUST either stamp a 'stable' attribute with a value of 'true', or no such attribute. An example of when unstable might legitimately be returned is if the MAM service uses a clustered data store and a query covers a time period for which the data store has not yet converged; it the server could return best-guess results and tell the client that they may be unstable. A client SHOULD NOT cache unstable results long-term without later confirming (by reissuing appropriate queries) that they have become stable.

    +
    + +

    To request the page at the end of the archive (i.e. the most recent messages), include just an empty <before/> element in the RSM part of the query. As defined by RSM, this will return the last page of the archive.

    + + + + urn:xmpp:mam:2 + 2010-08-07T00:00:00Z + + + 10 + + + + + ]]> +

    Within the returned page, all results are still in chronological order, that is, the first result you receive will be the oldest item in the page, and the last result you receive will be the last item in the archive.

    +
    + +

    When fetching a page, the client may prefer for the server to send the results within that page in reverse order. + For example, if a client implements a user interface that automatically fetches older messages as a user scrolls backward, + it may want to receive and display the newest messages first, instead of waiting for the whole page to be received.

    +

    A client wishing for a reversed page should include the <flip-page/> element in its query, like so:

    + + + + urn:xmpp:mam:2 + 2010-08-07T00:00:00Z + + + 10 + 09af3-cc343-b409f + + + + + ]]> +

    It is important to note that flipping a page does not affect what results are returned in response to the query. It only affects the + order in which they are transmitted from the server to the client.

    +

    A client that wishes to use flipped pages MUST ensure that the server advertises the 'urn:xmpp:mam:2#extended' feature.

    +
    +
    + + + + +

    When planning a query, a client may wish to learn the current state of the archive. This includes information about the first/last entries in the archive.

    + +

    When the archive advertises support for 'urn:xmpp:mam:2#extended' then the archive supports queries for this metadata via an iq of type 'get' to the + archive's address, with a <metadata/> payload in the 'urn:xmpp:mam:2' namespace.

    + + + + + ]]> + + + + + + + + ]]> + +

    The server response includes a <metadata/> element containing information about the archive. This element MUST include <start/> and <end/> + elements, which each have an 'id' and XEP-0082 formatted 'timestamp of the first and last messages in the archive respectively.

    @@ -592,42 +754,11 @@ ]]> - - -

    A PubSub service offering MAM SHOULD store each of the items published to each node. When responding to MAM requests it MUST construct the message stanza within the <forwarded> element in the same manner as the notifications sent to subscribers for the item, except that specifying the 'from' 'to' and 'id' attributes are OPTIONAL. Pubsub items must be returned one per message stanza (i.e. there MUST NOT be multiple <item> elements within the <items> element).

    - - - - - - - - - - Soliloquy - - To be, or not to be: that is the question: - Whether 'tis nobler in the mind to suffer - The slings and arrows of outrageous fortune, - Or to take arms against a sea of troubles, - And by opposing end them? - - - tag:denmark.lit,2003:entry-32397 - 2003-12-13T18:30:02Z - 2003-12-13T18:30:02Z - - - - - - - -]]>
    - + +

    This specification reserves the 'node' attribute of the <query> element for use with pubsub archives. Full details of using + this protocol to query pubsub node archives are documented in [FIXME: number to be assigned to xep-pubsub-mam].

    +

    The IDs used within an archive MUST be unique per item stored and MUST NOT be reused, even if the original item with a given ID has since been removed from the archive. If a server provides multiple archives (e.g. many user archives, or many MUC archives), the IDs do not need to be unique across all of these archives unless the server also allows a single query to be run across multiple archives (e.g. searching of all MUC rooms), discussion of which is beyond the scope of this document. These IDs are strings that servers may construct in any manner, and clients must treat as opaque strings (e.g. there is no requirement for them to be numeric, sequenced or GUIDs).

    @@ -640,160 +771,10 @@
    - -

    Depending on implementation and deployment policies, a server MAY allow the user to have control - over the server's archiving behaviour. This specification defines a basic protocol for this, and - also allows a server to offer more advanced configuration to a user.

    - -

    If the server supports and allows configuration of the preferences described below then it SHOULD implement the protocol defined - in this section. This allows the user to retrieve and configure the following preferences:

    -
      -
    • A list of JIDs that should always have messages to/from archived in the user's store.
    • -
    • A list of JIDs that should never have messages to/from archived in the user's store.
    • -
    • The default archiving behaviour (for JIDs in neither of the above lists).
    • -
    - - - -]]> - -

    The server replies with the user's current archiving preferences. The <prefs> element - MUST be present and contain the current default archiving policy. The <always> and <never> - MUST also be present (even if empty), and contain a list of JIDs enclosed in <jid> elements.

    - - - - - - - -]]> - -

    It is also possible that the server may respond with a stanza error, for example the standard - 'feature-not-implemented' (server does not support MAM configuration) defined in &rfc6120;.

    - - - - - - -]]> - -

    To update the preferences, the client can simply send an iq stanza with a type of 'set':

    - - - - - romeo@montague.lit - - - montague@montague.lit - - - -]]> -

    The server then replies with the applied preferences (note that due to server policies these - MAY be different to the preferences sent by the client):

    - - - - romeo@montague.lit - - - montague@montague.lit - - - -]]> - -

    It is also possible for the server to respond with an error, for example (but not limited to) - the standard 'feature-not-implemented' (the server does not support configuration of preferences), - 'forbidden' (the user is not authorized to change their preferences) or 'not-allowed' (the server - generally does not allow changing of configuration preferences).

    - - -

    If a JID is in neither the 'always archive' nor the 'never archive' list then whether it - is archived depends on this setting, the default. -

    -

    The 'default' attribute of the 'prefs' element MUST be one of the following values:

    -
      -
    • 'always' - all messages are archived by default.
    • -
    • 'never' - messages are never archived by default.
    • -
    • 'roster' - messages are archived only if the contact's bare JID is in the user's roster.
    • -
    -
    - -

    The <prefs/> element MAY contain an <always/> child element. If present, it - contains a list of <jid/> elements, each containing a single JID. The server SHOULD - archive any messages to/from this JID (see 'JID matching'). -

    -

    If missing from the preferences, <always/> SHOULD be assumed by the server to be an - empty list. -

    -
    - -

    The <prefs/> element MAY contain an <never/> child element. If present, it - contains a list of <jid/> elements, each containing a single JID. The server SHOULD - NOT archive any messages to/from this JID (see 'JID matching'). -

    -

    If missing from the preferences, <never/> SHOULD be assumed by the server to be an - empty list. -

    -
    -
    - -

    In addition to this protocol, a server MAY offer more advanced configuration to the user - through &xep0050;. Such an interface might, for example, allow the user to configure what - types of messages to store, or set a limit on how long messages should remain in the - archive.

    -

    If supported, such a configuration command SHOULD be presented on the well-defined - command node of "urn:xmpp:mam#configure".

    -
    - - -

    When comparing the message target JID against the user's roster (ie. when the user has - set default='roster') the comparison MUST use the bare target JID (that is, stripped of - any resource). -

    -

    For matching against entries in either the 'allow' or 'never' lists, for each listed - JID: -

    -
      -
    • If the listed JID contains a resource, compare against the target JID as-is.
    • -
    • If the listed JID has no resource (it is a bare JID) then first strip any resource - from the target JID prior to comparison. -
    • -
    -
    - -

    For outgoing messages, the server MUST use the value of the 'to' attribute as the target JID. -

    -
    - -

    For incoming messages, the server MUST use the value of the 'from' attribute as the target JID. -

    -
    -
    - -

    Clients can use &xep0334; for signaling that they do not wish some messages to be stored in the archive.

    - - V unir avtug'f pybnx gb uvqr zr sebz gurve fvtug - - - ]]> -
    -
    -

    If a server or other entity hosts archives and supports MAM queries, it MUST advertise - the 'urn:xmpp:mam:2' feature in response to &xep0030; requests made to archiving JIDs - (i.e. JIDs hosting an archive, such as users' bare JIDs): + the 'urn:xmpp:mam:2' and 'urn:xmpp:mam:2#extended' features in response to &xep0030; requests + made to archiving JIDs (i.e. JIDs hosting an archive, such as users' bare JIDs):

    @@ -806,10 +787,49 @@ ... + ... ]]> + +

    Servers advertising the 'urn:xmpp:mam:2#extended' feature MUST implement the 'before-id' and 'after-id' fields, as well as support for + flipped pages and single-item retrieval. The 'urn:xmpp:mam:2#extended' feature MUST NOT be advertised by a server without also advertising + 'urn:xmpp:mam:2'.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Featureurn:xmpp:mam:2urn:xmpp:mam:2#extended
    Queries using 'with', 'start' and 'end'RequiredRequired
    Error responses for missing UIDsRequiredRequired
    Queries using 'before-id', 'after-id' or 'ids'-Required
    Page flipping-Required
    Archive metadata query-Required
    +
    @@ -843,7 +863,7 @@

    Many thanks to Dave Cridland, Kim Alvefur, Yann Leboulanger, Evgeny Khramtsov, Florian Schmaus, Lance Stout, - Waqas Hussain and Daniel Gultsch for their input and feedback on this specification.

    + Waqas Hussain, Daniel Gultsch, Philipp Hörist, Jonas Schäfer and Georg Lukas for their input and feedback on this specification.

    From 2e6efba85c8390f162b9e1596ee9a1fa37cf9b82 Mon Sep 17 00:00:00 2001 From: "Ruslan N. Marchenko" Date: Wed, 29 Jul 2020 07:38:35 +0200 Subject: [PATCH 3/9] Correct MAM UID "not-found" note --- xep-0313.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xep-0313.xml b/xep-0313.xml index 8a6ddb2c..7538d1a4 100644 --- a/xep-0313.xml +++ b/xep-0313.xml @@ -430,7 +430,7 @@ ]]> -

    If any UID requested by the client in any of the 'before-id', 'after-id' or 'ids' form fields, the server MUST return an item-not-found error in response to the query.

    +

    If any UID requested by the client in any of the 'before-id', 'after-id' or 'ids' form fields is not present in the archive, the server MUST return an item-not-found error in response to the query.

    From 4b020e18f1d579d37566417556f7db0464cb7b1d Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 4 Aug 2020 12:49:04 +0200 Subject: [PATCH 4/9] XEP-0440: Version 0.2.0 of "XEP-0440: SASL Channel-Binding Type Capability" --- xep-0440.xml | 65 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/xep-0440.xml b/xep-0440.xml index bbdbfadf..b54764c3 100644 --- a/xep-0440.xml +++ b/xep-0440.xml @@ -23,6 +23,15 @@ sasl-cb-types &flow; + + 0.2.0 + 2020-08-04 + fs + + Discuss interaction with SASL mechanism and add security considerations. + Recommend implementation of tls-server-end-point. + + 0.1.0 2020-06-14 @@ -88,11 +97,56 @@
    + + +

    Some channel-binding enabled SASL mechanisms reflect the server's + presumed channel-binding abilities back to the server. This prevents + SASL-mechanism stripping attacks, where a Man in the Middle (MITM) + removes certain SASL mechanisms in an attempt to downgrade the + mechanism choosen for authentication to a non-channel-binding enabled + one. An example of a SASL mechanism family with this feature is + &rfc5802;. This standard specifies the gs2-cbind-flag. The flag has a + tristate value of "I don't support channel-binding" (n), "I think you + do not support channel-binding, but I do" (y), or, "Let us use + channel-binding type X" (p).

    + +

    Clients using the information provided + via <sasl-channel-binding/> MAY want to indicate to the server + that they do not support channel-binding (even if they do) if no + mutual supported channel-binding type was found. The only alternative + is, that the client signals the server that he believes that the server + does not support channel binding. But this may cause the server to + terminate the connection, because it indicates a potential ongoing + SASL-mechanism stripping attack.

    + +
    + -

    The author belives that this document itself does not yield any - new security considerations.Hopefully somebody will correct him, in - case he is wrong.

    +

    If a client signals to the server that he does not support + channel binding, because it found no mutual supported + channel-binding types, another MITM attack + vector is introduced. An active attacker could replace the + <sasl-channel-binding;> list with channel bindings unlikely + (or impossible) to be supported by the client. If the client is + configured to use non-channel-binding SASL mechanisms as a fallback, + this could be used to downgrade the connection security. Note that + this attack is a different one than the SASL-mechanism stripping one: + Here the attacker tempers with the announced channel-binding types, + i.e., the values within <sasl-channel-binding;>

    + +

    Depending on the application's security policy, clients may + refrain from falling back to non-channel-binding SASL mechanisms + if no mutual supported channel-binding type is available. + Alternatively, they may try channel-binding with a supported type + nevertheless. To mitigate the attack describe above, clients + could "pin" the announced channel bindings types by a service. In that + case, implementations may want to allow the set of pinned channel-binding + types to be extended to stronger ones.

    + +

    As further mitigation, it is RECOMMENDED to implement the + channel-binding type tls-server-end-point (&rfc5929;) to increase the + probability of a mutual supported channel-binding type.

    @@ -117,7 +171,10 @@

    Thanks to Sam Whited for the discussion about the underlying - issue and incentivizing me to come up with this extension.

    + issue and incentivizing me to come up with this extension. Further + thanks goes to Ruslan N. Marchenko for pointing out the possible + MITM attack vector. Last but not least, Dave Cridland provided + valuable feedback.

    From d08ec2832d09b8851a777a8fc5a2ebf77e3ffd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Tue, 4 Aug 2020 17:43:09 +0200 Subject: [PATCH 5/9] XEP-0313: add revision block --- xep-0313.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xep-0313.xml b/xep-0313.xml index 7538d1a4..2d7ff405 100644 --- a/xep-0313.xml +++ b/xep-0313.xml @@ -28,6 +28,14 @@ &mwild; &ksmith; + + 0.7.1 + 2020-08-04 + rufferson + +

    Fix missing part of sentence to make more sense

    +
    +
    0.7.0 2020-03-20 From f7e43277b8628ce6b650524ca5c2363e058718ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Tue, 4 Aug 2020 17:48:43 +0200 Subject: [PATCH 6/9] XEP-0048: Deprecate in favour of XEP-0402 --- xep-0048.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xep-0048.xml b/xep-0048.xml index ecdb5914..305aed56 100644 --- a/xep-0048.xml +++ b/xep-0048.xml @@ -10,7 +10,7 @@ This specification defines an XML data format for use by XMPP clients in storing bookmarks to mult-user chatrooms and web pages. The chatroom bookmarking function includes the ability to auto-join rooms on login. &LEGALNOTICE; 0048 - Draft + Deprecated Standards Track Standards @@ -19,7 +19,9 @@ XEP-0223 - + + XEP-0402 + bookmarks http://www.xmpp.org/schemas/bookmarks.xsd @@ -32,6 +34,12 @@ &pgmillard; &stpeter; + + 1.2 + 2020-08-04 + XEP Editor (jsc) + Deprecate in favour of XEP-0402 + 1.1 2007-11-07 From 55f7a2073d03bd8710fa3781118800a76a569ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Tue, 4 Aug 2020 17:54:23 +0200 Subject: [PATCH 7/9] XEP-0411: Issue Last Call --- xep-0411.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xep-0411.xml b/xep-0411.xml index 01d9a105..1df087fa 100644 --- a/xep-0411.xml +++ b/xep-0411.xml @@ -10,7 +10,8 @@ This specification describes a method to migrate to PEP based bookmarks without loosing compatibility with client that still use Private XML. &LEGALNOTICE; 0411 - Deferred + Proposed + 2020-08-18 Standards Track Standards Council From 11b4f4ed6708c403f4bf285f53b033b6e204deef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Tue, 4 Aug 2020 17:54:48 +0200 Subject: [PATCH 8/9] XEP-0352: Issue Last Call --- xep-0352.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xep-0352.xml b/xep-0352.xml index 5dff6569..3502747a 100644 --- a/xep-0352.xml +++ b/xep-0352.xml @@ -10,7 +10,8 @@ This document defines a way for the client to indicate its active/inactive state. &LEGALNOTICE; 0352 - Deferred + Proposed + 2020-08-18 2017-12-21 2017-11-15 2017-03-28 From f35b0ace4110cd7771fbbdd80750e8e94ac38922 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 17 Jul 2020 15:43:20 +0200 Subject: [PATCH 9/9] XEP-0004: Clarify field type omission for 'submit' and 'result' form field types The specification was a bit involved about that topic. Hopefully this reformatting text improves the readability. This commit is based on a different patch by Florian Schmaus and hopefully further improves clarity by spelling out all cases clearly in a list, as well as more thoroughly defining corner cases. --- xep-0004.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xep-0004.xml b/xep-0004.xml index 795d3b7b..ed4514c6 100644 --- a/xep-0004.xml +++ b/xep-0004.xml @@ -223,7 +223,12 @@
    <value/>
    The XML character data of this element defines the default value for the field (according to the form-processing entity) in a data form of type "form", the data provided by a form-submitting entity in a data form of type "submit", or a data result in a data form of type "result". In data forms of type "form", if the form-processing entity provides a default value via the <value/> element, then the form-submitting entity SHOULD NOT attempt to enforce a different default value (although it MAY do so to respect user preferences or anticipate expected user input). Fields of type list-multi, jid-multi, text-multi, and hidden MAY contain more than one <value/> element; all other field types MUST NOT contain more than one <value/> element.
    <option/>
    One of the options in a field of type "list-single" or "list-multi". The XML character of the <value/> child defines the option value, and the 'label' attribute defines a human-readable name for the option. The <option/> element MUST contain one and only one <value/> child. If the field is not of type "list-single" or "list-multi", it MUST NOT contain an <option/> element.
    -

    If the <field/> element type is anything other than "fixed" (see below), it MUST possess a 'var' attribute that uniquely identifies the field in the context of the form (if it is "fixed", it MAY possess a 'var' attribute). The <field/> element MAY possess a 'label' attribute that defines a human-readable name for the field. For data forms of type "form", each <field/> element SHOULD possess a 'type' attribute that defines the data "type" of the field data (if no 'type' is specified, the default is "text-single"); fields provided in the context of other forms types MAY possess a 'type' attribute as well. For data forms of type "submit", inclusion of the 'type' attribute is OPTIONAL, since the form-processing entity is assumed to understand the data types associated with forms that it processes.

    +

    If the <field/> element type is anything other than "fixed" (see below), it MUST possess a 'var' attribute that uniquely identifies the field in the context of the form (if it is "fixed", it MAY possess a 'var' attribute). The <field/> element MAY possess a 'label' attribute that defines a human-readable name for the field.

    +

    The 'type' attribute defines the data "type" of the field data. The following rules apply for that attribute:

    +
      +
    • For data forms of type "form", each <field/> element SHOULD possess a 'type' attribute. If the 'type' attribute is absent, the default of "text-single" is to be applied.
    • +
    • For data forms of type "submit", "result" or "error", the recieving entity can infer the 'type' attribute value from context. Nevertheless, the 'type' attribute MAY be present for clarity. Note that forms of type "error" SHOULD NOT have any <field/> elements.
    • +

    If fields are presented in a user interface (e.g., as items in a questionnaire or form result), the order of the field elements in the XML SHOULD determine the order of items presented to the user.