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-0186.xml 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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>Invisible Command</title>
  10. <abstract>This document specifies an XMPP protocol extension for user invisibility.</abstract>
  11. &LEGALNOTICE;
  12. <number>0186</number>
  13. <status>Proposed</status>
  14. <lastcall>2017-12-21</lastcall>
  15. <lastcall>2017-12-12</lastcall>
  16. <type>Standards Track</type>
  17. <sig>Standards</sig>
  18. <dependencies>
  19. <spec>XMPP Core</spec>
  20. <spec>XMPP IM</spec>
  21. <spec>XEP-0030</spec>
  22. </dependencies>
  23. <supersedes>
  24. <spec>XEP-0018</spec>
  25. <spec>XEP-0126</spec>
  26. </supersedes>
  27. <supersededby/>
  28. <shortname>invisible</shortname>
  29. &stpeter;
  30. <revision>
  31. <version>0.13</version>
  32. <date>2017-11-29</date>
  33. <initials>psa</initials>
  34. <remark><p>Addressed Last Call feedback: (1) clarified conformance requirements for 'probe' attribute and (2) removed text about using the same server backend for privacy lists because XEP-0016 is now deprecated.</p></remark>
  35. </revision>
  36. <revision>
  37. <version>0.12</version>
  38. <date>2017-01-28</date>
  39. <initials>psa</initials>
  40. <remark><p>Added method for specifying server behavior regarding presence probes via new 'probe' attribute; incremented the protocol version number from 0 to 1.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.11</version>
  44. <date>2012-06-27</date>
  45. <initials>psa</initials>
  46. <remark><p>Clarified handling of directed presence while in invisible state.</p></remark>
  47. </revision>
  48. <revision>
  49. <version>0.10</version>
  50. <date>2012-05-29</date>
  51. <initials>psa</initials>
  52. <remark><p>Further clarified server and client handling of stanzas during an invisibility session; updated RFC references.</p></remark>
  53. </revision>
  54. <revision>
  55. <version>0.9</version>
  56. <date>2008-10-07</date>
  57. <initials>psa</initials>
  58. <remark><p>Further clarified server and client handling of stanzas during an invisibility session.</p></remark>
  59. </revision>
  60. <revision>
  61. <version>0.8</version>
  62. <date>2008-10-06</date>
  63. <initials>psa</initials>
  64. <remark><p>Modified namespace to incorporate namespace versioning.</p></remark>
  65. </revision>
  66. <revision>
  67. <version>0.7</version>
  68. <date>2008-05-12</date>
  69. <initials>psa</initials>
  70. <remark><p>Added note about integration with privacy lists; removed XEP-0126 from list of protocols that this specification supersedes; changed temporary namespace to conform to XMPP Registrar procedures; copied several security considerations from XEP-0126.</p></remark>
  71. </revision>
  72. <revision>
  73. <version>0.6</version>
  74. <date>2007-09-05</date>
  75. <initials>psa</initials>
  76. <remark><p>Clarified that this specification is intended to supersede XEP-0018 and XEP-0126; added several additional examples.</p></remark>
  77. </revision>
  78. <revision>
  79. <version>0.5</version>
  80. <date>2007-01-30</date>
  81. <initials>psa</initials>
  82. <remark><p>Modified XML namespace name to conform to XEP-0053 processes.</p></remark>
  83. </revision>
  84. <revision>
  85. <version>0.4</version>
  86. <date>2006-08-09</date>
  87. <initials>psa</initials>
  88. <remark><p>Added XMPP Registrar considerations and XML schema.</p></remark>
  89. </revision>
  90. <revision>
  91. <version>0.3</version>
  92. <date>2006-08-02</date>
  93. <initials>psa</initials>
  94. <remark><p>Added inbound presence rule to server handling section.</p></remark>
  95. </revision>
  96. <revision>
  97. <version>0.2</version>
  98. <date>2006-07-07</date>
  99. <initials>psa</initials>
  100. <remark><p>Clarified that invisibility mode does not carry across sessions.</p></remark>
  101. </revision>
  102. <revision>
  103. <version>0.1</version>
  104. <date>2006-05-30</date>
  105. <initials>psa</initials>
  106. <remark><p>Initial version.</p></remark>
  107. </revision>
  108. <revision>
  109. <version>0.0.2</version>
  110. <date>2006-05-15</date>
  111. <initials>psa</initials>
  112. <remark><p>Recommended delivery of messages sent to bare JID.</p></remark>
  113. </revision>
  114. <revision>
  115. <version>0.0.1</version>
  116. <date>2006-05-11</date>
  117. <initials>psa</initials>
  118. <remark><p>First draft.</p></remark>
  119. </revision>
  120. </header>
  121. <section1 topic='Introduction' anchor='intro'>
  122. <p>Some XMPP-based instant messaging systems have long supported the ability for users to be online but to appear offline to other users. This "invisibility" feature was previously defined in nonstandard or complicated ways via &xep0018; and &xep0126; (the latter was a profile of &xep0016;, which is now deprected). By contrast, this specification defines a standards-compliant protocol extension that can be used over the long term, using an IQ-based protocol that enables an IM user to become "invisible" and "visible" at will within the context of a given session.</p>
  123. </section1>
  124. <section1 topic='Requirements' anchor='req'>
  125. <p>The requirements for invisible mode are straightforward:</p>
  126. <ol start='1'>
  127. <li>A user can become visible or invisible at any time within an XMPP session.</li>
  128. <li>Invisible mode is active only for the current session; if the user ends that session and starts another session, the invisibility mode set for the previous session does not carry over to the new session.</li>
  129. <li>When in invisible mode, a user can send messages and directed presence to particular contacts.</li>
  130. </ol>
  131. </section1>
  132. <section1 topic='Use Cases' anchor='usecases'>
  133. <section2 topic='User Becomes Invisible' anchor='invisible'>
  134. <p>In order for a client to go invisible, it sends an IQ-set with no 'to' address (thus handled by the user's server) containing an &lt;invisible/&gt; element qualified by the 'urn:xmpp:invisible:1' namespace &VNOTE;.</p>
  135. <p>The &lt;invisible/&gt; element SHOULD include a 'probe' attribute, which specifies whether the server shall or shall not send presence probes to entities in the user's roster (thus determining whether the user does or does not automatically receive presence notifications from contacts). This attribute is a boolean &BOOLEANNOTE;, where a logical value of TRUE (lexical value of "true" or "1") indicates that the server shall send presence probes and where a logical value of FALSE (lexical value of "false" or "0") indicates that the server shall not send presence probes. The default logical value is FALSE.</p>
  136. <example caption='Invisible command with indication to send presence probes'><![CDATA[
  137. <iq from='bilbo@tolkien.example/shire'
  138. id='d1s4pp34r1'
  139. type='set'>
  140. <invisible probe='true' xmlns='urn:xmpp:invisible:1'/>
  141. </iq>
  142. ]]></example>
  143. <p>Although the default value is false (thus protecting the user from leaking presence information), the client SHOULD always include the 'probe' attribute.</p>
  144. <example caption='Invisible command with indication to not send presence probes'><![CDATA[
  145. <iq from='bilbo@tolkien.example/shire'
  146. id='d1s4pp34r2'
  147. type='set'>
  148. <invisible probe='false' xmlns='urn:xmpp:invisible:1'/>
  149. </iq>
  150. ]]></example>
  151. <p>If the server can successfully process the invisible command, it MUST return an IQ-result.</p>
  152. <example caption='Invisible command is successful'><![CDATA[
  153. <iq to='bilbo@tolkien.example/shire'
  154. id='d1s4pp34r2'
  155. type='result'/>
  156. ]]></example>
  157. <p>(Standard XMPP stanza errors apply; see <cite>RFC 6120</cite>.)</p>
  158. <p>When the client enters invisible mode during a presence session (i.e., after having previously sent undirected available presence with no 'type' attribute), the server MUST send &UNAVAILABLE; from the specified resource to all contacts who would receive unavailable presence if the client itself were to send &UNAVAILABLE;.</p>
  159. <p>The following sections define server and client handling of inbound and outbound XML stanzas while the client is invisible.</p>
  160. <section3 topic='Server Handling' anchor='invisible-server'>
  161. <p>While the client is in invisible mode, the server:</p>
  162. <ol start='1'>
  163. <li><p>MUST NOT broadcast outbound presence notifications as a result of receiving any subsequent undirected presence notifications from the client.</p></li>
  164. <li><p>MUST deliver outbound directed presence stanzas generated by the client.</p></li>
  165. <li><p>MUST generate or not generate outbound presence probes in accordance with the value of the 'probe' attribute.</p></li>
  166. <li><p>MUST deliver inbound &PRESENCE; stanzas.</p></li>
  167. <li><p>SHOULD deliver inbound &MESSAGE; stanzas whose 'to' address is the bare JID &LOCALBARE; of the user (subject to standard XMPP stanza handling rules from <cite>RFC 6120</cite> and <cite>RFC 6121</cite>).</p></li>
  168. <li><p>MUST deliver inbound &MESSAGE; and &IQ; stanzas whose 'to' address is the full JID &LOCALFULL; corresponding to the resource of the client.</p></li>
  169. <li><p>MUST deliver outbound &MESSAGE; and &IQ; stanzas generated by the client (for an important note regarding presence leaks, see the <link url='#security'>Security Considerations</link> section of this document).</p></li>
  170. <li>
  171. <p>If there are no other available resources, MUST respond to all IQ-get requests and presence probes sent to the account's bare JID as if the account were offline; this includes but is not limited to the following:</p>
  172. <ul>
  173. <li>If the server responds to a presence probe, the last available presence MUST indicate that the user is unavailable, and if a time is indicated it MUST be the time when the client went invisible.</li>
  174. <li>If the server responds to a &xep0012; request, the last activity time MUST be the time when the client went invisible.</li>
  175. <li>If the server responds to a &xep0030; items request, the response MUST NOT include the invisible resource as one of the account's available items.</li>
  176. </ul>
  177. </li>
  178. <li><p>If after sending directed presence the client then sends &UNAVAILABLE;, the server MUST deliver that unavailable presence only to the entities to which the client sent directed presence after going invisible.</p></li>
  179. </ol>
  180. </section3>
  181. <section3 topic='Client Handling' anchor='invisible-client'>
  182. <p>While the client is in invisible mode, it is suggested that the client behave as follows:</p>
  183. <ul>
  184. <li><p>Maintain a temporary list of entities with which communication is allowed and prompt the user before adding any entity to that "communicants list" for this invisibility session; for user convenience, this list might be auto-populated with trusted entities if so configured by the user.</p></li>
  185. <li><p>Prompt the user before sending any outbound traffic (message, presence, or IQ stanza) to another user, even if the user generated such traffic; upon receiving authorization from the user, the client might then add the authorized entity to the communicants list for this invisibility session.</p></li>
  186. </ul>
  187. </section3>
  188. </section2>
  189. <section2 topic='User Becomes Visible' anchor='visible'>
  190. <p>In order for a client to become visible again, it sends an IQ-set with no 'to' address (thus handled by the user's server) containing a &lt;visible/&gt; element qualified by the 'urn:xmpp:invisible:1' namespace &VNOTE;.</p>
  191. <example caption='Visible command'><![CDATA[
  192. <iq from='bilbo@tolkien.example/shire'
  193. id='r34pp34r'
  194. type='set'>
  195. <visible xmlns='urn:xmpp:invisible:1'/>
  196. </iq>
  197. ]]></example>
  198. <p>If the server can successfully process the visibility command, it MUST return an IQ-result.</p>
  199. <example caption='Visible command is successful'><![CDATA[
  200. <iq to='bilbo@tolkien.example/shire'
  201. id='r34pp34r'
  202. type='result'/>
  203. ]]></example>
  204. <p>When the client becomes visible, the server MUST treat that state as equivalent to an active session before receiving initial presence from the client, with one exception: if the client sent directed presence to any entities while in the invisible state, the server MUST treat those entities as under point 2 of Section 4.6.3 of RFC 6121 (i.e., the server MUST ensure that it sends unavailable presence to those entities if the client subsequently goes offline after becoming visible).</p>
  205. <p>If the user wishes to then send presence to all contacts in the roster, it is the responsibility of the client to send an undirected available presence notification to the server.</p>
  206. <example caption='Client sends available presence for roster broadcast'><![CDATA[
  207. <presence/>
  208. ]]></example>
  209. <p>The server would then broadcast that presence notification to all entities who would normally receive presence broadcasts from the client (the server MAY also send that notification to any entities to which the client sent directed presence while invisible, whether or not they are in the user's roster).</p>
  210. </section2>
  211. </section1>
  212. <section1 topic='Discovering Support' anchor='support'>
  213. <p>In order for a client to discover whether its server supports the invisible command, it sends a &xep0030; information request to the server:</p>
  214. <example caption='Service discovery request'><![CDATA[
  215. <iq from='bilbo@tolkien.example/shire'
  216. id='d1sc0v3ry'
  217. to='tolkien.example'
  218. type='get'>
  219. <query xmlns='http://jabber.org/protocol/disco#info'/>
  220. </iq>
  221. ]]></example>
  222. <p>If the server supports the invisible command, it MUST return a feature of "urn:xmpp:invisible:1" &VNOTE;.</p>
  223. <example caption='Service discovery response'><![CDATA[
  224. <iq from='tolkien.example'
  225. id='d1sc0v3ry'
  226. to='bilbo@tolkien.example/shire'
  227. type='result'>
  228. <query xmlns='http://jabber.org/protocol/disco#info'>
  229. <feature var='urn:xmpp:invisible:1'/>
  230. </query>
  231. </iq>
  232. ]]></example>
  233. <p>A client SHOULD complete this service discovery process before sending initial presence to its server (as specified in &xep0115;, a server can include entity capabilities information in a stream feature, which obviates the need for explicit service discovery as shown above).</p>
  234. </section1>
  235. <section1 topic='Interoperability Considerations' anchor='interop'>
  236. <p>Implementers need to be aware that use of the 'probe' attribute is not consistent with the older privacy lists approach defined in XEP-0126.</p>
  237. </section1>
  238. <section1 topic='Security Considerations' anchor='security'>
  239. <p>No matter how it is implemented, invisibility can be defeated and presence leaks can occur without careful stanza handling on the part of the server and the client. Use of the protocol defined here does not necessarily prevent presence leaks, either technically or socially (e.g., if the user reveals his presence to one contact but not another and those contacts are in communication).</p>
  240. </section1>
  241. <section1 topic='IANA Considerations' anchor='iana'>
  242. <p>No interaction with &IANA; is required as a result of this document.</p>
  243. </section1>
  244. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  245. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  246. <p>This specification defines the following XML namespace:</p>
  247. <ul>
  248. <li>urn:xmpp:invisible:1</li>
  249. </ul>
  250. <p>Upon advancement of this specification from a status of Experimental to a status of Draft, the &REGISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  251. </section2>
  252. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  253. &NSVER;
  254. </section2>
  255. </section1>
  256. <section1 topic='XML Schema' anchor='schema'>
  257. <code><![CDATA[
  258. <?xml version='1.0' encoding='UTF-8'?>
  259. <xs:schema
  260. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  261. targetNamespace='urn:xmpp:invisible:1'
  262. xmlns='urn:xmpp:invisible:1'
  263. elementFormDefault='qualified'>
  264. <xs:element name='invisible'>
  265. <xs:complexType>
  266. <xs:simpleContent>
  267. <xs:extension base='empty'>
  268. <xs:attribute name='probe'
  269. type='xs:boolean'
  270. use='optional'
  271. default='false'/>
  272. </xs:extension>
  273. </xs:simpleContent>
  274. </xs:complexType>
  275. </xs:element>
  276. <xs:element name='visible' type='empty'/>
  277. <xs:simpleType name='empty'>
  278. <xs:restriction base='xs:string'>
  279. <xs:enumeration value=''/>
  280. </xs:restriction>
  281. </xs:simpleType>
  282. </xs:schema>
  283. ]]></code>
  284. </section1>
  285. <section1 topic='Acknowledgements' anchor='ack'>
  286. <p>Thanks to Philipp Hancke, Evgeny Khramtsov, Ruslan Marchenko, Kevin Smith, and Matthew Wild for their feedback.</p>
  287. </section1>
  288. </xep>