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-0291.xml 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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>Service Delegation</title>
  10. <abstract>This specification defines an approach for users to delegate certain services (e.g. pubsub) to alternative JIDs.</abstract>
  11. &LEGALNOTICE;
  12. <number>0291</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. </dependencies>
  19. <supersedes/>
  20. <supersededby/>
  21. <shortname>NOT_YET_ASSIGNED</shortname>
  22. &infiniti;
  23. <revision>
  24. <version>0.1</version>
  25. <date>2011-01-26</date>
  26. <initials>psa</initials>
  27. <remark><p>Initial published version.</p></remark>
  28. </revision>
  29. <revision>
  30. <version>0.0.1</version>
  31. <date>2010-01-05</date>
  32. <initials>jk</initials>
  33. <remark><p>First draft.</p></remark>
  34. </revision>
  35. </header>
  36. <section1 topic='Introduction' anchor='intro'>
  37. <p>It is common to use XMPP user accounts for identity. Many features for user accounts have been proposed (for example, &xep0084;, &xep0277;, etc), and this list only grows as XMPP heads into social networking territory. However, not every XMPP server in the world supports every feature, nor can this ever be expected, and this limits the usefulness of the XMPP user account identity. Also, even when servers do support a feature it may not be clear how to bind an identity to it (see the never-solved problem of learning where a user's generic &xep0060; service is, in the absence of &xep0163;). Organizations such as Buddycloud and Livefyre have recognized the need to be able to offer features to existing standard XMPP accounts by offering proprietary service delegation mechanisms. This specification proposes a Standards Track solution for discovering external services associated with XMPP user identities.</p>
  38. </section1>
  39. <section1 topic='How It Works' anchor='protocol'>
  40. <section2 topic='Discovering Delegate Services' anchor='discover'>
  41. <p>To learn of delegate services for a user, query the bare JID of the user:</p>
  42. <example caption="Query for delegate services"><![CDATA[
  43. <iq type="get" from="alice@example.com/home" to="bob@example.com" id="d1">
  44. <query xmlns="urn:xmpp:tmp:delegate"/>
  45. </iq>
  46. ]]></example>
  47. <example caption="Success response"><![CDATA[
  48. <iq type="result" from="bob@example.com" to="alice@example.com/home" id="d1">
  49. <query xmlns="urn:xmpp:tmp:delegate">
  50. <service type="pubsub" jid="pubsub.example.net"/>
  51. <service type="chess" jid="bob@chess.example.net"/>
  52. </query>
  53. </iq>
  54. ]]></example>
  55. <p>In the above example, we learn that "chess" related communication should go through the "bob@chess.example.net" JID rather than the user's own JID ("bob@example.com").</p>
  56. </section2>
  57. <section2 topic='Discovering Through a Third-Party Registry' anchor='registry-discover'>
  58. <p>As it is expected that most servers will not even support the ability to query user accounts for delegate services, it should be possible to contact a third-party or global registry holding the same information, to be queried in much the same way:</p>
  59. <example caption="Query registry for delegate services"><![CDATA[
  60. <iq type="get" from="alice@example.com/home" to="registry.example.com" id="r1">
  61. <query xmlns="urn:xmpp:tmp:delegate" jid="bob@example.com"/>
  62. </iq>
  63. ]]></example>
  64. <example caption="Success response"><![CDATA[
  65. <iq type="result" from="registry.example.com" to="alice@example.com/home" id="r1">
  66. <query xmlns="urn:xmpp:tmp:delegate">
  67. <service type="pubsub" jid="pubsub.example.net"/>
  68. <service type="chess" jid="bob@chess.example.net"/>
  69. </query>
  70. </iq>
  71. ]]></example>
  72. </section2>
  73. <section2 topic='Managing Third-Party Registry Information' anchor='registry-manage'>
  74. <p>Here's how a user adds a mapping to the registry:</p>
  75. <example caption="Adding an entry"><![CDATA[
  76. <iq type="set" from="bob@example.com/home" to="registry.example.com" id="r2">
  77. <query xmlns="urn:xmpp:tmp:delegate">
  78. <service type="chess" jid="bob@chess.example.net"/>
  79. </query>
  80. </iq>
  81. ]]></example>
  82. <example caption="Success response"><![CDATA[
  83. <iq type="result" from="registry.example.com" to="bob@example.com/home" id="r2"/>
  84. ]]></example>
  85. <p>The registry will add the new service to the list of mapped services for the sender JID.</p>
  86. <p>To remove a service from the list, submit without a jid attribute:</p>
  87. <example caption="Removing an entry"><![CDATA[
  88. <iq type="set" from="bob@example.com/home" to="registry.example.com" id="r3">
  89. <query xmlns="urn:xmpp:tmp:delegate">
  90. <service type="chess"/>
  91. </query>
  92. </iq>
  93. ]]></example>
  94. <example caption="Success response"><![CDATA[
  95. <iq type="result" from="registry.example.com" to="bob@example.com/home" id="r3"/>
  96. ]]></example>
  97. </section2>
  98. <section2 topic='Confirming With the Delegate' anchor='confirm'>
  99. <p>Whether a delegate JID is discovered directly or via registry, the mapping is an assertion made by the user only and not by the delegate. This may have security implications. For example, a third party should not allow the user to pose as the delegate, nor should the mapping be considered an endorsement by the delegate, since anyone can assert any delegate. However, these types of things could be allowed if third parties confirm with the delegate that the association exists.</p>
  100. <p>Here's how to query a delegate JID to confirm if it is indeed associated with a specific user for a specific service type:</p>
  101. <example caption="Confirming a delegation"><![CDATA[
  102. <iq type="get" from="alice@example.com/home" to="bob@chess.example.net" id="c1">
  103. <check xmlns="urn:xmpp:tmp:delegate" type="chess" jid="bob@example.com"/>
  104. </iq>
  105. ]]></example>
  106. <p>Note that the user JID expected to be associated with the delegate must be provided in the request. It is not possible to query a delegate to determine the user JID, since a single delegate may act for many users.</p>
  107. <p>Success response means the association exists:</p>
  108. <example caption="Success response"><![CDATA[
  109. <iq type="result" from="bob@chess.example.net" to="alice@example.com/home" id="c1"/>
  110. ]]></example>
  111. </section2>
  112. </section1>
  113. <section1 topic='Implementation Notes' anchor='impl'>
  114. <section2 topic='Use of Both Direct and Third-Party Queries' anchor='impl-both'>
  115. <p>Applications that are configured to use a third-party registry SHOULD still be able to query user accounts directly. For performance reasons, it is recommended to query both the user account and the registry simultaneously, and take whichever answer arrives first. If one of the queries results in an error, then the application should wait for the other query to complete before assuming no such delegate records exists.</p>
  116. <p>If both queries return errors, or a success result does not contain an entry for some desired delegate service, it can be assumed that the desired service is provided by the user account itself (not delegated).</p>
  117. </section2>
  118. <section2 topic='Caching' anchor='impl-caching'>
  119. <p>It is RECOMMENDED that discovery or confirmation of delegate information be cached indefinitely and refreshed no more frequently than every 24 hours. Data refreshing should not block access to existing information. If over 24 hours pass since the last time delegate information was needed, the application should continue to use the old data while independently firing off a task to refresh the data. This way, latency associated with a particular user delegation only occurs the first time a user is ever seen.</p>
  120. </section2>
  121. </section1>
  122. <section1 topic='Security Considerations' anchor='security'>
  123. <p>As discussed above, a delegate mapping is an assertion by the user only. If the user should be allowed to act for the delegate, or if the user should be considered endorsed by the delegate, then the delegation needs to be confirmed first.</p>
  124. </section1>
  125. <section1 topic='IANA Considerations' anchor='iana'>
  126. <p>No interaction with &IANA; is required as a result of this document.</p>
  127. </section1>
  128. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  129. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  130. <p>This specification defines the following XML namespace:</p>
  131. <ul>
  132. <li>urn:xmpp:tmp:delegate</li>
  133. </ul>
  134. <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>
  135. </section2>
  136. <section2 topic='Namespace Versioning' anchor='registrar-versioning'>
  137. &NSVER;
  138. </section2>
  139. </section1>
  140. </xep>