From e3050ef2b841aec1f82596e365e8f4ad2f271ad3 Mon Sep 17 00:00:00 2001 From: "Matthew A. Miller" Date: Tue, 14 Jul 2015 10:09:23 -0600 Subject: [PATCH] XEP-0359 v0.1: Unique and Stable Stanza IDs --- inbox/mid.xml | 108 ------------------------------------------- xep-0359.xml | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ xep.ent | 1 + 3 files changed, 126 insertions(+), 108 deletions(-) delete mode 100644 inbox/mid.xml create mode 100644 xep-0359.xml diff --git a/inbox/mid.xml b/inbox/mid.xml deleted file mode 100644 index 827f6dd0..00000000 --- a/inbox/mid.xml +++ /dev/null @@ -1,108 +0,0 @@ - - -%ents; -]> - - -
- Unique and stable message IDs - This specification describes unique and stable IDs for message stanzas. - - This XMPP Extension Protocol is copyright (c) 1999 - 2014 by the XMPP Standards Foundation (XSF). - 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. - ## 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. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ## - 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 out of the use or inability to use 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. - This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at <http://xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA). - - xxxx - ProtoXEP - Standards Track - Standards - Council - - XMPP Core - - - - NOT_YET_ASSIGNED (suggested: mid) - - Florian - Schmaus - flo@geekplace.eu - flo@geekplace.eu - - - 0.0.1 - 2015-06-01 - fs -

First draft.

-
-
- -

Unique and stable IDs for message stanzas, which are set by a XMPP service, are beneficial in various ways. They can be used together with &xep0313; to uniquely identify a message within an archive. They are also useful in the context of &xep0045; conferences, to identify a message reflected by a MUC service back to the originating entity. And they could be used together with &xep0280;, so that clients are able to retrieve the archive starting from a given message.

-
- -

The herein defined messages IDs must be unique and stable within the scope of the generating XMPP entity.

-
- - - -]]> - The service generates the value of the id attribute. The value must be service local unique and stable, i.e. it MUST NOT change later for some reason. It is RECOMMENDED that the id generating service uses UUID (RFC 4122) to generate the IDs. - - -

- Some use cases require the client to generate the message ID. In this case, the client MUST use "client-id" as attribute name for the ID. -

- - Typical body text - -]]> -

- The server MAY add an 'id' attribute to the message-id element. In that case, it MUST preserve the content of the 'client-id' attribute. -

- - Typical body text - -]]> -

- Otherwise, if the server does not override the ID, it MAY omit the 'client-id' attribute. -

-
-
- -
    -
  1. XMPP entities, which are routing stanzas, MUST NOT strip the message-id element from message stanzas.
  2. -
  3. The values of the 'id' attribute SHOULD be unpredictable.
  4. -
  5. Message ID generating entities, which encounter a <message-id/> element where 'id' and 'client-id' is already set, MUST ignore the existing value of 'id' and override it.
  6. -
  7. &MESSAGE; stanzas MUST posses at most one 'message-id' extension element in the direct child level of the stanza.
  8. -
-
- -

The value of the 'id' attribute should not provide any further information besides the opaque ID itself. Entities observing the value MUST NOT be able to infer any information from it, e.g. the size of the message archive.

-
- -

This document requires no interaction with &IANA;.

-
- - -

The ®ISTRAR; includes "urn:xmpp:mid:0" in its registry of protocol namespaces (see &NAMESPACES;).

-
-
- -

REQUIRED for protocol specifications.

-
- -

Thanks to Thijs Alkemade and Georg Lukas for providing feedback.

-
-
diff --git a/xep-0359.xml b/xep-0359.xml new file mode 100644 index 00000000..2ae633fe --- /dev/null +++ b/xep-0359.xml @@ -0,0 +1,125 @@ + + +%ents; +]> + + +
+ Unique and Stable Stanza IDs + This specification describes unique and stable IDs for stanzas. + &LEGALNOTICE; + 0359 + Experimental + Standards Track + Standards + Council + + XMPP Core + + + + NOT_YET_ASSIGNED (suggested: sid) + + Florian + Schmaus + flo@geekplace.eu + flo@geekplace.eu + + + 0.1 + 2015-07-14 + XEP Editor (mam) +

Initial published version approved by the XMPP Council.

+
+ + 0.0.2 + 2015-06-22 + fs + +
    +
  • Rename the XEP from "Message IDs" to "Stanza IDs"
  • +
  • Add 'by' attribute
  • +
+
+
+ + 0.0.1 + 2015-06-01 + fs +

First draft.

+
+
+ +

Unique and stable IDs for stanzas, which are set by a XMPP service, are beneficial in various ways. They can be used together with &xep0313; to uniquely identify a message within an archive. They are also useful in the context of &xep0045; conferences, in order to identify a message reflected by a MUC service back to the originating entity.

+
+ +

The herein defined stanza IDs must be unique and stable within the scope of the generating XMPP entity.

+
+ + + +]]> + In order to create a 'stanza-id' extension, the creating XMPP entity generates and sets the value of the 'id' attribute, and puts its own JID as value of the 'by' attribute. The value of the 'id' attribute must be unique and stable, i.e. it MUST NOT change later for some reason, within the scope of the 'by' value. Thus the IDs defined in this extension MUST be unique and stable within the scope of the generating XMPP entity. It is RECOMMENDED that the ID generating service uses UUID and the algorithm defined in RFC 4122, to generate the IDs. + + +

+ Some use cases require the client to generate the stanza ID. In this case, the client MUST use 'client-id' as attribute name for the ID. +

+ + Typical body text + +]]> +

+ The server MAY add an 'id' attribute to the stanza-id element. In that case, it MUST preserve the content of the 'client-id' attribute. +

+ + Typical body text + +]]> +

+ Otherwise, if the server does not override the ID, it MAY omit the 'client-id' attribute. +

+
+
+ +
    +
  1. XMPP entities, which are routing stanzas, MUST NOT strip stanza-id elements from message stanzas.
  2. +
  3. The values of the 'id' (and 'client-id') attribute SHOULD be unpredictable.
  4. +
  5. Stanza ID generating entities, which encounter a <stanza-id/> element where 'id' (and 'client-id') is already set and where the 'by' attribute matches their own JID, MUST ignore the existing value of 'id' and override it.
  6. +
  7. Stanzas MUST posses, in the direct child level of the stanza, at most one 'stanza-id' extension element with the same JID as value of the 'by' attribute.
  8. +
  9. Stanza ID extension elements which have a 'id' attribute MUST also have the 'by' attribute set.
  10. +
  11. Stanza ID extension elements MUST either posses a 'id' attribute, a 'client-id' attribute or both.
  12. +
  13. The value of the 'by' attribute MUST be a normalized JID as defined in &rfc6122;
  14. +
+
+ +

The value of the 'id' attribute should not provide any further information besides the opaque ID itself. Entities observing the value MUST NOT be able to infer any information from it, e.g. the size of the message archive. The value of 'id' and 'client-id' MUST be considered as non-secret values.

+
+ +

This document requires no interaction with &IANA;.

+
+ + +

The ®ISTRAR; includes "urn:xmpp:sid:0" in its registry of protocol namespaces (see &NAMESPACES;).

+
+
+ +

REQUIRED for protocol specifications.

+
+ +

Thanks to Thijs Alkemade and Georg Lukas for providing feedback.

+
+
diff --git a/xep.ent b/xep.ent index 4629f6bd..a408a60f 100644 --- a/xep.ent +++ b/xep.ent @@ -1339,3 +1339,4 @@ IANA Service Location Protocol, Version 2 (SLPv2) Templates Privileged Entity (XEP-0356) XEP-0356: Privileged Entity <http://xmpp.org/extensions/xep-0356.html>." > Push (XEP-0357) XEP-0357: Push <http://xmpp.org/extensions/xep-0357.html>." > Publishing Available Jingle Sessions (XEP-0358) XEP-0358: Publishing Available Jingle Sessions <http://xmpp.org/extensions/xep-0358.html>." > +Unique and Stable Stanza IDs (XEP-0359) XEP-0359: Unique and Stable Stanza IDs <http://xmpp.org/extensions/xep-0359.html>." >