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-0132.xml 15KB

  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>Presence Obtained via Kinesthetic Excitation (POKE)</title>
  10. <abstract>This document defines an XMPP protocol extension that enables probing for presence via physical rather than electronic means.</abstract>
  12. <number>0132</number>
  13. <status>Active</status>
  14. <type>Humorous</type>
  15. <sig>None</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XMPP IM</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>poke</shortname>
  23. &stpeter;
  24. &hildjj;
  25. <revision>
  26. <version>1.0</version>
  27. <date>2004-04-01</date>
  28. <initials>psa</initials>
  29. <remark><p>April Fools!</p></remark>
  30. </revision>
  31. </header>
  32. <section1 topic='Introduction' anchor='intro'>
  33. <p>&xmppcore; and &xmppim; define methods for exchanging information about a person's network availability via the XML &lt;presence/&gt; stanza. In general, such presence information is generated only when a person initiates interaction with a client, although it can be generated programmatically through features such as auto-away. However, sometimes a user is present in the vicinity of a client but is not actively engaged with the client interface. In such circumstances, it would be helpful to have a mechanism that is sometimes referred to as &lt;presence type='probe-irl'/&gt;: the ability to invoke a real-life means of determining the physical presence of the user. This document defines just such a mechanism.</p>
  34. </section1>
  35. <section1 topic='Approach' anchor='approach'>
  36. <p>Physical presence is best determined through direct interaction with an object. In this document, our approach is labelled "kinesthetic excitation": some form of physical contact is initiated with the object (in most cases a user), resulting in hard evidence of presence obtained by a sense modality such as sight, touch, or hearing. To ensure reliability, the physical contact MUST impinge upon the object or user to such an extent that it measurably reacts in the form of motion through space (e.g., moving in relation to a visual observation device), generation of an auditory event (e.g., vocalization), and the like. The exact means of excitation and perception are implementation-specific and therefore not specified fully in this document, although suggestions are provided in the <link url="#protocol-methods">Methods</link> section below.</p>
  37. </section1>
  38. <section1 topic='Protocol' anchor='protocol'>
  39. <p>In the past, some members of the Jabber community have suggested the addition of a new presence type: "probe-irl". However, this has several drawbacks. First, the XMPP specifications (<cite>XMPP Core</cite> and <cite>XMPP IM</cite>) approved by the IETF do not allow any values for the 'type' attribute other than those defined in the XML schemas for the 'jabber:client' and 'jabber:server' namespaces. Second, presence probes are handled by a server on behalf of a user and therefore are not routed to clients (which presumably often have the best opportunity for discovering evidence of physical presence); an &IQ; stanza is more appropriate for client-to-client information exchange. Therefore, this document defines a general extension mechanism that can be used in both &PRESENCE; and &IQ; stanzas.</p>
  40. <p>The extension mechanism is encapsulated in a &lt;poke/&gt; element qualified by the '' namespace; this element MAY be included as a direct child of a &PRESENCE; stanza of type "probe" or an &IQ; stanza of type "get" (for a request), "result" (for a successful response), or "error" (for an unsuccessful response).</p>
  41. <p>The requesting entity MAY specify a preferred method of excitation and observation; in general, these methods correspond to particular sense modalities such as sight, touch, and hearing (see the <link url="#protocol-methods">Methods</link> section below).</p>
  42. <section2 topic='Presence' anchor='protocol-presence'>
  43. <p>As defined in <cite>XMPP IM</cite>, presence stanzas of type "probe" are handled on behalf of the target entity by the entity's server. While normally these presence stanzas are generated by the requesting entity's server (e.g., when the requesting entity sends initial presence), the requesting entity itself (or, more precisely, its client) is allowed to generate presence stanzas of type "probe". In this document we make use of this ability to query the target entity's server regarding the entity's physical presence.</p>
  44. <p>In the following example, a star-crossed lover pokes the server of his beloved to determine her physical presence (notice that the value of 'to' address lacks a resource identifier and therefore is a bare JID, not a full JID).</p>
  45. <example caption='Poking via the server'><![CDATA[
  46. <presence
  47. type='probe'
  48. from=''
  49. to=''
  50. id='poke1'>
  51. <poke xmlns=''/>
  52. </presence>
  53. ]]></example>
  54. <p>If the user's server does not support the POKE protocol, it SHOULD ignore the extension and treat the presence stanza as a normal (non-IRL) presence probe. However, the user's server MAY return a "Service Unavailable" error to the requesting entity to inform the requesting entity that IRL probes are not supported (for details regarding error syntax, refer to &xep0086;):</p>
  55. <example caption='Server returns service unavailable error'><![CDATA[
  56. <presence
  57. type='error'
  58. from=''
  59. to=''
  60. id='poke1'>
  61. <poke xmlns=''/>
  62. <error code='503' type='cancel'>
  63. <service-unavailable
  64. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  65. </error>
  66. </presence>
  67. ]]></example>
  68. <p>If the user's server supports the POKE protocol, it MUST first perform appropriate access checks to determine if the requesting entity has permission to view the user's presence (e.g., by checking presence subscriptions and privacy lists). If the user's server determines that the requesting entity is not allowed to learn the user's physical presence information, it MUST return a "Forbidden" error:</p>
  69. <example caption='Server returns forbidden error'><![CDATA[
  70. <presence
  71. type='error'
  72. from=''
  73. to=''
  74. id='poke1'>
  75. <poke xmlns=''/>
  76. <error code='403' type='auth'>
  77. <forbidden
  78. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  79. </error>
  80. </presence>
  81. ]]></example>
  82. <p>If the requesting entity has permission to discover the user's physical presence, the server SHOULD attempt to determine if the user is physically present. Methods for doing so are implementation-specific and therefore out of scope for this document, but possible mechanisms might include:</p>
  83. <ol>
  84. <li>sending messages to contacts in the user's roster who would be likely to have knowledge of the user's whereabouts (perhaps derived from physical proximity information gleaned from &xep0054; or &xep0080; data)</li>
  85. <li>generating an IQ "get" in the 'poke' namespace to each of the user's connected resources</li>
  86. <li>sending specialized commands to each of the user's connected resources using &xep0050;</li>
  87. </ol>
  88. <p>If the server determines that the user is physically present in the vicinity of a client, it SHOULD return that information to the requesting entity, including the appropriate resource:</p>
  89. <example caption='Server returns success'><![CDATA[
  90. <presence
  91. from=''
  92. to=''
  93. id='poke1'>
  94. <poke xmlns=''/>
  95. </presence>
  96. ]]></example>
  97. <p>The server SHOULD NOT wait an inordinate amount of time before returning the presence information (e.g., usually not more than two minutes), but the timeout period SHOULD be configurable. If the request times out, the server SHOULD return a "Request Timeout" error to the requesting entity:</p>
  98. <example caption='Server returns request timeout error'><![CDATA[
  99. <presence
  100. type='error'
  101. from=''
  102. to=''
  103. id='poke1'>
  104. <poke xmlns=''/>
  105. <error code='408' type='wait'>
  106. <remote-server-timeout
  107. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  108. </error>
  109. </presence>
  110. ]]></example>
  111. <p>The server SHOULD NOT return a "Not Found" error unless the user does not exist. If the server determines that the user has died, it MAY return a "Gone" error with appropriate descriptive text, although it SHOULD wait to do so pending notification of next-of-kin; note well that such notification is out of scope for this document (though this seems like a sensible application of the &xep0060; protocol):</p>
  112. <example caption='Server returns gone error'><![CDATA[
  113. <presence
  114. type='error'
  115. from=''
  116. to=''
  117. id='poke1'>
  118. <poke xmlns=''/>
  119. <error code='302' type='cancel'>
  120. <gone xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  121. <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
  122. Please accept our condolences: the user you are
  123. trying to reach has died.
  124. </text>
  125. </error>
  126. </presence>
  127. ]]></example>
  128. </section2>
  129. <section2 topic='IQ' anchor='protocol-iq'>
  130. <p>If the requesting entity knows at least one resource with which the user is currently connected, it MAY send an IQ to the user's full JID (&lt;user@host/resource&gt;) instead of sending a probe to the user's server.</p>
  131. <example caption='Poking via the client'><![CDATA[
  132. <iq type='get'
  133. from=''
  134. to=''
  135. id='poke2'>
  136. <poke xmlns=''
  137. method='taste'/>
  138. </iq>
  139. ]]></example>
  140. <p>The same errors as shown above for presence stanzas SHOULD be used by clients responding to IQ stanzas containing POKE protocols (e.g., "Request Timeout" if the user cannot be found in some reasonable period of time), and therefore are not repeated here.</p>
  141. <p>Note that the preceding example includes the optional 'method' attribute. If the target entity does not support the specified method, it MAY return a "Feature Not Implemented" error:</p>
  142. <example caption='Client returns feature not implemented error'><![CDATA[
  143. <iq type='error'
  144. from=''
  145. to=''
  146. id='poke1'>
  147. <poke xmlns=''/>
  148. <error code='501' type='cancel'>
  149. <feature-not-implemented
  150. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  151. </error>
  152. </iq>
  153. ]]></example>
  154. <p>Alternatively, it MAY choose to use some other method that it does implement, in which case it SHOULD specify the method used in the IQ result (this is the recommended behavior).</p>
  155. <p>If the client determines that the user is physically present, it SHOULD return presence to the requesting entity (subject to privacy lists and any other appropriate access controls):</p>
  156. <example caption='Client returns success'><![CDATA[
  157. <iq type='result'
  158. from=''
  159. to=''
  160. id='poke1'>
  161. <poke xmlns=''
  162. method='touch'/>
  163. </iq>
  164. ]]></example>
  165. </section2>
  166. <section2 topic='Methods' anchor='protocol-methods'>
  167. <p>The following values of the 'method' attribute are defined and SHOULD be supported by a compliant implementation:</p>
  168. <dl>
  169. <di><dt>dna</dt><dd>The physical presence of the target entity shall be determined by means of DNA testing; for example, the user's client may take a hair or skin sample from the user (not recommended if the testing time is inordinately long).</dd></di>
  170. <di><dt>infrared</dt><dd>The physical presence of the target entity shall be determined by means of infrared wavelengths; for example, the user's client may scan the area for the telltale heat signature of the user.</dd></di>
  171. <di><dt>sight</dt><dd>The physical presence of the target entity shall be determined by means of sight; for example, the user's client may flash a strobe light that draws the user within the range of visual observation (note: this method is limited to visual wavelengths).</dd></di>
  172. <di><dt>smell</dt><dd>The physical presence of the target entity shall be determined by means of olfaction; for example, the user's client may produce a stench known to make the user nervous and sweaty.</dd></di>
  173. <di><dt>sound</dt><dd>The physical presence of the target entity shall be determined by means of sound; for example, the user's client may generate a sound so annoying that when the user hears it, he or she reacts vocally in the form of a yell, scream, or imprecation.</dd></di>
  174. <di><dt>taste</dt><dd>The physical presence of the target entity shall be determined by means of taste; for example, the user's client may extend a device that licks the user's skin.</dd></di>
  175. <di><dt>touch</dt><dd>The physical presence of the target entity shall be determined by means of bodily contact; for example, the user's client may extend a probe that comes into contact with the user's body.</dd></di>
  176. </dl>
  177. </section2>
  178. </section1>
  179. <section1 topic='Privacy Considerations' anchor='privacy'>
  180. <p>Determination of physical presence necessarily involves an invasion of the target entity's "personal space". The &XSF; shall not be held liable for any use of this protocol. Client implementations MUST enable the user to disable support for this protocol via configuration options.</p>
  181. </section1>
  182. <section1 topic='Security Considerations' anchor='security'>
  183. <p>Responding entities (whether server or client) MUST NOT return physical presence information to requesting entities that are not entitled to discover such information.</p>
  184. </section1>
  185. <section1 topic='IANA Considerations' anchor='iana'>
  186. <p>This document requires no interaction with &IANA;.</p>
  187. </section1>
  188. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  189. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  190. <p>The &REGISTRAR; shall add the '' namespace to its registry of protocol namespaces.</p>
  191. </section2>
  192. <section2 topic='Method Values' anchor='registrar-methods'>
  193. <p>The XMPP Registrar shall maintain a registry of values for the 'method' attribute. The following values shall be added initially:</p>
  194. <ul>
  195. <li>dna</li>
  196. <li>infrared</li>
  197. <li>sight</li>
  198. <li>smell</li>
  199. <li>sound</li>
  200. <li>taste</li>
  201. <li>touch</li>
  202. </ul>
  203. </section2>
  204. </section1>
  205. <section1 topic='XML Schema' anchor='schema'>
  206. <code><![CDATA[
  207. <?xml version="1.0" encoding="UTF-8" ?>
  208. <xs:schema
  209. xmlns:xs=''
  210. targetNamespace=''
  211. xmlns=''
  212. elementFormDefault='qualified'>
  213. <xs:annotation>
  214. <xs:documentation>
  215. The protocol documented by this schema is defined in
  216. XEP-0132:
  217. </xs:documentation>
  218. </xs:annotation>
  219. <xs:element name='poke'>
  220. <xs:complexType>
  221. <xs:simpleContent>
  222. <xs:extension base='empty'>
  223. <xs:attribute name='method'
  224. use='optional'
  225. type='xs:NCName'/>
  226. </xs:extension>
  227. </xs:simpleContent>
  228. </xs:complexType>
  229. </xs:element>
  230. <xs:simpleType name='empty'>
  231. <xs:restriction base='xs:string'>
  232. <xs:enumeration value=''/>
  233. </xs:restriction>
  234. </xs:simpleType>
  235. </xs:schema>
  236. ]]></code>
  237. </section1>
  238. </xep>