rfc2086.IMAP4_ACL_extension.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. Network Working Group J. Myers
  2. Request for Comments: 2086 Carnegie Mellon
  3. Category: Standards Track January 1997
  4. IMAP4 ACL extension
  5. Status of this Memo
  6. This document specifies an Internet standards track protocol for the
  7. Internet community, and requests discussion and suggestions for
  8. improvements. Please refer to the current edition of the "Internet
  9. Official Protocol Standards" (STD 1) for the standardization state
  10. and status of this protocol. Distribution of this memo is unlimited.
  11. 1. Abstract
  12. The ACL extension of the Internet Message Access Protocol [IMAP4]
  13. permits access control lists to be manipulated through the IMAP
  14. protocol.
  15. Table of Contents
  16. 1. Abstract............................................... 1
  17. 2. Conventions Used in this Document...................... 1
  18. 3. Introduction and Overview.............................. 2
  19. 4. Commands............................................... 3
  20. 4.1. SETACL................................................. 3
  21. 4.2. DELETEACL.............................................. 4
  22. 4.3. GETACL................................................. 4
  23. 4.4. LISTRIGHTS............................................. 4
  24. 4.5. MYRIGHTS............................................... 5
  25. 5. Responses.............................................. 5
  26. 5.1. ACL.................................................... 5
  27. 5.2. LISTRIGHTS............................................. 6
  28. 5.3. MYRIGHTS............................................... 6
  29. 6. Formal Syntax.......................................... 6
  30. 7. References............................................. 7
  31. 8. Security Considerations................................ 7
  32. 9. Author's Address....................................... 8
  33. 2. Conventions Used in this Document
  34. In examples, "C:" and "S:" indicate lines sent by the client and
  35. server respectively.
  36. Myers Standards Track [Page 1]
  37. RFC 2086 ACL extension January 1997
  38. 3. Introduction and Overview
  39. The ACL extension is present in any IMAP4 implementation which
  40. returns "ACL" as one of the supported capabilities to the CAPABILITY
  41. command.
  42. An access control list is a set of <identifier,rights> pairs.
  43. Identifier is a US-ASCII string. The identifier anyone is reserved
  44. to refer to the universal identity (all authentications, including
  45. anonymous). All user name strings accepted by the LOGIN or
  46. AUTHENTICATE commands to authenticate to the IMAP server are reserved
  47. as identifiers for the corresponding user. Identifiers starting with
  48. a dash ("-") are reserved for "negative rights", described below.
  49. All other identifier strings are interpreted in an implementation-
  50. defined manner.
  51. Rights is a string listing a (possibly empty) set of alphanumeric
  52. characters, each character listing a set of operations which is being
  53. controlled. Letters are reserved for ``standard'' rights, listed
  54. below. The set of standard rights may only be extended by a
  55. standards-track document. Digits are reserved for implementation or
  56. site defined rights. The currently defined standard rights are:
  57. l - lookup (mailbox is visible to LIST/LSUB commands)
  58. r - read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL,
  59. SEARCH, COPY from mailbox)
  60. s - keep seen/unseen information across sessions (STORE SEEN flag)
  61. w - write (STORE flags other than SEEN and DELETED)
  62. i - insert (perform APPEND, COPY into mailbox)
  63. p - post (send mail to submission address for mailbox,
  64. not enforced by IMAP4 itself)
  65. c - create (CREATE new sub-mailboxes in any implementation-defined
  66. hierarchy)
  67. d - delete (STORE DELETED flag, perform EXPUNGE)
  68. a - administer (perform SETACL)
  69. An implementation may tie rights together or may force rights to
  70. always or never be granted to particular identifiers. For example,
  71. in an implementation that uses unix mode bits, the rights "wisd" are
  72. tied, the "a" right is always granted to the owner of a mailbox and
  73. is never granted to another user. If rights are tied in an
  74. implementation, the implementation must be conservative in granting
  75. rights in response to SETACL commands--unless all rights in a tied
  76. set are specified, none of that set should be included in the ACL
  77. entry for that identifier. A client may discover the set of rights
  78. which may be granted to a given identifier in the ACL for a given
  79. mailbox by using the LISTRIGHTS command.
  80. Myers Standards Track [Page 2]
  81. RFC 2086 ACL extension January 1997
  82. It is possible for multiple identifiers in an access control list to
  83. apply to a given user (or other authentication identity). For
  84. example, an ACL may include rights to be granted to the identifier
  85. matching the user, one or more implementation-defined identifiers
  86. matching groups which include the user, and/or the identifier
  87. "anyone". How these rights are combined to determine the user's
  88. access is implementation-defined. An implementation may choose, for
  89. example, to use the union of the rights granted to the applicable
  90. identifiers. An implementation may instead choose, for example, to
  91. only use those rights granted to the most specific identifier present
  92. in the ACL. A client may determine the set of rights granted to the
  93. logged-in user for a given mailbox by using the MYRIGHTS command.
  94. When an identifier in an ACL starts with a dash ("-"), that indicates
  95. that associated rights are to be removed from the identifier that is
  96. prefixed by the dash. For example, if the identifier "-fred" is
  97. granted the "w" right, that indicates that the "w" right is to be
  98. removed from users matching the identifier "fred". Implementations
  99. need not support having identifiers which start with a dash in ACLs.
  100. 4. Commands
  101. 4.1. SETACL
  102. Arguments: mailbox name
  103. authentication identifier
  104. access right modification
  105. Data: no specific data for this command
  106. Result: OK - setacl completed
  107. NO - setacl failure: can't set acl
  108. BAD - command unknown or arguments invalid
  109. The SETACL command changes the access control list on the
  110. specified mailbox so that the specified identifier is granted
  111. permissions as specified in the third argument.
  112. The third argument is a string containing an optional plus ("+")
  113. or minus ("-") prefix, followed by zero or more rights characters.
  114. If the string starts with a plus, the following rights are added
  115. to any existing rights for the identifier. If the string starts
  116. with a minus, the following rights are removed from any existing
  117. rights for the identifier. If the string does not start with a
  118. plus or minus, the rights replace any existing rights for the
  119. identifier.
  120. Myers Standards Track [Page 3]
  121. RFC 2086 ACL extension January 1997
  122. 4.2. DELETEACL
  123. Arguments: mailbox name
  124. authentication identifier
  125. Data: no specific data for this command
  126. Result: OK - deleteacl completed
  127. NO - deleteacl failure: can't delete acl
  128. BAD - command unknown or arguments invalid
  129. The DELETEACL command removes any <identifier,rights> pair for the
  130. specified identifier from the access control list for the specified
  131. mailbox.
  132. 4.3. GETACL
  133. Arguments: mailbox name
  134. Data: untagged responses: ACL
  135. Result: OK - getacl completed
  136. NO - getacl failure: can't get acl
  137. BAD - command unknown or arguments invalid
  138. The GETACL command returns the access control list for mailbox in
  139. an untagged ACL reply.
  140. Example: C: A002 GETACL INBOX
  141. S: * ACL INBOX Fred rwipslda
  142. S: A002 OK Getacl complete
  143. 4.4. LISTRIGHTS
  144. Arguments: mailbox name
  145. authentication identifier
  146. Data: untagged responses: LISTRIGHTS
  147. Result: OK - listrights completed
  148. NO - listrights failure: can't get rights list
  149. BAD - command unknown or arguments invalid
  150. The LISTRIGHTS command takes a mailbox name and an identifier and
  151. returns information about what rights may be granted to the identifier
  152. in the ACL for the mailbox.
  153. Myers Standards Track [Page 4]
  154. RFC 2086 ACL extension January 1997
  155. Example: C: a001 LISTRIGHTS ~/Mail/saved smith
  156. S: * LISTRIGHTS ~/Mail/saved smith la r swicd
  157. S: a001 OK Listrights completed
  158. C: a005 LISTRIGHTS archive.imap anyone
  159. S: * LISTRIGHTS archive.imap anyone "" l r s w i p c d a
  160. 0 1 2 3 4 5 6 7 8 9
  161. 4.5. MYRIGHTS
  162. Arguments: mailbox name
  163. Data: untagged responses: MYRIGHTS
  164. Result: OK - myrights completed
  165. NO - myrights failure: can't get rights
  166. BAD - command unknown or arguments invalid
  167. The MYRIGHTS command returns the set of rights that the user has
  168. to mailbox in an untagged MYRIGHTS reply.
  169. Example: C: A003 MYRIGHTS INBOX
  170. S: * MYRIGHTS INBOX rwipslda
  171. S: A003 OK Myrights complete
  172. 5. Responses
  173. 5.1. ACL
  174. Data: mailbox name
  175. zero or more identifier rights pairs
  176. The ACL response occurs as a result of a GETACL command. The first
  177. string is the mailbox name for which this ACL applies. This is
  178. followed by zero or more pairs of strings, each pair contains the
  179. identifier for which the entry applies followed by the set of
  180. rights that the identifier has.
  181. Myers Standards Track [Page 5]
  182. RFC 2086 ACL extension January 1997
  183. 5.2. LISTRIGHTS
  184. Data: mailbox name
  185. identifier
  186. required rights
  187. list of optional rights
  188. The LISTRIGHTS response occurs as a result of a LISTRIGHTS
  189. command. The first two strings are the mailbox name and identifier
  190. for which this rights list applies. Following the identifier is a
  191. string containing the (possibly empty) set of rights the
  192. identifier will always be granted in the mailbox.
  193. Following this are zero or more strings each containing a set of
  194. rights the identifier may be granted in the mailbox. Rights
  195. mentioned in the same string are tied together--either all must be
  196. granted to the identifier in the mailbox or none may be granted.
  197. The same right may not be listed more than once in the LISTRIGHTS
  198. command.
  199. 5.3. MYRIGHTS
  200. Data: mailbox name
  201. rights
  202. The MYRIGHTS response occurs as a result of a MYRIGHTS command.
  203. The first string is the mailbox name for which these rights apply.
  204. The second string is the set of rights that the client has.
  205. 6. Formal Syntax
  206. The following syntax specification uses the augmented Backus-Naur
  207. Form (BNF) notation as specified in [RFC-822] as modified by [IMAP4].
  208. Non-terminals referenced but not defined below are as defined by
  209. [IMAP4].
  210. Except as noted otherwise, all alphabetic characters are case-
  211. insensitive. The use of upper or lower case characters to define
  212. token strings is for editorial clarity only. Implementations MUST
  213. accept these strings in a case-insensitive fashion.
  214. Myers Standards Track [Page 6]
  215. RFC 2086 ACL extension January 1997
  216. acl_data ::= "ACL" SPACE mailbox *(SPACE identifier SPACE
  217. rights)
  218. deleteacl ::= "DELETEACL" SPACE mailbox SPACE identifier
  219. getacl ::= "GETACL" SPACE mailbox
  220. identifier ::= astring
  221. listrights ::= "LISTRIGHTS" SPACE mailbox SPACE identifier
  222. listrights_data ::= "LISTRIGHTS" SPACE mailbox SPACE identifier
  223. SPACE rights *(SPACE rights)
  224. mod_rights ::= astring
  225. ;; +rights to add, -rights to remove
  226. ;; rights to replace
  227. myrights ::= "MYRIGHTS" SPACE mailbox
  228. myrights_data ::= "MYRIGHTS" SPACE mailbox SPACE rights
  229. rights ::= astring
  230. setacl ::= "SETACL" SPACE mailbox SPACE identifier
  231. SPACE mod_rights
  232. 7. References
  233. [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 4",
  234. RFC 1730, University of Washington, December 1994.
  235. [RFC-822] Crocker, D., "Standard for the Format of ARPA Internet Text
  236. Messages", STD 11, RFC 822.
  237. 8. Security Considerations
  238. An implementation must make sure the ACL commands themselves do not
  239. give information about mailboxes with appropriately restricted ACL's.
  240. For example, a GETACL command on a mailbox for which the user has
  241. insufficient rights should not admit the mailbox exists, much less
  242. return the mailbox's ACL.
  243. Myers Standards Track [Page 7]
  244. RFC 2086 ACL extension January 1997
  245. 9. Author's Address
  246. John G. Myers
  247. Carnegie-Mellon University
  248. 5000 Forbes Ave.
  249. Pittsburgh PA, 15213-3890
  250. Email: jgm+@cmu.edu
  251. Myers Standards Track [Page 8]