Re: [lemonade] draft-gulbrandsen-imap-enable-03

Alexey Melnikov <alexey.melnikov@isode.com> Fri, 09 November 2007 19:04 UTC

Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id lA9J46Uv031193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Nov 2007 12:04:06 -0700 (MST) (envelope-from owner-ietf-imapext@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id lA9J46XT031192; Fri, 9 Nov 2007 12:04:06 -0700 (MST) (envelope-from owner-ietf-imapext@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-imapext@mail.imc.org using -f
Received: from rufus.isode.com (rufus.isode.com [62.3.217.251]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id lA9J44EV031183 for <ietf-imapext@imc.org>; Fri, 9 Nov 2007 12:04:05 -0700 (MST) (envelope-from alexey.melnikov@isode.com)
Received: from [172.16.1.99] (shiny.isode.com [62.3.217.250]) by rufus.isode.com (submission channel) via TCP with ESMTPA id <RzSvIQAnN7KU@rufus.isode.com>; Fri, 9 Nov 2007 19:04:03 +0000
Message-ID: <4734AEF8.4090201@isode.com>
Date: Fri, 09 Nov 2007 19:03:20 +0000
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915
X-Accept-Language: en-us, en
To: Peter Coates <peter.coates@sun.com>
CC: 'Arnt Gulbrandsen' <arnt@oryx.com>, lemonade@ietf.org, ietf-imapext@imc.org
Subject: Re: [lemonade] draft-gulbrandsen-imap-enable-03
References: <472B04FD.9020100@andrew.cmu.edu> <iI49OBVsjABTB7dA9GtwCA.md5@libertango.oryx.com> <473487D3.4020002@isode.com> <01a601c822f5$7c13bf60$743b3e20$%coates@sun.com>
In-Reply-To: <01a601c822f5$7c13bf60$743b3e20$%coates@sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Content-Transfer-Encoding: 7bit
Sender: owner-ietf-imapext@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-imapext/mail-archive/>
List-ID: <ietf-imapext.imc.org>
List-Unsubscribe: <mailto:ietf-imapext-request@imc.org?body=unsubscribe>

Peter Coates wrote:

>What?  If Enabling an extension does not affect the CAPABILITY vector, and
>if the ENABLE command silenty ignores extensions the server does not want to
>allow or which it does not know, then after the sequence
>
> C: t1 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
> S: t1 OK foo
> C: t2 ENABLE CONDSTORE X-GOOD-IDEA
> S: t2 OK foo
>
>the client does not know whether CONDSTORE is enabled or not.
>
>I assert that either the enable command has to tell the client which things worked (or
>which things didn't), or the capability vector has to change
>  
>
Agreed, but this can (and I think should) be done in a way which doesn't 
contradict text I've suggested. See below.

>Thus the sequence should be either
> C: t1 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
> S: t1 OK foo
> C: t2 ENABLE CONDSTORE X-GOOD-IDEA
> S: t2 OK foo
> C: t3 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
>CONDSTORE
> S: t3 OK foo again
>  
>
I dislike that, because you now implicitly saying that there are magic 
extensions which don't work unless the client knows how to enable them. 
Really, the server should have advertised the CONDSTORE extension to 
begin with.

>Or
> C: t1 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
> S: t1 OK foo
> C: t2 ENABLE CONDSTORE X-GOOD-IDEA
> S: * OK [ENABLED CONDSTORE] or some variant of this
>  
>
(Or just use the CAPABILITY response code: it serves the same purpose + 
can save a round trip in this case.)

So if you insist on being able to change the capability list, it is much 
better to return the updated list using the CAPABILITY response code. 
Clients should already be able to handle unsolicited updates, in 
particular because the CAPABILITY response code payload frequently 
changes after LOGIN/AUTHENTICATE.
This allows the client to figure out if an extension can be enabled 
after all.

> S: t2 OK foo
> C: t3 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
> S: t3 OK foo again
>  
>
>Peter
>
>
>-----Original Message-----
>From: owner-ietf-imapext@mail.imc.org
>[mailto:owner-ietf-imapext@mail.imc.org] On Behalf Of Alexey Melnikov
>Sent: November 9, 2007 08:16
>To: Arnt Gulbrandsen
>Cc: lemonade@ietf.org; ietf-imapext@imc.org
>Subject: Re: [lemonade] draft-gulbrandsen-imap-enable-03
>
>
>Arnt Gulbrandsen wrote:
>  
>
>>>I also don't like the fact that we're documenting that ENABLE can be 
>>>used to probe for extensions (as per paragraph 2 in section 5).  We 
>>>already have a command to list extensions.
>>>      
>>>
>>I'm perfectly happy taking that out, if that would be appropriate. I 
>>thought this sort of thing was supposed to be listed in security 
>>considerations.
>>    
>>
>Based on various off-list discussions I got impression that several 
>people really disliked that.
>So I am suggesting the following change:
>
>Replace:
> The server MUST NOT change the CAPABILITY list as a result of
> executing ENABLE.
>
>With:
> The server MUST NOT change the CAPABILITY list as a result of
> executing ENABLE, i.e. a CAPABILITY command issued right after
> an ENABLE command MUST list the same capabilities as a CAPABILITY
> command issued before the ENABLE command. The following example
> demonstrates that:
> 
> C: t1 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
> S: t1 OK foo
> C: t2 ENABLE CONDSTORE X-GOOD-IDEA
> S: t2 OK foo
> C: t3 CAPABILITY
> S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID LITERAL+ ENABLE
> S: t3 OK foo again
> 
>and also add:
> 
> Note that according to [RFC3501] the list of advertised capabilities MAY
> change after a STARTTLS and/or AUTHENTICATE/LOGIN command. The ENABLE 
> command doesn't change that.
>  
>