idnits 2.17.1 draft-ietf-imapext-2086upd-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 965. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1005. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 976. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 983. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 989. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** An RFC 3978, Section 5.1 paragraph was found, but not on the first page, as required. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 1179 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 163 instances of too long lines in the document, the longest one being 13 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 2005) is 6941 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'StringPrep' is mentioned on line 304, but not defined == Missing Reference: 'UNSEEN 12' is mentioned on line 724, but not defined == Missing Reference: 'UIDVALIDITY 3857529045' is mentioned on line 725, but not defined == Missing Reference: 'UIDNEXT 4392' is mentioned on line 726, but not defined == Unused Reference: 'Stringprep' is defined on line 942, but no explicit reference was found in the text == Unused Reference: 'RFC2086' is defined on line 950, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 3501 (ref. 'IMAP4') (Obsoleted by RFC 9051) ** Obsolete normative reference: RFC 3454 (ref. 'Stringprep') (Obsoleted by RFC 7564) ** Obsolete normative reference: RFC 4013 (ref. 'SASLprep') (Obsoleted by RFC 7613) -- Obsolete informational reference (is this intentional?): RFC 2086 (Obsoleted by RFC 4314) Summary: 10 errors (**), 0 flaws (~~), 9 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group A. Melnikov 2 Internet Draft Editor 3 Document: draft-ietf-imapext-2086upd-05.txt April 2005 4 Updates: <<3501?>> 5 Obsoletes: 2086 6 Expires: October 2005 8 IMAP4 ACL extension 10 Status of this Memo 12 By submitting this Internet-Draft, each author represents that any 13 applicable patent or other IPR claims of which he or she is aware 14 have been or will be disclosed, and any of which he or she becomes 15 aware will be disclosed, in accordance with Section 6 of BCP 79. 17 Internet-Drafts are working documents of the Internet Engineering 18 Task Force (IETF), its areas, and its working groups. Note that 19 other groups may also distribute working documents as Internet-Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six 22 months and may be updated, replaced, or obsoleted by other documents 23 at any time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress". 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 Directories on ds.internic.net, nic.nordu.net, ftp.isi.edu, or 33 munnari.oz.au. 35 A revised version of this draft document will be submitted to the RFC 36 editor as a Proposed Standard for the Internet Community. Discussion 37 and suggestions for improvement are requested. Distribution of this 38 draft is unlimited. 40 Abstract 42 The ACL (Access Control List) extension (RFC 2086) of the Internet 43 Message Access Protocol (IMAP4rev1) permits mailbox access control 44 lists to be retrieved and manipulated through the IMAP protocol. 46 This document is a revision of the RFC 2086. It defines several new 47 access control rights and clarifies which rights are required for 48 different IMAP commands. 50 1. Conventions Used in this Document 52 In examples, "C:" and "S:" indicate lines sent by the client and 53 server respectively. 55 In all examples "/" character is used as hierarchy separator. 57 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 58 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 59 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 61 The phrase "ACL server" is just a short cut for saying "IMAP server 62 that supports ACL extension as defined in this document". 64 2. Introduction and Overview 66 The ACL (Access Control List) extension of the Internet Message 67 Access Protocol [IMAP4] permits mailbox access control lists to be 68 retrieved and manipulated through the IMAP protocol. 70 This document is a revision of the RFC 2086. It tries to clarify 71 different ambiguities in the RFC 2086, in particular use of UTF-8 72 [UTF-8] in identifiers, which rights are required for different IMAP4 73 commands; how READ-WRITE/READ-ONLY response codes are related to ACL. 75 3. Access Control 77 The ACL extension is present in any IMAP4 implementation which 78 returns "ACL" as one of the supported capabilities to the CAPABILITY 79 command. 81 A server implementation conformant to this document MUST also return 82 rights (see below) not defined in section 3.2 in the "RIGHTS=" 83 capability. 85 An access control list is a set of pairs. 86 An ACL applies to a mailbox name. 88 Identifier is a UTF-8 [UTF-8] string. The identifier "anyone" is 89 reserved to refer to the universal identity (all authentications, 90 including anonymous). All user name strings accepted by the LOGIN or 91 AUTHENTICATE commands to authenticate to the IMAP server are reserved 92 as identifiers for the corresponding users. Identifiers starting 93 with a dash ("-") are reserved for "negative rights", described 94 below. All other identifier strings are interpreted in an 95 implementation-defined manner. 97 Rights is a string listing a (possibly empty) set of alphanumeric 98 characters, each character listing a set of operations which is being 99 controlled. Lowercase letters are reserved for "standard" rights, 100 listed in section 3.1. (Note that for compatibility with deployed 101 clients and servers uppercase rights are not allowed). The set of 102 standard rights may only be extended by a standards-track document. 103 Digits are reserved for implementation or site defined rights. 105 An implementation MAY tie rights together or may force rights to 106 always or never be granted to particular identifiers. For example, 107 in an implementation that uses UNIX mode bits, the rights "swite" are 108 tied, the "a" right is always granted to the owner of a mailbox and 109 is never granted to another user. If rights are tied in an 110 implementation, the implementation must be conservative in granting 111 rights in response to SETACL commands--unless all rights in a tied 112 set are specified, none of that set should be included in the ACL 113 entry for that identifier. A client may discover the set of rights 114 which may be granted to a given identifier in the ACL for a given 115 mailbox name by using the LISTRIGHTS command. 117 It is possible for multiple identifiers in an access control list to 118 apply to a given user. For 119 example, an ACL may include rights to be granted to the identifier 120 matching the user, one or more implementation-defined identifiers 121 matching groups which include the user, and/or the identifier 122 "anyone". How these rights are combined to determine the user's 123 access is implementation-defined. An implementation may choose, for 124 example, to use the union of the rights granted to the applicable 125 identifiers. An implementation may instead choose, for example, to 126 only use those rights granted to the most specific identifier present 127 in the ACL. A client may determine the set of rights granted to the 128 logged-in user for a given mailbox name by using the MYRIGHTS 129 command. 131 When an identifier in an ACL starts with a dash ("-"), that indicates 132 that associated rights are to be removed from the identifier that is 133 prefixed by the dash. This is referred to as a "negative right". 134 This differs from DELETEACL in that a negative right is added to the 135 ACL, and is a part of the calculation of the rights. 137 Let's assume that an identifier "fred" refers to a user with login 138 "fred". If the identifier "-fred" is granted the "w" right, 139 that indicates that the "w" right is to be removed from users 140 matching the identifier "fred", even though the user "fred" might 141 have the "w" right as a consequence of some other identifier in 142 the ACL. A DELETEACL of "fred" simply deletes the identifier "fred" 143 from the ACL; it does not affect any rights that the user "fred" 144 may get from another entry in the ACL, in particular it doesn't 145 affect rights granted to the identifier "-fred". 147 Server implementations are not required to support "negative right" 148 identifiers. 150 3.1. Standard rights 152 The currently defined standard rights are (note that the list below 153 doesn't list all commands that use a particular right): 155 l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox) 156 r - read (SELECT the mailbox, perform STATUS) 157 s - keep seen/unseen information across sessions (set or clear \SEEN flag 158 via STORE, also set \SEEN during APPEND/COPY/FETCH BODY[...]) 159 w - write (set or clear flags other than \SEEN and \DELETED via STORE, 160 also set them during APPEND/COPY) 161 i - insert (perform APPEND, COPY into mailbox) 162 p - post (send mail to submission address for mailbox, 163 not enforced by IMAP4 itself) 164 k - create mailboxes (CREATE new sub-mailboxes in any 165 implementation-defined hierarchy, parent mailbox for the new 166 mailbox name in RENAME) 167 x - delete mailbox (DELETE mailbox, old mailbox name in RENAME) 168 t - delete messages (set or clear \DELETED flag via STORE, set \DELETED flag 169 during APPEND/COPY) 170 e - perform EXPUNGE and expunge as a part of CLOSE. 171 a - administer (perform SETACL/DELETEACL/GETACL) 173 3.1.1. Obsolete rights 175 Due to ambiguity in RFC 2086 some existing RFC 2086 server implementations 176 use the "c" right to control the DELETE command. Others chose to use the 177 "d" right to control the DELETE command. 178 For the former group, let's define the "create" right as union of the "k" 179 and "x" rights, and the "delete" right as union of the "e" and "t" rights. 180 For the latter group, let's define the "create" rights as a synonym to the 181 "k" right, and the "delete" right as union of the "e", "t" and "x" rights. 183 For compatibility with RFC 2086 this section defines two virtual rights 184 "d" and "c". 186 If a client includes the "d" right in a rights list, then it MUST be 187 treated as if the client had included every member of the "delete" right. 188 (It is not an error for a client to specify both the "d" right and 189 one or more members of the "delete" right, but the effect is no different 190 than if just the "d" right or all members of the "delete" right had been 191 specified). 193 When any of the "delete" member rights is set in a list of 194 rights, the server MUST also include the "d" right when returning 195 the list in a MYRIGHTS or ACL response. This is so to enable older clients 196 conforming to RFC 2086 to work with newer servers. (*) 198 Example: C: A001 SETACL INBOX/Drafts David lrswida 199 S: A001 OK Setacl complete 201 The client has specified the "d" right in the SETACL command above and it 202 expands to "et" on the server: 204 C: A002 GETACL INBOX/Drafts 205 S: * ACL INBOX Fred rwipslxetda David lrswideta 206 S: A002 OK Getacl complete 208 If the identifier specified in the LISTRIGHTS command can be 209 granted any of the "delete" member rights on a mailbox, then the server 210 MUST include the "d" right in the corresponding LISTRIGHTS response. (*) 211 If the member rights aren't tied to non-member rights, then the "d" right 212 is returned by itself in the LISTRIGHTS response. If any of the member rights 213 needs to be tied to one (or more) non-member right, then the "d" right and all 214 of the member rights need to be tied to the same non-member right(s) (**). 216 If a client includes the "c" right in a rights list, then it MUST be 217 treated as if the client had included every member of the "create" right. 218 (It is not an error for a client to specify both the "c" right and 219 one or more members of the "create" right, but the effect is no different 220 than if just the "c" right or all members of the "create" right had been 221 specified). 223 When any of the "create" member rights is set in a list of 224 rights, the server MUST also include the "c" right when returning 225 the list in a MYRIGHTS or ACL response. This is so to enable older clients 226 conforming to RFC 2086 to work with newer servers. (*) 228 Example: C: A003 SETACL INBOX/Drafts Byron lrswikda 229 S: A001 OK Setacl complete 230 C: A002 GETACL INBOX/Drafts 231 S: * ACL INBOX Fred rwipslxeta Byron lrswikcdeta 232 S: A002 OK Getacl complete 234 The client has specified the "d" right in the SETACL command above and it 235 expands to "et" on the server: As the client has specified the "k" right 236 (which is a member of the "c" right), the server also returns the "c" right. 238 If the identifier specified in the LISTRIGHTS command can be 239 granted any of the "create" member rights on a mailbox, then the server 240 MUST include the "c" right in the corresponding LISTRIGHTS response. (*) 241 If the member rights aren't tied to non-member rights, then the "c" right 242 is returned by itself in the LISTRIGHTS response. If any of the member rights 243 needs to be tied to one (or more) non-member right, then the "c" right and all 244 of the member rights need to be tied to the same non-member right(s) (**). 246 Example: The server that ties the rights as follows 248 lr s w i p k x t 250 and c=k 252 will return: 254 S: * LISTRIGHTS archive/imap anyone "" lr s w i p k x t c d 256 Example: The server that ties the rights as follows 258 lr s w i p k xte 260 and c=k 262 will return: 264 S: * LISTRIGHTS archive/imap anyone "" lr s w i p k xte c d 266 Example: The server that ties the rights as follows 268 lr s w i p k x te 270 and c=k 272 will return: 274 S: * LISTRIGHTS archive/imap anyone "" lr s w i p k c x te d 276 Example: The server that ties the rights as follows 278 lr swte i p k x 280 and c=kx 282 will return: 284 S: * LISTRIGHTS archive/imap anyone "" lr swted i p k x c 286 (*) Clients conforming to this document MUST ignore the virtual "d" and "c" 287 rights in MYRIGHTS, ACL and LISTRIGHTS responses. 289 (**) The IMAPEXT Working Group has debated this issue in great length 290 and after reviewing existing ACL implementations concluded that this is 291 a reasonable restriction. 293 3.2. Rights defined in RFC 2086. 295 The "RIGHTS=" capability MUST NOT include any of the rights defined 296 in RFC 2086: "l", "r", "s", "w", "i", "p", "a", "c", "d", and the digits 297 ("0" .. "9"). 299 4. Access control management commands and responses 301 Servers, when processing a command that have an identifier 302 as a parameter (i.e. any of SETACL, DELETEACL and LISTRIGHTS commands), 303 SHOULD first prepare the received identifier using "SASLprep" profile 304 [SASLprep] of the "stringprep" algorithm [StringPrep]. If the 305 preparation of the identifier fails or results in an empty string, the 306 server MUST refuse to perform the command with a BAD response. 308 4.1. SETACL command 310 Arguments: mailbox name 311 identifier 312 access right modification 314 Data: no specific data for this command 316 Result: OK - setacl completed 317 NO - setacl failure: can't set acl 318 BAD - arguments invalid 320 The SETACL command changes the access control list on the 321 specified mailbox so that the specified identifier is granted 322 permissions as specified in the third argument. 324 The third argument is a string containing an optional plus ("+") 325 or minus ("-") prefix, followed by zero or more rights characters. 326 If the string starts with a plus, the following rights are added 327 to any existing rights for the identifier. If the string starts 328 with a minus, the following rights are removed from any existing 329 rights for the identifier. If the string does not start with a 330 plus or minus, the rights replace any existing rights for the 331 identifier. 333 Note that an unrecognized right MUST cause the command to return 334 the BAD response. In particular, server MUST NOT silently ignore 335 unrecognized rights. 337 Example: C: A001 GETACL INBOX/Drafts 338 S: * ACL INBOX/Drafts Fred rwipslxetad Chris lrswi 339 S: A001 OK Getacl complete 340 C: A002 SETACL INBOX/Drafts Chris +cda 341 S: A002 OK Setacl complete 342 C: A003 GETACL INBOX/Drafts 343 S: * ACL INBOX/Drafts Fred rwipslxetad Chris lrswicdakxet 344 S: A003 OK Getacl complete 346 C: A035 SETACL INBOX/Drafts John lrQswicda 347 S: A035 BAD Uppercase rights are not allowed 349 C: A036 SETACL INBOX/Drafts John lrqswicda 350 S: A036 BAD The q right is not supported 352 4.2. DELETEACL command 354 Arguments: mailbox name 355 identifier 357 Data: no specific data for this command 359 Result: OK - deleteacl completed 360 NO - deleteacl failure: can't delete acl 361 BAD - arguments invalid 363 The DELETEACL command removes any pair for the 364 specified identifier from the access control list for the specified 365 mailbox. 367 Example: C: B001 GETACL INBOX 368 S: * ACL INBOX Fred rwipslxetad -Fred wetd $team w 369 S: B001 OK Getacl complete 370 C: B002 DELETEACL INBOX Fred 371 S: B002 OK Deleteacl complete 372 C: B003 GETACL INBOX 373 S: * ACL INBOX -Fred wetd $team w 374 S: B003 OK Getacl complete 376 4.3. GETACL command 378 Arguments: mailbox name 380 Data: untagged responses: ACL 382 Result: OK - getacl completed 383 NO - getacl failure: can't get acl 384 BAD - arguments invalid 386 The GETACL command returns the access control list for mailbox in 387 an untagged ACL response. 389 Some implementations may permit multiple forms of an 390 identifier to reference the same IMAP account. Usually, such 391 implementations will have a canonical form that is stored internally. 392 An ACL response caused by an GETACL command MAY include a 393 canonicalized form of the identifier which might be 394 different from the one used in the corresponding SETACL command. 396 Example: C: A002 GETACL INBOX 397 S: * ACL INBOX Fred rwipsldexta 398 S: A002 OK Getacl complete 400 4.4. LISTRIGHTS command 402 Arguments: mailbox name 403 identifier 405 Data: untagged responses: LISTRIGHTS 407 Result: OK - listrights completed 408 NO - listrights failure: can't get rights list 409 BAD - arguments invalid 411 The LISTRIGHTS command takes a mailbox name and an identifier and 412 returns information about what rights may be granted to the identifier 413 in the ACL for the mailbox. 415 Some implementations may permit multiple forms of an 416 identifier to reference the same IMAP account. Usually, such 417 implementations will have a canonical form that is stored internally. 418 A LISTRIGHTS response caused by a LISTRIGHTS command MUST always 419 return the same form of an identifier as specified 420 by the client. This is to allow the client to correlate the response 421 with the command. 423 Example: C: a001 LISTRIGHTS ~/Mail/saved smith 424 S: * LISTRIGHTS ~/Mail/saved smith la r swicdkxte 425 S: a001 OK Listrights completed 427 Example: C: a005 LISTRIGHTS archive/imap anyone 428 S: * LISTRIGHTS archive.imap anyone "" l r s w i p k x t 429 e c d a 0 1 2 3 4 5 6 7 8 9 430 S: a005 Listrights successful 432 4.5. MYRIGHTS command 434 Arguments: mailbox name 436 Data: untagged responses: MYRIGHTS 438 Result: OK - myrights completed 439 NO - myrights failure: can't get rights 440 BAD - arguments invalid 442 The MYRIGHTS command returns the set of rights that the user has 443 to mailbox in an untagged MYRIGHTS reply. 445 Example: C: A003 MYRIGHTS INBOX 446 S: * MYRIGHTS INBOX rwiptsldaex 447 S: A003 OK Myrights complete 449 4.6. ACL response 451 Data: mailbox name 452 zero or more identifier rights pairs 454 The ACL response occurs as a result of a GETACL command. The first 455 string is the mailbox name for which this ACL applies. This is 456 followed by zero or more pairs of strings, each pair contains the 457 identifier for which the entry applies followed by the set of 458 rights that the identifier has. 460 Section 3.1.1 details additional server requirements related to handling 461 of the virtual "d" and "c" rights. 463 4.7. LISTRIGHTS response 465 Data: mailbox name 466 identifier 467 required rights 468 list of optional rights 470 The LISTRIGHTS response occurs as a result of a LISTRIGHTS 471 command. The first two strings are the mailbox name and identifier 472 for which this rights list applies. Following the identifier is a 473 string containing the (possibly empty) set of rights the 474 identifier will always be granted in the mailbox. 476 Following this are zero or more strings each containing a set of 477 rights the identifier may be granted in the mailbox. Rights 478 mentioned in the same string are tied together. The server MUST 479 either grant all tied rights to the identifier in the mailbox or 480 grant none. Section 3.1.1 details additional server requirements 481 related to handling of the virtual "d" and "c" rights. 483 The same right MUST NOT be listed more than once in the LISTRIGHTS 484 command. 486 4.8. MYRIGHTS response 488 Data: mailbox name 489 rights 491 The MYRIGHTS response occurs as a result of a MYRIGHTS command. 492 The first string is the mailbox name for which these rights apply. 493 The second string is the set of rights that the client has. 495 Section 3.1.1 details additional server requirements related to handling 496 of the virtual "d" and "c" rights. 498 5. Rights required to perform different IMAP4rev1 commands 500 Before executing a command an ACL compliant server MUST check which rights 501 are required to perform it. This section groups command by functions 502 they perform and list the rights required. It also gives the detailed 503 description of any special processing required. 505 For the purpose of this section the UID counterpart of a command is 506 considered to be the same command, e.g. both UID COPY and COPY commands 507 require the same set of rights. 509 The table below summarizes different rights or their combinations that are 510 required in order to perform different IMAP operations. As it is not always 511 possible to express complex right checking and interactions, the description 512 after the table should be used as the primary reference. 514 +---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+ 515 | Operations\Rights | l | r | s | w | i | k | x | t | e | a | Any | None | 516 +---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+ 517 | commands in authenticated state | 518 +--------------------------------------------------------------------------+ 519 | LIST | + | | | | | | | | | | | | 520 | SUBSCRIBE | * | | | | | | | | | | | * | 521 | UNSUBSCRIBE | | | | | | | | | | | | + | 522 | LSUB | * | | | | | | | | | | | * | 523 | CREATE (for parent) | | | | | | + | | | | | | | 524 | DELETE | | | | | | | + | ? | ? | | | | 525 | RENAME | | | | | | + | + | | | | | | 526 |SELECT/EXAMINE/STATUS| | + | | | | | | | | | | | 527 | SETACL/DELETEACL | | | | | | | | | | + | | | 528 | GETACL/LISTRIGHTS | | | | | | | | | | + | | | 529 | MYRIGHTS | | | | | | | | | | | + | | 530 | APPEND | | | ? | ? | + | | | ? | | | | | 531 +--------------------------------------------------------------------------+ 532 | commands in selected state | 533 +--------------------------------------------------------------------------+ 534 | APPEND | | | ? | ? | + | | | ? | | | | | 535 | EXPUNGE/CLOSE | | | | | | | | | + | | | | 536 | FETCH | | | ? | | | | | | | | | | 537 | STORE flags | | | ? | ? | | | | ? | | | | | 538 +---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+ 539 Note: for all commands in the selected state the "r" is implied, because 540 it is required to SELECT/EXAMINE a mailbox. Servers are not required 541 to check presence of the "r" right once a mailbox is successfully 542 selected. 544 Legend: 545 + - The right is required 546 * - Only one of the rights marked with * is required (see description below) 547 ? - The right is OPTIONAL (see description below) 548 "Any" - at least one of the "l", "r", "i", "k", "x", "a" rights is 549 required 550 "None" - No rights required to perform the command 552 Listing and subscribing/unsubscribing mailboxes: 553 LIST - "l" right is required. However, unlike other commands (e.g. SELECT) 554 the server MUST NOT return a NO response if it can't list a mailbox. 556 Note that if the user has "l" right to a mailbox "A/B", but not to its parent 557 mailbox "A", the LIST command should behave as if the mailbox "A" doesn't exist, 558 for example: 559 C: A777 LIST "" * 560 S: * LIST (\NoInferiors) "/" "A/B" 561 S: * LIST () "/" "C" 562 S: * LIST (\NoInferiors) "/" "C/D" 563 S: A777 OK LIST completed 565 SUBSCRIBE - "l" right is required only if the server checks for mailbox existence 566 when performing SUBSCRIBE. 568 UNSUBSCRIBE - no rights required to perform this operation. 570 LSUB - "l" right is required only if the server checks for mailbox existence when 571 performing SUBSCRIBE. However, unlike other commands (e.g. SELECT) 572 the server MUST NOT return a NO response if it can't list a subscribed 573 mailbox. 575 Mailbox management: 576 CREATE - "k" right on a nearest existing parent mailbox. When a new 577 mailbox is created it SHOULD inherit the ACL from the parent 578 mailbox (if one exists) in the defined hierarchy. 580 DELETE - "x" right on the mailbox. Note that some servers don't allow 581 to delete a non-empty mailbox. If this is the case, the user 582 would also need "r", "e" and "t" rights, in order to open the 583 mailbox and empty it. 585 The DELETE command MUST delete the ACL associated with the 586 deleted mailbox. 588 RENAME - Moving a mailbox from one parent to another requires the "x" right 589 on the mailbox itself and the "k" right for the new parent. 590 For example, if the user wants to rename mailbox named "A/B/C" to 591 "D/E", the user must have the "x" right for the mailbox "A/B/C" 592 and the "k" right for the mailbox "D". 594 The RENAME command SHOULD NOT change the ACLs on the renamed 595 mailbox and submailboxes. 597 Copying or appending messages: 599 Before performing a COPY/APPEND command the server MUST check if the 600 user has "i" right for the target mailbox. If the user doesn't have "i" 601 right, the operation fails. Otherwise for each copied/appended message 602 the server MUST check if the user has 603 "t" right - when the message has \Deleted flag set 604 "s" right - when the message has \Seen flag set 605 "w" right for all other message flags. 606 Only when the user has a particular right the corresponding flags are 607 stored for the newly created message. The server MUST NOT fail 608 a COPY/APPEND if the user has no rights to set a particular flag. 610 Example: C: A003 MYRIGHTS TargetMailbox 611 S: * MYRIGHTS TargetMailbox rwis 612 S: A003 OK Myrights complete 614 C: A004 FETCH 1:3 (FLAGS) 615 S: * 1 FETCH (FLAGS (\Draft \Deleted) 616 S: * 2 FETCH (FLAGS (\Answered) 617 S: * 3 FETCH (FLAGS ($Forwarded \Seen) 618 S: A004 OK Fetch Completed 620 C: A005 COPY 1:3 TargetMailbox 621 S: A005 OK Copy completed 623 C: A006 SELECT TargetMailbox 624 ... 625 S: A006 Select Completed 627 Let's assume that the copied messages received message numbers 77:79. 629 C: A007 FETCH 77:79 (FLAGS) 630 S: * 77 FETCH (FLAGS (\Draft)) 631 S: * 78 FETCH (FLAGS (\Answered)) 632 S: * 79 FETCH (FLAGS ($Forwarded \Seen)) 633 S: A007 OK Fetch Completed 635 \Deleted flag was lost on COPY, as the user has no "t" right in the 636 target mailbox. 638 If the MYRIGHTS command with the tag A003 would have returned: 639 S: * MYRIGHTS TargetMailbox rsti 641 the response from the FETCH with the tag A007 would have been: 643 C: A007 FETCH 77:79 (FLAGS) 644 S: * 77 FETCH (FLAGS (\Deleted)) 645 S: * 78 FETCH (FLAGS ()) 646 S: * 79 FETCH (FLAGS (\Seen)) 647 S: A007 OK Fetch Completed 649 In the latter case \Answered, $Forwarded and \Draft flags were lost 650 on COPY, as the user has no "w" right in the target mailbox. 652 Expunging the selected mailbox: 653 EXPUNGE - "e" right on the selected mailbox. 655 CLOSE - "e" right on the selected mailbox. If the server is unable to 656 expunge the mailbox because the user doesn't have the "e" right, 657 the server MUST ignore expunge request, close the mailbox 658 and return tagged OK response. 660 Fetch information about a mailbox and its messages: 661 SELECT/EXAMINE/STATUS - "r" right on the mailbox. 663 FETCH - A FETCH request that implies setting \Seen flag MUST NOT set it, 664 if the current user doesn't have "s" right. 666 Changing flags: 667 STORE - the server MUST check if the user has 668 "t" right - when the user modifies \Deleted flag 669 "s" right - when the user modifies \Seen flag 670 "w" right for all other message flags. 671 STORE operation SHOULD NOT fail if the user has rights to modify at least 672 one flag specified in the STORE, as the tagged NO response to a STORE 673 command is not handled very well by deployed clients. 675 Changing ACLs: 676 SETACL/DELETEACL - "a" right on the mailbox. 678 Reading ACLs: 679 GETACL - "a" right on the mailbox. 681 MYRIGHTS - any of the following rights is required to perform 682 the operation: "l", "r", "i", "k", "x", "a". 684 LISTRIGHTS - "a" right on the mailbox. 686 6. Other considerations 688 6.1. Additional requirements and Implementation notes 690 6.1.1. Servers 692 This document defines an additional capability that is used to announce 693 the list of extra rights (excluding the ones defined in the RFC 2086) 694 supported by the server. The set of rights MUST include "t", "e", "x" 695 and "k". Note that the extra rights can appear in any order. 697 Example: C: 1 capability 698 S: * CAPABILITY IMAP4REV1 STARTTLS LITERAL+ ACL RIGHTS=texk 699 S: 1 OK completed 701 Any server implementing an ACL extension MUST accurately reflect the current 702 user's rights in FLAGS and PERMANENTFLAGS responses. 704 Example: C: A142 SELECT INBOX 705 S: * 172 EXISTS 706 S: * 1 RECENT 707 S: * OK [UNSEEN 12] Message 12 is first unseen 708 S: * OK [UIDVALIDITY 3857529045] UIDs valid 709 S: * OK [UIDNEXT 4392] Predicted next UID 710 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 711 S: * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \*)] Limited 712 S: A142 OK [READ-WRITE] SELECT completed 713 C: A143 MYRIGHTS INBOX 714 S: * MYRIGHTS INBOX lrwis 715 S: A143 OK completed 717 Note that in order to get better performance the client MAY pipeline 718 SELECT and MYRIGHTS commands: 720 C: A142 SELECT INBOX 721 C: A143 MYRIGHTS INBOX 722 S: * 172 EXISTS 723 S: * 1 RECENT 724 S: * OK [UNSEEN 12] Message 12 is first unseen 725 S: * OK [UIDVALIDITY 3857529045] UIDs valid 726 S: * OK [UIDNEXT 4392] Predicted next UID 727 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 728 S: * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \*)] Limited 729 S: A142 OK [READ-WRITE] SELECT completed 730 S: * MYRIGHTS INBOX lrwis 731 S: A143 OK completed 733 Servers MAY cache the rights a user has on a mailbox when the mailbox 734 is selected, so that if a client's rights on a mailbox are changed with 735 SETACL or DELETEACL, commands specific to the selected state (e.g., STORE, 736 EXPUNGE) might not reflect the changed rights until the mailbox is 737 re-selected. If the server checks the rights on each command, then it SHOULD 738 send FLAGS and PERMANENTFLAGS responses if they have changed. 739 If such server detects that the user no longer has read access to the 740 mailbox, it MAY send an untagged BYE response and close connection. 741 It MAY also refuse to execute all commands specific to the selected state 742 until the mailbox is closed, however server implementors should note that 743 most clients don't handle NO responses very well. 745 An ACL server MAY modify one or more ACL for one or more identifier as a 746 side effect of modifying the ACL specified in a SETACL/DELETEACL. 747 If the server does that it MUST send untagged ACL response(s) to notify the 748 client about the changes made. 750 An ACL server implementation MUST treat received ACL modification commands 751 as a possible ambiguity with respect to subsequent commands affected by the 752 ACL, as described in section 5.5 of [IMAP4]. Hence a pipeline 753 SETACL + MYRIGHTS is an ambiguity with respect to the server, meaning that 754 the server must execute the SETACL command to completion before the MYRIGHTS. 755 However, clients are permitted to send such a pipeline. 757 6.1.2. Clients 759 The following requirement is put on clients in order to allow for 760 future extensibility. 761 A client implementation that allows a user to read and update ACLs MUST 762 preserve unrecognized rights that it doesn't allow the user to change. 763 I.e., if the client 764 1) can read ACLs 765 and 766 2) can update ACLs 767 but 768 3) doesn't allow the user to change the rights the client doesn't recognize, 769 then it MUST preserve unrecognized rights. 770 Otherwise the client could risk unintentionally removing permissions 771 it doesn't understand. 773 6.2. Mapping of ACL rights to READ-WRITE and READ-ONLY response codes 775 A particular ACL server implementation MAY allow "shared multiuser 776 access" to some mailboxes. "Shared multiuser access" to a mailbox means 777 that multiple different users are able to access the same mailbox, 778 if they have proper access rights. "Shared multiuser access" to the 779 mailbox doesn't mean that the ACL for the mailbox is currently set 780 to allow access by multiple users. Let's denote a "shared multiuser 781 write access" as a "shared multiuser access" when a user may be 782 granted flag modification rights (any of "w", "s" or "t"). 784 Section 5 describes which rights are required for modifying different flags. 786 If the ACL server implements some flags as shared for a mailbox (i.e., 787 the ACL for the mailbox MAY be set up so that changes to those flags are 788 visible to another user), let's call the set of rights associated with these 789 flags (as described in Section 5) for that mailbox collectively as 790 "shared flag rights". Note that "shared flag rights" set MAY be different 791 for different mailboxes. 793 If the server doesn't support "shared multiuser write access" to a 794 mailbox or doesn't implement shared flags on the mailbox, "shared flag 795 rights" for the mailbox is defined to be the empty set. 797 Example 1: Mailbox "banan" allows "shared multiuser write access" and 798 implements flags \Deleted, \Answered and $MDNSent as 799 shared flags. "Shared flag rights" for the mailbox "banan" 800 is a set containing flags "t" (because system flag \Deleted 801 requires "t" right) and "w" (because both \Answered and 802 $MDNSent require "w" right). 804 Example 2: Mailbox "apple" allows "shared multiuser write access" and 805 implements \Seen system flag as shared flag. "Shared flag 806 rights" for the mailbox "apple" contains "s" right, 807 because system flag \Seen requires "s" right. 809 Example 3: Mailbox "pear" allows "shared multiuser write access" and 810 implements flags \Seen, \Draft as shared flags. "Shared flag 811 rights" for the mailbox "apple" is a set containing flags "s" 812 (because system flag \Seen requires "s" right) and "w" 813 (because system flag \Draft requires "w" right). 815 The server MUST include a READ-ONLY response code in the tagged OK response to 816 a SELECT command if none of the following rights is granted to the 817 current user: 818 "i", "e" and "shared flag rights"*. 819 The server SHOULD include a READ-WRITE response code in the tagged OK response 820 if at least one of the "i", "e" or "shared flag rights"* is granted to the 821 current user. 823 * - Note that a future extension to this document may extend the list of 824 rights that causes the server to return the READ-WRITE response code. 826 Example 1 (continued): The user that has "lrs" rights for the mailbox 827 "banan". The server returns READ-ONLY response 828 code on SELECT, as none of "iewt" rights is 829 granted to the user. 831 Example 2 (continued): The user that has "rit" rights for the mailbox 832 "apple". The server returns READ-WRITE response 833 code on SELECT, as the user has "i" right. 835 Example 3 (continued): The user that has "rset" rights for the mailbox 836 "pear". The server returns READ-WRITE response 837 code on SELECT, as the user has "e" and "s" rights. 839 7. Security Considerations 841 An implementation MUST make sure the ACL commands themselves do not 842 give information about mailboxes with appropriately restricted ACL's. 843 For example, when a user agent executes a GETACL command on a mailbox 844 that the user has no permission to LIST, the server would respond to that 845 request with the same error that would be used if the mailbox did not exist, 846 thus revealing no existence information, much less the mailbox's ACL. 848 IMAP clients implementing ACL that are able to modify ACLs SHOULD 849 warn a user that wants to give full access (or even just the "a" right) 850 to the special identifier "anyone". 852 8. Formal Syntax 854 Formal syntax is defined using ABNF [ABNF] as modified by [IMAP4]. 855 Non-terminals referenced but not defined below are as defined by 856 [IMAP4]. 858 Except as noted otherwise, all alphabetic characters are 859 case-insensitive. The use of upper or lower case characters to 860 define token strings is for editorial clarity only. Implementations 861 MUST accept these strings in a case-insensitive fashion. 863 LOWER-ALPHA = %x61-7A ;; a-z 865 acl-data = "ACL" SP mailbox *(SP identifier SP 866 rights) 868 capability =/ rights-capa 870 command-auth =/ setacl / deleteacl / getacl / 871 listrights / myrights 873 deleteacl = "DELETEACL" SP mailbox SP identifier 875 getacl = "GETACL" SP mailbox 877 identifier = astring 879 listrights = "LISTRIGHTS" SP mailbox SP identifier 881 listrights-data = "LISTRIGHTS" SP mailbox SP identifier 882 SP rights *(SP rights) 884 mailbox-data =/ acl-data / listrights-data / myrights-data 886 mod-rights = astring 887 ;; +rights to add, -rights to remove 888 ;; rights to replace 890 myrights = "MYRIGHTS" SP mailbox 892 myrights-data = "MYRIGHTS" SP mailbox SP rights 894 new-rights = 1*LOWER-ALPHA 895 ;; MUST include "t", "e", "x" and "k". 896 ;; MUST NOT include standard rights listed 897 ;; in section 3.2 899 rights = astring 900 ;; only lowercase ASCII letters and digits 901 ;; are allowed. 903 rights-capa = "RIGHTS=" new-rights 904 ;; RIGHTS=... capability 906 setacl = "SETACL" SP mailbox SP identifier 907 SP mod-rights 909 9. IANA Considerations 911 IMAP4 capabilities are registered by publishing a standards track or 912 IESG approved experimental RFC. The registry is currently located 913 at: 915 http://www.iana.org/assignments/imap4-capabilities 917 This document defines the RIGHTS= IMAP capability. IANA is requested 918 to add this capability to the registry. 920 10. Internationalization Considerations 922 Section 4 states requirements on servers regarding internationalization 923 of identifiers. 925 11. References 927 11.1. Normative References 929 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate 930 Requirement Levels", RFC 2119, Harvard University, March 1997. 932 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications: 933 ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd, 934 November 1997. 936 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 937 4rev1", RFC 3501, University of Washington, March 2003. 939 [UTF-8] Yergeau, F., "UTF-8, a transformation format of IS0 10646", 940 RFC 3629, Alis Technologies, November 2003. 942 [Stringprep] Hoffman, P., Blanchet, M., "Preparation of 943 Internationalized Strings ("stringprep")", RFC 3454, December 2002. 945 [SASLprep] Zeilenga, K., "SASLprep: Stringprep profile for User Names 946 and Passwords", RFC 4013, February 2005. 948 11.2. Informative References 950 [RFC2086] Myers, J., "IMAP4 ACL extension", RFC 2086, Carnegie Mellon, 951 January 1997. 953 12. Editor's Address 955 Alexey Melnikov 956 email: alexey.melnikov@isode.com 958 Isode Limited 960 13. IPR Disclosure Acknowledgement 962 By submitting this Internet-Draft, each author represents that any 963 applicable patent or other IPR claims of which he or she is aware 964 have been or will be disclosed, and any of which he or she becomes 965 aware will be disclosed, in accordance with Section 6 of BCP 79. 967 14. Intellectual Property Statement 969 The IETF takes no position regarding the validity or scope of any 970 Intellectual Property Rights or other rights that might be claimed 971 to pertain to the implementation or use of the technology 972 described in this document or the extent to which any license 973 under such rights might or might not be available; nor does it 974 represent that it has made any independent effort to identify any 975 such rights. Information on the procedures with respect to rights 976 in RFC documents can be found in BCP 78 and BCP 79. 978 Copies of IPR disclosures made to the IETF Secretariat and any 979 assurances of licenses to be made available, or the result of an 980 attempt made to obtain a general license or permission for the use 981 of such proprietary rights by implementers or users of this 982 specification can be obtained from the IETF on-line IPR repository 983 at http://www.ietf.org/ipr. 985 The IETF invites any interested party to bring to its attention 986 any copyrights, patents or patent applications, or other 987 proprietary rights that may cover technology that may be required 988 to implement this standard. Please address the information to the 989 IETF at ietf-ipr@ietf.org. 991 15. Full Copyright Statement 993 Copyright (C) The Internet Society (2005). 995 This document is subject to the rights, licenses and restrictions 996 contained in BCP 78, and except as set forth therein, the authors 997 retain all their rights. 999 This document and the information contained herein are provided on an 1000 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1001 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 1002 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 1003 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 1004 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1005 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1007 Acknowledgement 1009 Funding for the RFC Editor function is currently provided by the 1010 Internet Society. 1012 Appendix A. Changes since RFC 2086 1014 1. Changed the charset of "identifier" from US-ASCII to UTF-8. 1016 2. Specified that mailbox deletion is controled by the "x" right and 1017 EXPUNGE is controlled by the "e" right. 1019 3. Added the "t" right that controls STORE \Deleted. Redefined the "d" 1020 right to be a macro for "e", "t" and possibly "x". 1022 4. Added the "k" right that controls CREATE. Redefined the "c" 1023 right to be a macro for "k" and possibly "x". 1025 5. Specified that the "a" right also controls DELETEACL. 1027 6. Specified that the "r" right also controls STATUS. 1029 7. Removed the requirement to check the "r" right for CHECK, SEARCH and 1030 FETCH, as this is required for SELECT/EXAMINE to be successful. 1032 8. LISTRIGHTS requires the "a" right on the mailbox (same as SETACL). 1034 9. Deleted "PARTIAL", this is a deprecated feature of RFC 1730. 1036 10. Specified that the "w" right controls setting flags other than \Seen 1037 and \Deleted on APPEND. Also specified that the "s" right controls 1038 the \Seen flag and that the "t" right controls the \Deleted flag. 1040 11. Specified that SUBSCRIBE is NOT allowed with the "r" right. 1042 12. Specified that the "l" right controls SUBSCRIBE. 1044 13. GETACL is NOT allowed with the "r" right, even though there are 1045 several implementations that allows that. If a user only has "r" 1046 right, GETACL can disclose information about identifiers existing 1047 on the mail system. 1049 14. Clarified that RENAME requires the "k" right for the new parent and 1050 the "x" right for the old name. 1052 15. Added new section that describes which rights are required and/or 1053 checked when performing various IMAP commands. 1055 16. Added mail client security considerations when dealing with special 1056 identifier "anyone". 1058 17. Clarified that negative rights are not the same as DELETEACL. 1060 18. Added "Compatibility with RFC 2086" section. 1062 19. Added section about mapping of ACL rights to READ-WRITE and READ-ONLY 1063 response codes. 1065 20. Changed BNF to ABNF. 1067 21. Added "Implementation Notes" section. 1069 22. Updated "References" section. 1071 23. Added more examples. 1073 24. Clarified when the virtual "c" and "d" rights are returned in ACL, 1074 MYRIGHTS and LISTRIGHTS responses. 1076 Appendix B. Compatibility with RFC 2086 1078 This non-normative section gives guidelines how an existing RFC 2086 1079 server implementation may be updated to comply with this document. 1081 This document splits the "d" right into several new different rights: 1082 "t", "e" and possibly "x" (see section 3.1.1 for more details). The "d" 1083 right remains for backwards-compatibility but it is a virtual right. 1084 There are two approaches for RFC2086 server implementors to 1085 handle the "d" right and the new rights that have replaced it. 1087 a). "t", "e" (and possibly "x) together - almost no changes. 1088 b). Implement separate "x", "t" and "e". Return the "d" right in a 1089 MYRIGHTS response or an ACL response containing ACL 1090 information when any of the "t", "e" (and "x") is granted. 1092 In a similar manner this document splits the "c" right into several 1093 new different rights: "k" and possibly "x" (see section 3.1.1 for more 1094 details). The "c" right remains for backwards-compatibility but it is 1095 a virtual right. Again, RFC2086 server implementors can choose 1096 to tie rights or to implement separate rights, as described above. 1098 Also check Sections 6.1 and 6.2, as well as the appendix A to see 1099 other changes required. Server implementors should check which rights 1100 are required to invoke different IMAP4 commands as described in 1101 Section 5. 1103 Appendix C. Known deficiencies 1105 This specification has some known deficiencies including: 1107 1. This is inadequate to provide complete read-write access to 1108 mailboxes protected by Unix-style rights bits because there is no 1109 equivalent to "chown" and "chgrp" commands nor is there a good way 1110 to discover such limitations are present. 1112 2. Because this extension leaves the specific semantics of how rights 1113 are combined by the server as implementation defined, the ability 1114 to build a user-friendly interface is limited. 1116 3. Users, groups, and special identifiers (e.g. anyone) exist in the 1117 same namespace. 1119 The work-in-progress "ACL2" extension is intended to redesign this 1120 extension to address these deficiencies without the constraint of 1121 backwards-compatibility and may eventually supercede this facility. 1122 However, RFC 2086 is deployed in multiple implementations so this 1123 intermediate step which fixes the straightforward deficiencies in a 1124 backwards compatible fashion is considered worthwhile. 1126 Appendix D. Acknowledgment 1128 This document is a revision of the RFC 2086 written by John G. Myers. 1130 Editor appreciates comments received from Mark Crispin, Chris Newman, 1131 Cyrus Daboo, John G. Myers, Dave Cridland, Ken Murchison, Steve Hole, 1132 Vladimir Butenko, Larry Greenfield, Robert Siemborski, Harrie 1133 Hazewinkel, Philip Guenther, Brian Candler, Curtis King, Lyndon 1134 Nerenberg, Lisa Dusseault, Arnt Gulbrandsen and other participants 1135 of the IMAPEXT working group.