Re: POP handling commands given in wrong state

Paul Smith <paul@pscs.co.uk> Tue, 26 July 2011 09:59 UTC

Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id p6Q9xtIn090664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Jul 2011 02:59:55 -0700 (MST) (envelope-from owner-ietf-pop3ext@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id p6Q9xtnV090663; Tue, 26 Jul 2011 02:59:55 -0700 (MST) (envelope-from owner-ietf-pop3ext@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-ietf-pop3ext@mail.imc.org using -f
Received: from mail.pscs.co.uk (mail.pscs.co.uk [46.20.224.92]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id p6Q9xqUc090658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <ietf-pop3ext@imc.org>; Tue, 26 Jul 2011 02:59:54 -0700 (MST) (envelope-from prvs=018878D732=paul@pscs.co.uk)
Received: from lmail.pscs.co.uk ([217.155.61.14]) by mail.pscs.co.uk ([46.20.224.92] running VPOP3) with ESMTP; Tue, 26 Jul 2011 10:59:56 +0100
Received: from [192.168.66.100] ([192.168.66.100]) by lmail.pscs.co.uk ([192.168.66.70] running VPOP3) with ESMTP; Tue, 26 Jul 2011 10:51:12 +0100
Message-ID: <4E2E8E10.9070209@pscs.co.uk>
Date: Tue, 26 Jul 2011 10:51:12 +0100
From: Paul Smith <paul@pscs.co.uk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11
MIME-Version: 1.0
To: Mykyta Yevstifeyev <evnikita2@gmail.com>, ietf-pop3ext@imc.org
Subject: Re: POP handling commands given in wrong state
References: <4E2E49AC.9090207@gmail.com> <4E2E7708.3080004@pscs.co.uk> <4E2E8762.5030805@gmail.com>
In-Reply-To: <4E2E8762.5030805@gmail.com>
Content-Type: multipart/alternative; boundary="------------010506080401080605030006"
X-Authenticated-Sender: paul
X-Server: VPOP3 Enterprise V4.0.0e - Registered
X-Organisation: Paul Smith Computer Services
Sender: owner-ietf-pop3ext@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-pop3ext/mail-archive/>
List-ID: <ietf-pop3ext.imc.org>
List-Unsubscribe: <mailto:ietf-pop3ext-request@imc.org?body=unsubscribe>

On 26/07/2011 10:22, Mykyta Yevstifeyev wrote:
> 26.07.2011 11:12, Paul Smith wrote:
>> On 26/07/2011 05:59, Mykyta Yevstifeyev wrote:
>>
>> [ . .  .]
>>
>> If the state was server defined, so that it may change on the 
>> server's decision, rather than by purely bad coding in the client, 
>> then yes, an extended response code may be useful, but when it is 
>> only bad coding in the client which can make it happen - no.
> Paul,
>
> [Adding Alexey Melnikov to CC list; see below.]
>
> I meant just the situation like this.  Eg., when one is using 
> POP3-over-TLS whereas TLS connection is established before POP 
> transaction starts, TLS negotiation may be used instead USER-PASS or 
> AUTH authentication, entering the server into the TRANSACTION state; 
> on the other hand, the server may require authentication under TLS 
> layer, entering AUTHORIZATION state after establishing TLS 
> connection.  I and Alexey Melnikov are currently working on the 
> POP-over-TLS specification 
> (https://datatracker.ietf.org/doc/draft-melnikov-pop3-over-tls/) and 
> the problem is that the client don't know what state is the server in 
> after TLS negotiation.  If the client tries giving USER and received 
> -ERR, it may mean that the user name is unknown or that the user is 
> authenticated already, and the client can't know for sure what does it 
> mean.  Don't you have other idea of indicating the state?

Hmm. I'd say that was a problem with the POP3 over TLS idea

It seems wrong to have to try to do something, and see if you get an 
error to see what you should do next. I know ESMTP does it, and the POP3 
'CAPA' do it, but that's because those things were added as a hindsight 
after the base spec had been deployed. For a new standard to need it 
just feels wrong.

Personally, I'd expect authentication to always be required, even if 
it's redundant. It just seems too much of a change from the base POP3 
spec to skip the authorization stage.

So, you could have the TLS session established which establishes the 
user's identity, and then do
USER anything
+OK
PASS anything
+OK

or you could use the USER/PASS as a part of two factor authentication 
(the certificate is something you have, the username/password is 
something you know)

Going straight from session establishment into transaction state seems 
wrong to me, given the base POP3 spec which POP3-over-TLS is building on.


BTW - why are you looking at POP3-over-TLS? Isn't this idea obsolete - 
isn't the 'STLS' command (RFC 2595) the way we should be doing things 
now? I thought the POP3S way was deprecated.

Note that the RFC 2595 says:
"The STLS command is only permitted in AUTHORIZATION state and the 
server remains in AUTHORIZATION state, even if client credentials are 
supplied during the TLS negotiation." so with STLS you have to 
authenticate (not sure why it's called 'authorization' state when it's 
really 'authentication' state, but that's not relevant) even if the TLS 
has already supplied the user details.