No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0334.xml 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Message Processing Hints</title>
  10. <abstract>This document defines a way to include hints to entities routing or receiving a message.</abstract>
  11. &LEGALNOTICE;
  12. <number>0334</number>
  13. <status>Deferred</status>
  14. <lastcall>2017-03-01</lastcall>
  15. <lastcall>2017-02-22</lastcall>
  16. <type>Standards Track</type>
  17. <sig>Standards</sig>
  18. <approver>Council</approver>
  19. <dependencies>
  20. <spec>XMPP Core</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>hints</shortname>
  25. &mwild;
  26. <revision>
  27. <version>0.3.0</version>
  28. <date>2018-01-25</date>
  29. <initials>XEP Editor (jwi)</initials>
  30. <remark>Defer due to lack of activity.</remark>
  31. </revision>
  32. <revision>
  33. <version>0.2</version>
  34. <date>2015-09-01</date>
  35. <initials>dg</initials>
  36. <remark>
  37. <p>Fixed the wrong use of no-storage instead of no-store</p>
  38. <p>Added a message hint &lt;store/&gt;</p>
  39. </remark>
  40. </revision>
  41. <revision>
  42. <version>0.1</version>
  43. <date>2013-07-11</date>
  44. <initials>psa</initials>
  45. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  46. </revision>
  47. <revision>
  48. <version>0.0.1</version>
  49. <date>2013-06-18</date>
  50. <initials>mw</initials>
  51. <remark><p>First draft.</p></remark>
  52. </revision>
  53. </header>
  54. <section1 topic='Introduction' anchor='intro'>
  55. <p>Message types ('normal', 'chat', 'headline', etc.) provide an existing framework for determining how an entity should deliver or handle a message. For example &xmppim; defines that messages of type 'headline' should not be stored offline by the server, and that messages of type 'groupchat' must not be directed to other resources.</p>
  56. <p>However this framework of rules is quite inflexible, and new extensions are being developed that push at the boundaries of what is capable of. This specification defines a more flexible approach that allows the sender to add finer-grained 'hints' to messages, which can be used as a generic mechanism for XMPP entities to handle messages.</p>
  57. <p>A similar but much more extensive framework is defined in &xep0079; for applications that need it.</p>
  58. </section1>
  59. <section1 topic='Requirements' anchor='reqs'>
  60. <p>This specification aims to solve the following common problems, and allow a sender to hint to
  61. the recipient:</p>
  62. <ul>
  63. <li>Whether to store a message (e.g. for archival or as an 'offline message').</li>
  64. <li>Whether to copy a message to other resources.</li>
  65. <li>Whether to store a message that would not have been stored under normal conditions</li>
  66. </ul>
  67. </section1>
  68. <section1 topic='Use Cases' anchor='usecases'>
  69. <section2 topic="Session-based stanzas" anchor='usecases-session'>
  70. <p>Suppose that Romeo and Juliet are avoiding the surveillance of Prince Escalus and communicating using a session-based
  71. encryption protocol between their laptops. In order to prevent Juliet's tablet computer that uses &xep0280; from receiving
  72. copies of the encrypted messages (and not being able to decrypt them), Romeo inserts the &lt;no-copy/&gt; hint into the
  73. messages he sends. Since it is also useless for these messages to be archived, he additionally adds the &lt;no-store/&gt;
  74. hint:</p>
  75. <example caption='Sending a message with no-copy and no-store hints'><![CDATA[
  76. <message
  77. from='romeo@montague.lit/laptop'
  78. to='juliet@capulet.lit/laptop'>
  79. <body>V unir avtug'f pybnx gb uvqr zr sebz gurve fvtug</body>
  80. <no-copy xmlns="urn:xmpp:hints"/>
  81. <no-store xmlns="urn:xmpp:hints"/>
  82. </message>
  83. ]]></example>
  84. </section2>
  85. <section2 topic="Notifications" anchor='usecases-notification'>
  86. <p>Some automated notifications may be transient, and there would be no purpose in delaying their delivery. Such
  87. messages may be marked with the &lt;no-store/&gt; hint.</p>
  88. </section2>
  89. <section2 topic="Sensitive messages" anchor='usercases-sensitive'>
  90. <p>A sender may want to indicate their preference to have no permanent record of a message (also known as "off the
  91. record" messages), but may be happy for it to be stored temporarily as a normal part of delivery (e.g. if the
  92. recipient is offline at the time of sending). Such a message can be marked with the &lt;no-permanent-store/&gt; hint.
  93. </p>
  94. </section2>
  95. <section2 topic="Storage-worthy messages" anchor='store-worthy'>
  96. <p>Offline storage and &xep0313; can define their own rules on what messages to store and usually only store messages that contain a body element. However a sender may want to indicate that a message is worth storeing even though it might not match those rules (e.g. an encrypted message that carries the payload outside the body element). Such a message can be marked with a &lt;store/&gt; hint.</p>
  97. </section2>
  98. </section1>
  99. <section1 topic="Hints" anchor="hints">
  100. <section2 topic="No permanent store" anchor="no-permanent-store">
  101. <p>The &lt;no-permanent-store/&gt; hint informs entities that they shouldn't store the message in
  102. any permanent or semi-permanent public or private archive (such as described in &xep0136; and &xep0313;)
  103. or in logs (such as chatroom logs).
  104. </p>
  105. </section2>
  106. <section2 topic="No store" anchor="no-store">
  107. <p>A message containing a &lt;no-store/&gt; hint should not be stored by a server either permanently (as above)
  108. or temporarily, e.g. for later delivery to an offline client, or to users not currently present in a chatroom.
  109. </p>
  110. </section2>
  111. <section2 topic="No copies" anchor="no-copy">
  112. <p>Messages with the &lt;no-copy/&gt; hint should not be copied to addresses other than the one to which it is
  113. addressed, for example through &xep0280;.</p>
  114. <p>This hint MUST only be included on messages addressed to full JIDs and explicitly does not override the behaviour
  115. defined in &xmppim; for handling messages to bare JIDs, which may involve copying to multiple resources, or multiple
  116. occupants in a &xep0045; room.
  117. </p>
  118. </section2>
  119. <section2 topic="Store">
  120. <p>A message containing the &lt;store/&gt; hint that is not of type 'error' SHOULD be stored by the entity.</p>
  121. </section2>
  122. </section1>
  123. <section1 topic='Business Rules' anchor='rules'>
  124. <p>It is important to note that message hints are, as the name implies, just hints. Implementations
  125. MUST NOT rely on other entities interpretation of the hints for any particular purpose.</p>
  126. </section1>
  127. <section1 topic='Security Considerations' anchor='security'>
  128. <p>This specification introduces no known security considerations.</p>
  129. </section1>
  130. <section1 topic='IANA Considerations' anchor='iana'>
  131. <p>This document requires no interaction with &IANA;.</p>
  132. </section1>
  133. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  134. <p>This document requires no interaction with &REGISTRAR;.</p>
  135. </section1>
  136. <section1 topic='XML Schema'>
  137. <code><![CDATA[
  138. <?xml version='1.0' encoding='UTF-8'?>
  139. <xs:schema
  140. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  141. targetNamespace='urn:xmpp:hints'
  142. xmlns='urn:xmpp:hints'
  143. elementFormDefault='qualified'>
  144. <xs:element name='no-permanent-store' type='empty'/>
  145. <xs:element name='no-store' type='empty'/>
  146. <xs:element name='no-copy' type='empty'/>
  147. <xs:element name='store' type='empty'/>
  148. <xs:simpleType name='empty'>
  149. <xs:restriction base='xs:string'>
  150. <xs:enumeration value=''/>
  151. </xs:restriction>
  152. </xs:simpleType>
  153. </xs:schema>
  154. ]]></code>
  155. </section1>
  156. </xep>