draft-ietf-imapext-acl-07.txt   draft-ietf-imapext-acl-08.txt 
IMAPEXT Working Group A. Melnikov IMAPEXT Working Group A. Melnikov
Internet Draft Editor Internet Draft Editor
Document: draft-ietf-imapext-acl-07.txt February 2003 Document: draft-ietf-imapext-acl-08.txt June 2003
IMAP4 ACL extension IMAP4 ACL extension
Status of this Memo Status of this Memo
This document is an Internet Draft and is in full conformance with This document is an Internet Draft and is in full conformance with
all provisions of Section 10 of RFC 2026. all provisions of Section 10 of RFC 2026.
Internet Drafts are working documents of the Internet Engineering Internet Drafts are working documents of the Internet Engineering
Task Force (IETF), its Areas, and its Working Groups. Note that Task Force (IETF), its Areas, and its Working Groups. Note that
skipping to change at line 55 skipping to change at line 55
3). IANA registry for <vendorname> prefix in identifiers? 3). IANA registry for <vendorname> prefix in identifiers?
4). ACL2 interaction with QUOTA extension should be moved to "QUOTA=" 4). ACL2 interaction with QUOTA extension should be moved to "QUOTA="
document? document?
5). Do we need the following functionality: discover the set of rights 5). Do we need the following functionality: discover the set of rights
which may be granted to a given identifier in the ACL for a given which may be granted to a given identifier in the ACL for a given
mailbox? mailbox?
6). There is a proposal to replace MYRIGHT with either ACL FETCH or 6). Cleanup appendix A before publication as RFC, as some changes don't
ACL CHECK:
ACL FETCH is slightly different than MYRIGHTS in that it takes
an identifier as an argument and returns the rights for that
identifier (?? is this desirable ??).
Or perhaps there could be an ACL CHECK that, given an identifier
and a set of right, returns whether or not that identifier has
those rights. ACL CHECK is probably more useful.
For now MYRIGHTS is left as is, because neither parameters, nor
responses were affected by the change to identifiers. However,
if there is a desire to accept multiple mailboxes or mailbox masks
in MYRIGHT, it would be better to change it to ACL <something> as well.
7). Cleanup appendix A before publication as RFC, as some changes don't
apply to RFC 2086. apply to RFC 2086.
8). Other editorial comments/questions are enclosed in << and >>. 7). Other editorial comments/questions are enclosed in << and >>.
Table of Contents Table of Contents
1 Abstract .................................................. X 1 Abstract .................................................. X
2 Conventions Used in this Document ......................... X 2 Conventions Used in this Document ......................... X
3 Introduction and Overview ................................. X 3 Introduction and Overview ................................. X
3.1 Access Control ........................................... X 3.1 Access Control ........................................... X
3.2 Access calculation model ................................. X 3.2 Access calculation model ................................. X
3.3 Rights required to perform different IMAP4rev1 commands .. X 3.3 Rights required to perform different IMAP4rev1 commands .. X
4 ACL manipulation commands ................................. X 4 ACL manipulation commands ................................. X
4.1 ACL STORE ................................................ X 4.1 ACL STORE ................................................ X
4.2 ACL DELETE ............................................... X 4.2 ACL DELETE ............................................... X
4.3 ACL SET .................................................. X 4.3 ACL SET .................................................. X
4.4 ACL GET .................................................. X 4.4 LIST with the ACL parameter .............................. X
4.5 MYRIGHTS ................................................. X 4.5 LIST with the MYRIGHTS parameter ......................... X
5 ACL related responses ..................................... X 5 ACL related responses ..................................... X
5.1 Extended LIST response with ACL information .............. X 5.1 Extended LIST response with ACL information .............. X
5.2 RIGHTS-INFO .............................................. X 5.2 RIGHTS-INFO .............................................. X
5.3 ACLFAILED untagged response .............................. X 5.3 ACLFAILED untagged response .............................. X
5.4 MYRIGHTS untagged response ............................... X 5.4 Extended LIST response with MYRIGHTS information ......... X
5.5 MYRIGHTS response code ................................... X 5.5 MYRIGHTS response code ................................... X
6 Formal Syntax ............................................. X 6 Formal Syntax ............................................. X
7 IANA considerations ....................................... X 7 IANA considerations ....................................... X
7.1 ACL access calculation rule Registration Template ........ X 7.1 ACL access calculation rule Registration Template ........ X
7.2 Initial Registrations .................................... X 7.2 Initial Registrations .................................... X
7.2.1 Registration: UNION access calculation rule ............ X 7.2.1 Registration: UNION access calculation rule ............ X
7.2.2 Registration: MOST-SPECIFIC access calculation rule .... X 7.2.2 Registration: MOST-SPECIFIC access calculation rule .... X
8 Security Considerations ................................... X 8 Security Considerations ................................... X
9 Other considerations ...................................... X 9 Other considerations ...................................... X
9.1 Compatibility with RFC 2086 .............................. X 9.1 Compatibility with RFC 2086 .............................. X
skipping to change at line 176 skipping to change at line 160
administrative rights for the server. administrative rights for the server.
e). "user=<username>" - refers to a user. Here "<username>" is a user name e). "user=<username>" - refers to a user. Here "<username>" is a user name
string accepted by the LOGIN or AUTHENTICATE commands. string accepted by the LOGIN or AUTHENTICATE commands.
f). "group=<groupname>" - refers to a group. Here "<groupname>" is a group f). "group=<groupname>" - refers to a group. Here "<groupname>" is a group
name. name.
g). "vendor=<vendorname>.<xxx>" - refers to a vendor specific special g). "vendor=<vendorname>.<xxx>" - refers to a vendor specific special
identifier, not covered by a).-f). identifier, not covered by a).-f).
h). "-<identifier>", where <identifier> is one of a).-g). This is h). "-<identifier>", where <identifier> is one of a).-g). This is
reserved for "negative rights", described below. reserved for "negative rights", described below.
Note that a server is not required to implement any special identifier mentioned Note, that a server is not required to implement any special identifier mentioned
above. However if it allows a user to perform ACL operations on any one of them, above. However if it allows a user to perform ACL operations on any one of them,
server MUST use the semantic as described above. server MUST use the semantic as described above.
Also note, that this document doesn't define how groups and administrators
are managed.
All other identifier names are reserved for future definition in an All other identifier names are reserved for future definition in an
extension or revision to this specification (also known as ACL2). extension or revision to this specification (also known as ACL2).
Rights is a string listing a (possibly empty) set of alphanumeric Rights is a string listing a (possibly empty) set of alphanumeric
characters, each character listing a set of operations which is being characters, each character listing a set of operations which is being
controlled. Letters are reserved for ''standard'' rights, listed controlled. Letters are reserved for ''standard'' rights, listed
below. The set of standard rights may only be extended by a below. The set of standard rights may only be extended by a
standards-track document. Digits are reserved for implementation or standards-track document. Digits are reserved for implementation or
site defined rights. The currently defined standard rights are: site defined rights. The currently defined standard rights are:
l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox) l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox)
r - read (SELECT the mailbox, perform STATUS, CHECK, FETCH, SEARCH, r - read (SELECT the mailbox, perform STATUS, CHECK, FETCH, SEARCH,
COPY from mailbox) COPY from mailbox)
s - keep seen/unseen information across sessions (set or clear \SEEN flag s - keep seen/unseen information across sessions (set or clear \SEEN flag
via STORE, APPEND or COPY) via STORE, APPEND or COPY)
w - write (set or clear flags other than \SEEN and \DELETED via STORE, w - write (set or clear flags other than \SEEN and \DELETED via STORE,
APPEND or COPY) APPEND or COPY)
i - insert (perform APPEND, COPY into mailbox) i - insert (perform APPEND, COPY into mailbox)
p - post (send mail to submission address for mailbox, p - post (send mail to submission address for mailbox,
not enforced by IMAP4 itself) not enforced by IMAP4 itself. The format of the submission address
is not defined by this document)
c - create mailboxes (CREATE new sub-mailboxes in any c - create mailboxes (CREATE new sub-mailboxes in any
implementation-defined hierarchy, parent mailbox for the new implementation-defined hierarchy, parent mailbox for the new
mailbox name in RENAME). mailbox name in RENAME)
When a new mailbox is created it SHOULD inherit rights from When a new mailbox is created it SHOULD inherit rights from
the parent mailbox (if one exists) in the defined hierarchy. the parent mailbox (if one exists) in the defined hierarchy.
x - delete mailbox (DELETE mailbox, old mailbox name in RENAME) x - delete mailbox (DELETE mailbox, old mailbox name in RENAME)
t - delete messages (set or clear \DELETED flag via STORE, set \DELETED flag t - delete messages (set or clear \DELETED flag via STORE, set \DELETED flag
during APPEND/COPY) during APPEND/COPY)
e - perform EXPUNGE and expunge as a part of CLOSE e - perform EXPUNGE and expunge as a part of CLOSE
d - This right is defined for backward compatibility with ACL d - This right is defined for backward compatibility with ACL
extension (RFC 2086). If a client sets "d" right, the server MUST extension (RFC 2086). If a client sets "d" right, the server MUST
set "x", "e" and "t" rights. When the client clears the "d" right, set "x", "e" and "t" rights. When the client clears the "d" right,
the server MUST clear "x", "e" and "t" rights. When all three of "x", the server MUST clear "x", "e" and "t" rights. When all three of "x",
"e" and "t" are set, the server MUST return "d" right in response to "e" and "t" are set, the server MUST return "d" right in response to
an ACL GET command. If "x", "e" and "t" rights are not tied together, a LIST (ACL) command. If "x", "e" and "t" rights are not tied together,
"d" right MUST NOT be returned in a RIGHTS-INFO response. "d" right MUST NOT be returned in a RIGHTS-INFO response.
a - administer (perform ACL STORE, ACL SET and ACL DELETE) a - administer (perform ACL STORE, ACL SET and ACL DELETE)
An implementation may tie rights together or may force rights to An implementation may tie rights together or may force rights to
always or never be granted to particular identifiers. For example, always or never be granted to particular identifiers. For example,
in an implementation that uses unix mode bits, the rights "wisd" are in an implementation that uses unix mode bits, the rights "wisd" are
tied, the "a" right is always granted to the owner of a mailbox and tied, the "a" right is always granted to the owner of a mailbox and
is never granted to another user. If rights are tied in an is never granted to another user. If rights are tied in an
implementation, the implementation must be conservative in granting implementation, the implementation must be conservative in granting
rights in response to ACL STORE commands--unless all rights in a tied rights in response to ACL STORE commands--unless all rights in a tied
skipping to change at line 261 skipping to change at line 249
example, an ACL may include rights to be granted to the identifier example, an ACL may include rights to be granted to the identifier
matching the user, one or more implementation-defined identifiers matching the user, one or more implementation-defined identifiers
matching groups which include the user, and/or the identifier matching groups which include the user, and/or the identifier
"anyone". How these rights are combined to determine the user's "anyone". How these rights are combined to determine the user's
access is implementation-defined. The set of rules that describes access is implementation-defined. The set of rules that describes
how access is calculated is defined by a rule identifier (rule-ID). how access is calculated is defined by a rule identifier (rule-ID).
This document doesn't define any commands for manipulating a group This document doesn't define any commands for manipulating a group
membership. membership.
A client may determine the set of rights granted to the logged-in user A client may determine the set of rights granted to the logged-in user
for a given mailbox by using the MYRIGHTS command. for a given mailbox by using the LIST (MYRIGHTS) command.
This document defines two initial access calculation models: UNION and This document defines two initial access calculation models: UNION and
MOST-SPECIFIC. MOST-SPECIFIC.
If a server implementing ACL2 uses the union of the rights granted to If a server implementing ACL2 uses the union of the rights granted to
the applicable identifiers minus the union of the negative rights the applicable identifiers minus the union of the negative rights
in order to calculate access, it MUST report "ACL2=UNION" in the server's in order to calculate access, it MUST report "ACL2=UNION" in the server's
capability list. See also section 7.2.1. capability list. See also section 7.2.1.
An implementation may instead choose to only use those rights granted An implementation may instead choose to only use those rights granted
skipping to change at line 288 skipping to change at line 276
or start with "X-". The server MUST report one and only one "ACL2=<rule-ID>" or start with "X-". The server MUST report one and only one "ACL2=<rule-ID>"
capability in its CAPABILITY response. capability in its CAPABILITY response.
3.3. Rights required to perform different IMAP4rev1 commands 3.3. Rights required to perform different IMAP4rev1 commands
Before executing a command an ACL2 compliant server must check which rights Before executing a command an ACL2 compliant server must check which rights
are required to perform it. This section groups command by functions are required to perform it. This section groups command by functions
they perform and list the rights required. It also gives the detailed they perform and list the rights required. It also gives the detailed
description of any special processing required. description of any special processing required.
The table below summarizes different rights or their combinations that are
required in order to perform different IMAP operations. As it is not always
possible to express complex right checking and interactions, the description
after the table should be used as the primary reference.
+---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+
| Operations\Rights | l | r | s | w | i | c | x | t | e | a | Any | None |
+---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+
| LIST | + | | | | | | | | | | | |
| SUBSCRIBE | * | | | | | | | | | | | * |
| UNSUBSCRIBE | | | | | | | | | | | | + |
| LSUB | * | | | | | | | | | | | * |
| CREATE (for parent) | | | | | | + | | | | | | |
| DELETE | | | | | | | + | | | | | |
| RENAME | | | | | | + | + | | | | | |
| COPY/APPEND | | | ? | ? | + | | | ? | | | | |
| EXPUNGE/CLOSE | | | | | | | | | + | | | |
|SELECT/EXAMINE/STATUS| | | | | | | | | | | | |
| FETCH | | | ? | | | | | | | | | |
| STORE flags | | | ? | ? | | | | ? | | | | |
|ACL STORE/DELETE/SET | ? | | | | | | | | | + | | |
| LIST (ACL) | ? | | | | | | | | | + | | |
| LIST (MYRIGHTS)| | | | | | | | | | | + | |
+---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+
Legend:
+ - The right is required
* - Only one of the rights marked with * is required (see description below)
? - The right is optional (see description below)
"Any" - at least one of the "l", "r", "i", "c", "x", "e", "a" rights is
required
"None" - No rights required to perform the command
Listing and subscribing/unsubscribing mailboxes: Listing and subscribing/unsubscribing mailboxes:
LIST - "l" right is required. LIST - "l" right is required.
Note, that if the user has "l" right to a mailbox "A/B", but not to its parent Note, that if the user has "l" right to a mailbox "A/B", but not to its parent
mailbox "A", the LIST command should behave as if the mailbox "A" doesn't exist, mailbox "A", the LIST command should behave as if the mailbox "A" doesn't exist,
for example: for example:
C: A777 LIST "" * C: A777 LIST "" *
S: * LIST (\NoInferiors) "/" "A/B" S: * LIST (\NoInferiors) "/" "A/B"
S: * LIST () "/" "C" S: * LIST () "/" "C"
S: * LIST (\NoInferiors) "/" "C/D" S: * LIST (\NoInferiors) "/" "C/D"
skipping to change at line 333 skipping to change at line 354
Before performing a COPY/APPEND command the server MUST check if the user has "i" right Before performing a COPY/APPEND command the server MUST check if the user has "i" right
for the target mailbox. If the user doesn't have "i" right, the operation fails. for the target mailbox. If the user doesn't have "i" right, the operation fails.
Otherwise for each copied/appended message the server MUST check if the user has Otherwise for each copied/appended message the server MUST check if the user has
"t" right - when the message has \Deleted flag set "t" right - when the message has \Deleted flag set
"s" right - when the message has \Seen flag set "s" right - when the message has \Seen flag set
"w" right for all other message flags. "w" right for all other message flags.
Only when the user has a particular right the corresponding flags are stored for the Only when the user has a particular right the corresponding flags are stored for the
newly created message. The server MUST NOT fail a COPY/APPEND if the user has no rights newly created message. The server MUST NOT fail a COPY/APPEND if the user has no rights
to set a particular flag. to set a particular flag.
Example: C: A003 MYRIGHTS TargetMailbox Example: C: A003 LIST (MYRIGHTS) "" TargetMailbox
S: * MYRIGHTS INBOX rwis S: * LIST () "/" TargetMailbox (("MYRIGHTS" "rwis"))
S: A003 OK Myrights complete S: A003 OK Myrights complete
C: A004 FETCH 1:3 (FLAGS) C: A004 FETCH 1:3 (FLAGS)
S: * 1 FETCH (FLAGS (\Draft \Deleted) S: * 1 FETCH (FLAGS (\Draft \Deleted)
S: * 2 FETCH (FLAGS (\Answered) S: * 2 FETCH (FLAGS (\Answered)
S: * 3 FETCH (FLAGS ($Forwarded \Seen) S: * 3 FETCH (FLAGS ($Forwarded \Seen)
S: A004 OK Fetch Completed S: A004 OK Fetch Completed
C: A005 COPY 1:3 TargetMailbox C: A005 COPY 1:3 TargetMailbox
S: A005 OK Copy completed S: A005 OK Copy completed
skipping to change at line 361 skipping to change at line 382
C: A007 FETCH 77:79 (FLAGS) C: A007 FETCH 77:79 (FLAGS)
S: * 77 FETCH (FLAGS (\Draft) S: * 77 FETCH (FLAGS (\Draft)
S: * 78 FETCH (FLAGS (\Answered) S: * 78 FETCH (FLAGS (\Answered)
S: * 79 FETCH (FLAGS ($Forwarded \Seen) S: * 79 FETCH (FLAGS ($Forwarded \Seen)
S: A007 OK Fetch Completed S: A007 OK Fetch Completed
\Deleted flag was lost on COPY, as the user has no "t" right in the \Deleted flag was lost on COPY, as the user has no "t" right in the
target mailbox. target mailbox.
If the MYRIGHT command with the tag A003 would have returned: If the LIST (MYRIGHT) command with the tag A003 would have returned:
S: * MYRIGHTS INBOX rsti S: * LIST () "/" TargetMailbox (("MYRIGHTS" "rsti"))
the response from the FETCH with the tag A007 would have been: the response from the FETCH with the tag A007 would have been:
C: A007 FETCH 77:79 (FLAGS) C: A007 FETCH 77:79 (FLAGS)
S: * 77 FETCH (FLAGS (\Deleted) S: * 77 FETCH (FLAGS (\Deleted)
S: * 78 FETCH (FLAGS () S: * 78 FETCH (FLAGS ()
S: * 79 FETCH (FLAGS (\Seen) S: * 79 FETCH (FLAGS (\Seen)
S: A007 OK Fetch Completed S: A007 OK Fetch Completed
In the latter case \Answered, $Forwarded and \Draft flags were lost In the latter case \Answered, $Forwarded and \Draft flags were lost
skipping to change at line 401 skipping to change at line 422
"t" right - when the user modifies \Deleted flag "t" right - when the user modifies \Deleted flag
"s" right - when the user modifies \Seen flag "s" right - when the user modifies \Seen flag
"w" right for all other message flags. "w" right for all other message flags.
STORE operation SHOULD NOT fail if the user has rights to modify at least STORE operation SHOULD NOT fail if the user has rights to modify at least
one flag specified in the STORE. one flag specified in the STORE.
Changing ACLs: Changing ACLs:
ACL STORE/DELETE/SET - "a" right on the mailbox (*). ACL STORE/DELETE/SET - "a" right on the mailbox (*).
Reading ACLs: Reading ACLs:
ACL GET - "a" right on the mailbox (*). LIST (ACL) - "a" right on the mailbox (*).
MYRIGHTS - any of the following rights is required to perform the operation: LIST (MYRIGHTS) - any of the following rights is required to perform
"l", "r", "i", "c", "x", "e", "a". the operation: "l", "r", "i", "c", "x", "e", "a".
(*) Note, that when one or more mailbox pattern is specified, (*) Note, that when one or more mailbox pattern is specified,
'l' right is required for each mailbox matching the mailbox pattern(s). 'l' right is required for each mailbox matching the mailbox pattern(s).
4. ACL manipulation commands 4. ACL manipulation commands
All ACL commands (i.e. ACL STORE/DELETE/SET/GET, except for MYRIGHTS) All ACL commands (i.e. ACL STORE/DELETE/SET)
accept either a single mailbox name or several mailbox patterns as a accept either a single mailbox name or several mailbox patterns as a
parameter. Mailbox pattern is a mailbox with wildcards, wildcards are parameter. Mailbox pattern is a mailbox with wildcards, wildcards are
interpreted as described in [IMAP4] LIST command. In order to distinguish interpreted as described in [IMAP4] LIST command. In order to distinguish
between a mailbox name (that is allowed to have wildcard characters '*' between a mailbox name (that is allowed to have wildcard characters '*'
and '%') and a mailbox pattern, the latter is always represented as a and '%') and a mailbox pattern, the latter is always represented as a
parenthesized list. parenthesized list.
For simplicity the behaviour of ACL STORE/DELETE/SET/GET commands For simplicity the behaviour of ACL STORE/DELETE/SET commands
is described for a single mailbox case. When one or more mailbox pattern is described for a single mailbox case. When one or more mailbox pattern
is specified, the server internally performs LIST command for all specified is specified, the server internally performs LIST command for all specified
patterns and than it combines the results. Note, that only mailboxes for patterns and than it combines the results. Note, that only mailboxes for
which the user has 'l' right are included in the combined result. If the which the user has 'l' right are included in the combined result. If the
combined result has no mailboxes, an ACL operation completes with success combined result has no mailboxes, an ACL operation completes with success
and the tagged OK response is sent. Otherwise the requested operation is and the tagged OK response is sent. Otherwise the requested operation is
performed for each mailbox in the combined result. If a particular mailbox performed for each mailbox in the combined result. If a particular mailbox
causes the operation to fail (e.g. insufficient permissions), instead of causes the operation to fail (e.g. insufficient permissions), instead of
failing the whole command, an untagged ACLFAILED or RIGHTS-INFO response failing the whole command, an untagged ACLFAILED or RIGHTS-INFO response
is sent for this mailbox and the operation continues for the rest of the is sent for this mailbox and the operation continues for the rest of the
skipping to change at line 536 skipping to change at line 557
Result: OK - replaceacl completed Result: OK - replaceacl completed
NO - replaceacl failure: can't replace acl NO - replaceacl failure: can't replace acl
BAD - command unknown or arguments invalid BAD - command unknown or arguments invalid
The ACL SET command replaces the access control list of the The ACL SET command replaces the access control list of the
specified mailbox with the one provided as the second parameter to specified mailbox with the one provided as the second parameter to
ACL SET. This command is semantically equivalent to the following ACL SET. This command is semantically equivalent to the following
sequence of commands: sequence of commands:
1). ACL GET <mailbox name> 1). LIST (ACL) "" <mailbox name>
2). For each (authentication identifier AID, access rights RD) pair returned 2). For each (authentication identifier AID, access rights RD) pair returned
in the untagged ACL response that was caused by ACL GET, perform in the untagged LIST response that was caused by LIST (ACL), perform
ACL DELETE <mailbox name> AID ACL DELETE <mailbox name> AID
3). For each (authentication identifier AIA, access rights RA) pair from 3). For each (authentication identifier AIA, access rights RA) pair from
the second parameter of ACL SET perform the second parameter of ACL SET perform
ACL STORE <mailbox name> AIA RA ACL STORE <mailbox name> AIA RA
An ACL2 server MAY modify one or more ACL for one or more identifier An ACL2 server MAY modify one or more ACL for one or more identifier
as a side effect of modifying the ACL specified in ACL SET. If the as a side effect of modifying the ACL specified in ACL SET. If the
server does that it MUST send untagged LIST response with ACL information server does that it MUST send untagged LIST response with ACL information
(see section 5.1) to notify the client about the changes made. (see section 5.1) to notify the client about the changes made.
If the server is unwilling to perform the command, because some rights If the server is unwilling to perform the command, because some rights
for an identifier from the second list parameter are tied, it MUST for an identifier from the second list parameter are tied, it MUST
return RIGHTS-INFO untagged response (see section 5.2). return RIGHTS-INFO untagged response (see section 5.2).
4.4. ACL GET 4.4. LIST with the ACL parameter
Arguments: mailbox name or one or more mailbox masks
Data: REQUIRED untagged responses: LIST with ACL information (see 5.1)
Result: OK - ACL GET completed This document defines a new option ACL to the LIST command that requests
NO - ACL GET failure: can't get acl the server to return the corresponding ACLs for all mailboxes that
BAD - command unknown or arguments invalid match the LIST mailbox name. The ACL option causes the server
to return LIST with the ACL information (see 5.1).
The ACL GET command returns the access control list for mailbox in <<List required rights here?>>
an untagged LIST response (see section 5.1).
Example: C: A002 ACL GET INBOX Example: C: A002 LIST (ACL) "" INBOX
S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda")))) S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda"))))
S: A002 OK acl get complete S: A002 OK List with acl info completed
4.5. MYRIGHTS
Arguments: mailbox name
Data: untagged responses: MYRIGHTS
Result: OK - myrights completed 4.5. LIST with the MYRIGHTS parameter
NO - myrights failure: can't get rights
BAD - command unknown or arguments invalid
The MYRIGHTS command returns the set of rights that the user has This document defines a new option MYRIGHTS to the LIST command that requests
to mailbox in an untagged MYRIGHTS reply. the server to return the set of rights that the user has to a mailbox,
that matches the LIST mailbox name. The MYRIGHTS option causes the server
to return LIST with MYRIGHTS information (see 5.4).
The user must have any of the following rights to perform this operation: The user must have any of the following rights to perform this operation:
"l", "r", "i", "c", "x", "e", "a". "l", "r", "i", "c", "x", "e", "a".
If the user doesn't have any right from the above list, the server If the user doesn't have any right from the above list, the server
MUST behave as if the mailbox doesn't exist. MUST behave as if the mailbox doesn't exist.
Example: C: A003 MYRIGHTS INBOX Example: C: A002 LIST (MYRIGHTS) "" INBOX
S: * MYRIGHTS INBOX rwipsldexta S: * LIST () "/" INBOX (("MYRIGHTS" "rwipsldexta"))
S: A003 OK Myrights complete S: A002 OK List with acl info completed
5. ACL related responses 5. ACL related responses
5.1. Extended LIST response with ACL information 5.1. Extended LIST response with ACL information
Contents: name attributes Contents: name attributes
hierarchy delimiter hierarchy delimiter
mailbox name mailbox name
ACL information (zero or more identifier rights pairs) ACL information (zero or more identifier rights pairs)
This version of LIST response occurs as a result of an ACL GET command. This version of LIST response occurs as a result of an LIST (ACL) command.
It MAY also occur as a result of ACL STORE/DELETE/SET. It MAY also occur as a result of ACL STORE/DELETE/SET.
The proposed syntax conforms to the syntax of an extended LIST response The proposed syntax conforms to the syntax of an extended LIST response
as defined by mbox-list-extended ABNF element of [LISTEXT]. as defined by mbox-list-extended ABNF element of [LISTEXT].
The meaning of "name attributes" and "hierarchy delimiter" is described in The meaning of "name attributes" and "hierarchy delimiter" is described in
section 7.2.2 of [IMAP4]. Hierarchy delimiter is followed by a mailbox section 7.2.2 of [IMAP4]. Hierarchy delimiter is followed by a mailbox
name for which this ACL applies. This is followed by extention part that name which this ACL applies to. This is followed by the extension part that
includes "ACL" tag followed by zero or more pairs of strings, each pair includes "ACL" tag followed by zero or more pairs of strings, each pair
contains the identifier for which the entry applies followed by the set contains the identifier followed by the set of rights that the identifier has.
of rights that the identifier has.
<<Name attributes doesn't have to be precise for the purpose of this extention?>>
<<Do we need "ACL" option to the LIST command?>> <<Name attributes doesn't have to be precise for the purpose of this extension?>>
Example: S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda")))) Example: S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda"))))
The example above shows that a user Fred is granted "rwipslextda" The example above shows that a user Fred is granted "rwipslextda"
rights to the mailbox "INBOX". rights to the mailbox "INBOX".
S: * LIST () ":" Drafts (("ACL" S: * LIST () ":" Drafts (("ACL"
(("user=Fred" "rwipslextda") ("group=Devel" "r")))) (("user=Fred" "rwipslextda") ("group=Devel" "r"))))
The example above shows that a user Fred is granted "rwipslextda" The example above shows that a user Fred is granted "rwipslextda"
skipping to change at line 671 skipping to change at line 679
The ACLFAILED response containing a mailbox name indicates that The ACLFAILED response containing a mailbox name indicates that
the ACL operations failed for the specified mailbox. The reason for the ACL operations failed for the specified mailbox. The reason for
failure may be described by the response code (if included). If failure may be described by the response code (if included). If
the command for the mailbox fails because some rights are tied, the command for the mailbox fails because some rights are tied,
the server MUST return RIGHTS-INFO response instead of ACLFAILED. the server MUST return RIGHTS-INFO response instead of ACLFAILED.
Example: C: A002 ACL SET (INBOX Personal/*) user=Fred rwist Example: C: A002 ACL SET (INBOX Personal/*) user=Fred rwist
S: * ACLFAILED Personal/ABC S: * ACLFAILED Personal/ABC
S: A002 OK acl set complete S: A002 OK acl set complete
5.4. MYRIGHTS untagged response 5.4. Extended LIST response with MYRIGHTS information
Data: mailbox name Contents: name attributes
rights hierarchy delimiter
mailbox name
MYRIGHTS information (list of rights)
The MYRIGHTS response occurs as a result of a MYRIGHTS command. This version of LIST response occurs as a result of a LIST (MYRIGHTS)
The first string is the mailbox name for which these rights apply. command. The proposed syntax conforms to the syntax of an extended
The second string is the set of rights that the client has. LIST response as defined by mbox-list-extended ABNF element of [LISTEXT].
The meaning of "name attributes" and "hierarchy delimiter" is described in
section 7.2.2 of [IMAP4]. This is followed by the extension part that
includes "MYRIGHTS" tag followed by the set of rights that the user has.
<<Should this be simplified so that we don't repeat general LIST[EXT] stuff?>>
Example: S: * LIST () "/" Sent (("MYRIGHTS" "lrwiste"))
5.5. MYRIGHTS response code 5.5. MYRIGHTS response code
Data: rights Data: rights
The MYRIGHTS response code is sent in an untagged OK response The MYRIGHTS response code is sent in an untagged OK response
that results from SELECT/EXAMINE. Also this response code can be that results from SELECT/EXAMINE. Also this response code can be
sent at any time after opening a mailbox when the server detects sent at any time after opening a mailbox when the server detects
that the set of rights allowed for the logged in user has changed. that the set of rights allowed for the logged in user has changed.
The MYRIGHT response code is equivalent to MYRIGHTS untagged response The MYRIGHTS response code is equivalent to the MYRIGHTS data returned
for the selected mailbox. in an untagged LIST response for the selected mailbox.
6. Formal Syntax 6. Formal Syntax
Formal syntax is defined using ABNF [ABNF] as modified by [IMAP4]. Formal syntax is defined using ABNF [ABNF] as modified by [IMAP4].
Non-terminals referenced but not defined below are as defined by Non-terminals referenced but not defined below are as defined by
[IMAP4]. [IMAP4] or [LISTEXT].
Except as noted otherwise, all alphabetic characters are Except as noted otherwise, all alphabetic characters are
case-insensitive. The use of upper or lower case characters to case-insensitive. The use of upper or lower case characters to
define token strings is for editorial clarity only. Implementations define token strings is for editorial clarity only. Implementations
MUST accept these strings in a case-insensitive fashion. MUST accept these strings in a case-insensitive fashion.
acl2_command = myrights | "ACL" SP acl2_subcommand acl2_command = "ACL" SP acl2_subcommand | list
acl2_subcommand = replaceacl | deleteacl | updateacl | getacl | listrights acl2_subcommand = replaceacl | deleteacl | updateacl
acl_list_data = "(" acl_list_tag SP acl_data ")" acl_list_data = "(" acl_list_tag SP acl_data ")"
;; acl_list_data conforms to the syntax of ;; acl_list_data conforms to the syntax of
;; mbox-list-extended-item from [LISTEXT] ;; mbox-list-extended-item from [LISTEXT]
acl_list_tag = <"> "ACL" <"> acl_list_tag = <"> "ACL" <">
ace = "(" identifier SP rights ")" ace = "(" identifier SP rights ")"
acl_data = "(" [ace *( SP ace )] ")" acl_data = "(" [ace *( SP ace )] ")"
;; zero or more parenthesized identifier/rights pairs ;; zero or more parenthesized identifier/rights pairs
<<Currently the empty list doesn't conform to mbox-list-extended-item syntax!>> <<Currently the empty list doesn't conform to mbox-list-extended-item syntax!>>
always_granted = rights always_granted = rights
deleteacl = "DELETE" SP mbox_or_pat SP identifier deleteacl = "DELETE" SP mbox_or_pat SP identifier
getacl = "GET" SP mbox_or_pat option =/ "ACL" | "MYRIGHTS"
;; <option> is defined in [LISTEXT]
identifier = astring identifier = astring
;; UTF-8 string with syntax of ident_syntax ;; UTF-8 string with syntax of ident_syntax
ident_syntax = ident | "-" ident ident_syntax = ident | "-" ident
ident = ident_special | ident_user | ident_group | ident = ident_special | ident_user | ident_group |
ident_vendor ident_vendor
ident_special = "anyone" | "authuser" | "owner" | "administrators" ident_special = "anyone" | "authuser" | "owner" | "administrators"
skipping to change at line 747 skipping to change at line 766
ident_group = "group=" ident_detail ident_group = "group=" ident_detail
ident_vendor = "vendor=" ident_vname "." ident_detail ident_vendor = "vendor=" ident_vname "." ident_detail
ident_detail = 1*UTF8-CHAR ident_detail = 1*UTF8-CHAR
ident_vname = 1*UTF8-CHAR ident_vname = 1*UTF8-CHAR
;; MUST NOT contain "." ;; MUST NOT contain "."
listrights = "LIST" SP mbox_or_pat SP identifier
listrights_data = "RIGHTS-INFO" SP mailbox SP identifier listrights_data = "RIGHTS-INFO" SP mailbox SP identifier
SP always_granted *(SP rights) SP always_granted *(SP rights)
mod_rights = quoted mod_rights = quoted
;; +rights to add, -rights to remove ;; +rights to add, -rights to remove
myrights = "MYRIGHTS" SP mailbox myrights_list_data
= "(" "MYRIGHTS" SP rights ")"
myrights_data = "MYRIGHTS" SP mailbox SP rights ;; myrights_list_data conforms to the syntax of
;; mbox-list-extended-item from [LISTEXT]
myrights_rspcod = "MYRIGHTS" SP rights myrights_rspcod = "MYRIGHTS" SP rights
replaceacl = "SET" SP mbox_or_pat *(SP identifier SP rights) replaceacl = "SET" SP mbox_or_pat *(SP identifier SP rights)
resp-text-code =/ myrights_data resp-text-code =/ myrights_rspcod
rights = quoted rights = quoted
;; MUST NOT contain leading "+" or "-" ;; MUST NOT contain leading "+" or "-"
updateacl = "STORE" SP mbox_or_pat SP identifier SP mod_rights updateacl = "STORE" SP mbox_or_pat SP identifier SP mod_rights
mbox_or_pat = mailbox / patterns mbox_or_pat = mailbox / patterns
patterns = "(" list-mailbox *(list-mailbox) ")" patterns = "(" list-mailbox *(list-mailbox) ")"
skipping to change at line 829 skipping to change at line 847
Rule Semantics: specify how access rights for a mailbox are calculated. Rule Semantics: specify how access rights for a mailbox are calculated.
Negative rights allowed: specify whether "negative right" identifiers are Negative rights allowed: specify whether "negative right" identifiers are
allowed. allowed.
Groups allowed: specify whether group identifiers are allowed. Groups allowed: specify whether group identifiers are allowed.
Special Identifiers: describe whether any implementation defined Special Identifiers: describe whether any implementation defined
aliases are allowed and define their meaning. aliases are allowed and define their meaning.
Contact Information: specify the postal and electronic contact Contact Information: specify the electronic (and optionally postal) contact
information for the author of the feature. information for the author of the feature.
7.2. Initial Registrations 7.2. Initial Registrations
7.2.1. Registration: UNION access calculation rule 7.2.1. Registration: UNION access calculation rule
Rule Identification: UNION Rule Identification: UNION
Rule Semantics: the union of the rights granted to Rule Semantics: the union of the rights granted to
the applicable identifiers minus the union of the negative rights. the applicable identifiers minus the union of the negative rights.
skipping to change at line 874 skipping to change at line 892
Special Identifiers: No. Special Identifiers: No.
Contact Information: c.f., the "Editor's Address" section of this Contact Information: c.f., the "Editor's Address" section of this
memo memo
8. Security Considerations 8. Security Considerations
An implementation must make sure the ACL commands themselves do not An implementation must make sure the ACL commands themselves do not
give information about mailboxes with appropriately restricted ACL's. give information about mailboxes with appropriately restricted ACL's.
For example, a ACL GET command on a mailbox for which the user has For example, a LIST (ACL) command on a mailbox for which the user has
insufficient rights should not admit the mailbox exists, much less insufficient rights should not admit the mailbox exists, much less
return the mailbox's ACL. return the mailbox's ACL.
IMAP clients implementing ACL2 that are able to modify ACLs SHOULD IMAP clients implementing ACL2 that are able to modify ACLs SHOULD
warn a user that wants to give full access (or even just "a" right) warn a user that wants to give full access (or even just "a" right)
to the special identifier "anyone". to the special identifier "anyone".
9. Other considerations 9. Other considerations
9.1. Compatibility with RFC 2086 9.1. Compatibility with RFC 2086
skipping to change at line 1023 skipping to change at line 1041
or EXAMINE command. or EXAMINE command.
Example: C: A142 SELECT INBOX Example: C: A142 SELECT INBOX
S: * 172 EXISTS S: * 172 EXISTS
S: * 1 RECENT S: * 1 RECENT
S: * OK [UNSEEN 12] Message 12 is first unseen S: * OK [UNSEEN 12] Message 12 is first unseen
S: * OK [UIDVALIDITY 3857529045] UIDs valid S: * OK [UIDVALIDITY 3857529045] UIDs valid
S: * OK [UIDNEXT 4392] Predicted next UID S: * OK [UIDNEXT 4392] Predicted next UID
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
S: * OK [MYRIGHTS rwiste] Allowed rights S: * OK [MYRIGHTS "rwiste"] Allowed rights
S: A142 OK [READ-WRITE] SELECT completed S: A142 OK [READ-WRITE] SELECT completed
An ACL2 server MAY modify one or more ACL for one or more identifier as a An ACL2 server MAY modify one or more ACL for one or more identifier as a
side effect of modifying the ACL specified in ACL STORE/DELETE/SET. side effect of modifying the ACL specified in ACL STORE/DELETE/SET.
If the server does that it MUST send untagged ACL response to notify the If the server does that it MUST send untagged ACL response to notify the
client about the changes made. client about the changes made.
10. Normative References 10. Normative References
[KEYWORDS] Bradner, "Key words for use in RFCs to Indicate [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, Harvard University, March 1997. Requirement Levels", RFC 2119, Harvard University, March 1997.
[ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications: [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd, ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd,
November 1997. November 1997.
[IMAP4] Crispin, M., "Internet Message Access Protocol - Version [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
4rev1", RFC 2060, University of Washington, December 1996. 4rev1", RFC 3501, University of Washington, March 2003.
[UTF-8] Yergeau, F., "UTF-8, a transformation format of IS0 10646", [UTF-8] Yergeau, F., "UTF-8, a transformation format of IS0 10646",
RFC 2279, Alis Technologies, January 1998. RFC 2279, Alis Technologies, January 1998.
[QUOTA] Myers, J., "IMAP4 QUOTA extension", RFC 2087, Carnegie Mellon [QUOTA] Myers, J., "IMAP4 QUOTA extension", RFC 2087, Carnegie Mellon
University, January 1997. University, January 1997.
11. Informative References 11. Informative References
[LISTEXT] Leiba, B., "IMAP4 LIST Command Extensions", work in progress, [LISTEXT] Leiba, B., "IMAP4 LIST Command Extensions", work in progress,
skipping to change at line 1067 skipping to change at line 1085
This document is a revision of the RFC 2086 written by John G. Myers. This document is a revision of the RFC 2086 written by John G. Myers.
Editor appreciates comments received from Mark Crispin, Chris Newman, Editor appreciates comments received from Mark Crispin, Chris Newman,
Cyrus Daboo, John G. Myers, Steve Hole, Curtis King, Lyndon Nerenberg, Cyrus Daboo, John G. Myers, Steve Hole, Curtis King, Lyndon Nerenberg,
Larry Greenfield, Vladimir Butenko, Dave Cridland, Harrie Hazewinkel Larry Greenfield, Vladimir Butenko, Dave Cridland, Harrie Hazewinkel
and other participants of IMAPEXT working group. and other participants of IMAPEXT working group.
13. Editor's Address 13. Editor's Address
Alexey Melnikov Alexey Melnikov
mailto: mel@messagingdirect.com mailto: mel@isode.com
ACI WorldWide/MessagingDirect
59 Clarendon Road, Watford,
Hertfordshire, United Kingdom, WD17 1FQ
Phone: +44 1923 81 2877 Isode Limited
14. Full Copyright Statement 14. Full Copyright Statement
Copyright (C) The Internet Society 2003. All Rights Reserved. Copyright (C) The Internet Society 2003. All Rights Reserved.
This document and translations of it may be copied and furnished to This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph kind, provided that the above copyright notice and this paragraph
skipping to change at line 1183 skipping to change at line 1197
28. Added section about mapping of ACL rights to READ-WRITE and READ-ONLY 28. Added section about mapping of ACL rights to READ-WRITE and READ-ONLY
response codes. response codes.
29. Changed ABNF for rigths/mod_rights to be quoted instead of astring. 29. Changed ABNF for rigths/mod_rights to be quoted instead of astring.
30. Changed syntax of ACL2 commands according to the following table: 30. Changed syntax of ACL2 commands according to the following table:
SETACL => ACL STORE SETACL => ACL STORE
DELETEACL => ACL DELETE DELETEACL => ACL DELETE
REPLACEACL => ACL SET REPLACEACL => ACL SET
GETACL => ACL GET GETACL => LIST (ACL)
LISTRIGHTS => ACL LIST LISTRIGHTS => ACL LIST
MYRIGHTS => LIST (MYRIGHTS)
MYRIGHTS was left as is
Changed syntax of ACL2 responses: Changed syntax of ACL2 responses:
ACL => Extended LIST response with ACL information ACL => Extended LIST response with ACL information
LISTRIGHTS => RIGHTS-INFO LISTRIGHTS => RIGHTS-INFO
MYRIGHTS => Extended LIST response with MYRIGHTS information
MYRIGHTS was left as is
Any better suggestions for names are welcome. Any better suggestions for names are welcome.
31. Added mailbox patterns and partial failures. Updated ABNF. 31. Added mailbox patterns and partial failures. Updated ABNF.
32. SUBSCRIBE is NOT allowed with "r" right. 32. SUBSCRIBE is NOT allowed with "r" right.
33. GETACL (ACL GET) is NOT allowed with "r" right. 33. GETACL ("LIST (ACL)") is NOT allowed with "r" right.
34. Added human readable text to ACLFAILED untagged response. 34. Added human readable text to ACLFAILED untagged response.
35. GETQUOTAROOT requires any one of "r", "i" or "a". 35. GETQUOTAROOT requires any one of "r", "i" or "a".
36. Removed ACL LIST (LISTRIGHTS) command. 36. Removed ACL LIST (LISTRIGHTS) command.
37. Added "vendor=" identifier prefix for vendor specific identifiers. 37. Added "vendor=" identifier prefix for vendor specific identifiers.
38. Added ABNF for identifier syntax. 38. Added ABNF for identifier syntax.
39. Text and document structure change based on comments from Harrie 39. Text and document structure change based on comments from Harrie
Hazewinkel. Hazewinkel.
40. Replaced "ACLINFO" response with a special variant of LIST. 40. Replaced "ACLINFO" response with a special variant of LIST.
Updated text and ABNF. Updated text and ABNF.
41. Replaced SPACE with SP in the ABNF section. 41. Replaced SPACE with SP in the ABNF section.
42. Added notes that group and administrators management, as well as
the format of an email for posting to a mailbox is out of scope.
43. Added a table that describes all operations and right required to
perform them.
44. Fixed several MYRIGHTS examples.
45. Updated ABNF to reflect recent changes ("MYRIGHTS" to "LIST (MYRIGHTS)"
and "ACL GET" to "LIST (ACL)")
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/