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-0074.xml 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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>Simple Access Control</title>
  10. <abstract>A simple protocol for querying information for permissions.</abstract>
  11. &LEGALNOTICE;
  12. <number>0074</number>
  13. <status>Retracted</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies><spec>XEP-0030</spec></dependencies>
  17. <supersedes/>
  18. <supersededby/>
  19. <shortname>sac</shortname>
  20. <author>
  21. <firstname>Justin</firstname>
  22. <surname>Kirby</surname>
  23. <email>justin@openaether.org</email>
  24. <jid>zion@openaether.org</jid>
  25. </author>
  26. <revision>
  27. <version>0.2</version>
  28. <date>2003-10-20</date>
  29. <initials>psa</initials>
  30. <remark>At the request of the author, changed status to Retracted.</remark>
  31. </revision>
  32. <revision>
  33. <version>0.1</version>
  34. <date>2003-03-05</date>
  35. <initials>jk</initials>
  36. <remark>Initial version.</remark>
  37. </revision>
  38. </header>
  39. <section1 topic='Introduction'>
  40. <p>A Jabber travels further into the Jabber-as-Middleware world, it needs a protocol to determine "who can do what to whom". This proposal defines a protocol that enables any Jabber entity to determine the permissions of another Jabber entity, whether the context is a user JID querying a component for access, a client-to-client conversation, or a component asking another component about a request from a user.</p>
  41. <p>All access control lists (ACLs) boil down to three aspects: Actor, Operation, and Target/Sink. With this in mind it becomes almost trivial to implement the basic query/response mechanism.</p>
  42. <example caption="A simple query">
  43. <![CDATA[
  44. <iq to="security.capulet.com"
  45. from="inventory.capulet.com"
  46. type="get" id="1234">
  47. <acl xmlns="http://jabber.org/protocol/sac"
  48. actor="juliet@capulet.com/church"
  49. oper="uri://capulet.com/inventory#obtain"
  50. target="poison"/>
  51. </iq>
  52. ]]>
  53. </example>
  54. <p>Here we have the inventory.capulet.com component querying the security component as to whether juliet@ may obtain the requested poison.</p>
  55. <example caption="A response to the above query">
  56. <![CDATA[
  57. <iq to="inventory.capulet.com"
  58. from="security.capulet.com"
  59. type="result" id="1234">
  60. <acl xmlns="http://jabber.org/protocol/sac"
  61. actor="juliet@capulet.com/church"
  62. oper="uri://capulet.com/inventory#obtain"
  63. target="poison">
  64. <allowed/>
  65. </acl>
  66. </iq>
  67. ]]>
  68. </example>
  69. <p>Unfortunately, the response is in the affirmative and the romantic tragedy follows.</p>
  70. </section1>
  71. <section1 topic='A More Formal Tone'>
  72. <p>The &lt;acl&gt; element provides the container for the query. It MUST have the three attributes: actor, oper, and target.</p>
  73. <p>The actor attribute is set to the Jabber ID which is attempting to perform an operation. This need not be the JID sending the acl, although it may be. Remember this is to allow for the question, "Can X do Y to Z?", which is a question anyone can ask.</p>
  74. <p>The oper attribute is application-specific and refers to the operation for which a permission check is required (e.g., read/write operations). This also defines the scope of the ACL check, so the implementation is responsible for interpreting the actor and target values based on the value of the 'oper' attribute.</p>
  75. <p>The target is the object which the actor is trying to perform the operation on. This MUST be a node queryable via &xep0030;.</p>
  76. <p>Requests MUST be in the form of an empty &lt;acl/&gt; element with ALL the attributes specified. If not all attributes are specified, the request is incomplete and ambiguities arise; therefore the entity receving the request MUST return a "bad request" error to the sender. </p>
  77. <p>Responses MUST be in one of three forms: allowed, denied, error.</p>
  78. <p>The response is inserted into the &lt;acl/&gt; as a child element. If the response is allowed, then &lt;allowed/&gt; is inserted. If the JID is denied then &lt;denied/&gt; is returned. If there is inadequate information then &lt;error/&gt; is used following the standard Jabber error scheme.</p>
  79. <example caption='A positive response'>
  80. <![CDATA[
  81. <iq to="inventory.capulet.com"
  82. from="security.capulet.com"
  83. type="result" id="1234">
  84. <acl xmlns="http://jabber.org/protocol/sac"
  85. actor="juliet@capulet.com/church"
  86. oper="uri://capulet.com/inventory#obtain"
  87. target="poison">
  88. <allowed/>
  89. </acl>
  90. </iq>
  91. ]]>
  92. </example>
  93. <example caption='Negative response (denied)'>
  94. <![CDATA[
  95. <iq to="inventory.capulet.com"
  96. from="security.capulet.com"
  97. type="result" id="1234">
  98. <acl xmlns="http://jabber.org/protocol/sac"
  99. actor="juliet@capulet.com/church"
  100. oper="uri://capulet.com/inventory#obtain"
  101. target="poison">
  102. <denied/>
  103. </acl>
  104. </iq>
  105. ]]>
  106. </example>
  107. <example caption='Error response'>
  108. <![CDATA[
  109. <iq to="inventory.capulet.com"
  110. from="security.capulet.com"
  111. type="error" id="1234">
  112. <acl xmlns="http://jabber.org/protocol/sac"
  113. actor="juliet@capulet.com/church"
  114. oper="uri://capulet.com/inventory#obtain"
  115. target="poison"/>
  116. <error code="404">No information available</error>
  117. </iq>
  118. ]]>
  119. </example>
  120. </section1>
  121. <section1 topic='Query List of ACL operations'>
  122. <p>To obtain a list of acl operations that a jid supports, you must send an empty &lt;query/&gt; </p>
  123. <example caption='querying for list of acl operations'>
  124. <![CDATA[
  125. <iq to="security.capulet.com"
  126. from="inventory.capulet.com"
  127. type="get" id="1234">
  128. <query xmlns="http://jabber.org/protocol/sac"/>
  129. </iq>
  130. ]]>
  131. </example>
  132. <p>The to jid must then respond with a list of operations, if the jid supports SAC.</p>
  133. <example caption='response to the query'>
  134. <![CDATA[
  135. <iq to="inventory.capulet.com"
  136. from="security.capulet.com"
  137. type="result" id="1234">
  138. <query xmlns="http://jabber.org/protocol/sac">
  139. <oper uri="uri://capulet.com/inventory#obtain"/>
  140. <oper uri="uri://capulet.com/inventory#add"/>
  141. <oper uri="uri://capulet.com/inventory#remove"/>
  142. </query>
  143. </iq>
  144. ]]>
  145. </example>
  146. </section1>
  147. <section1 topic='Integrating with Service Discovery'>
  148. <p>To follow.</p>
  149. </section1>
  150. <section1 topic='Security Considerations'>
  151. <p>To follow.</p>
  152. </section1>
  153. <section1 topic='IANA Considerations'>
  154. <p>This document requires no interaction with &IANA;.</p>
  155. </section1>
  156. <section1 topic='XMPP Registrar Considerations'>
  157. <p>As a result of this document, the &REGISTRAR; will need to register the 'http://jabber.org/protocol/sac' namespace.</p>
  158. </section1>
  159. <section1 topic='Open Issues'>
  160. <ol>
  161. <li>Add disco integration section.</li>
  162. <li>Fill out error codes.</li>
  163. <li>Add DTD and Schema.</li>
  164. <li>Allow for query of all allowable operations for actor in relation to a target.</li>
  165. <li>Investigate possible integration with pubsub.</li>
  166. </ol>
  167. </section1>
  168. </xep>