Re: [Extra] Secdir last call review of draft-ietf-extra-imap4rev2-24

Daniel Migault <daniel.migault@ericsson.com> Tue, 19 January 2021 20:46 UTC

Return-Path: <daniel.migault@ericsson.com>
X-Original-To: extra@ietfa.amsl.com
Delivered-To: extra@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2A4D73A0ABB; Tue, 19 Jan 2021 12:46:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.35
X-Spam-Level:
X-Spam-Status: No, score=-2.35 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EscpjHllVbhY; Tue, 19 Jan 2021 12:46:44 -0800 (PST)
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B040F3A0AA7; Tue, 19 Jan 2021 12:46:40 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qnk0ALELhnwEj0GiN/9+TWhY9A7vk5gybKd914XmONcyYVpdShcQjcZgFh2uXWF2tE2lttRtxYvv49CL+Vtu2YR6wMCx1ZEEUrpdinkPrk6kdBuIoIgMAzXdrP4ZwOeDk4xrGLg8H57tMlMjwp3knAPN95E9RS60uKvmoda91XXKfvXTBWF1VfhZsrq6kztlBKs6dtnu7MSMkIkQkJsPAU9Y9dwB9O4Mh1W+0hOApz8Ndnwz6u2ZJepXzDX3WmJ0IxAzpytlmfOPykzDXjtIVWO2Lw2gUkoN+I16SlwlguY4F/NUoHPNFVqxx3Mku6CbaZbOR9ME9Ms7eAXRh/l0mQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gMklTcF1itVMTUcmOv4t6Mv4hEffMxmVqdrxxcQAs/M=; b=e/qftYS1jGm9o+GpZ6/UDN+AaG0OzYRZx8HyPqKWHTerkwDx/E1/WlNBXMvPm1xJdtDd30yB7Ij62xk3V4D4AZmpL9Uz+wuZytZ2FJKhRun5wzPNz1mIfEUy+amfCCnc+7vsjdtqTsYiu5TxFQvwFNg3UFHqy8JBkvbLw+5qx4oEkUvApU6zZ71hJInWaHz1yKhnOQX3CL4UJyWFfcZwEbbzZCBlbtzmKGNA0B0bmieQ1eBuXH0UuOWmtDUIVkMXdUaIInbnAHRA3VRDayT29KckgIrFtvIFdQRNw41tQxeJ/WLQSP9k0fDOWHVjHBQlEA5oLBHMzDFwE/MrMVrFgA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gMklTcF1itVMTUcmOv4t6Mv4hEffMxmVqdrxxcQAs/M=; b=vMhBnWVDF6K+c0OuC4Oy1pxQjxHNDcqI9ccaBdikjvy3DBPWfzi9QmmftiwLAIPRY8edhQMvTl7M5mARudgQN9+Z2Lu7UwchY8DhHWTpB4tdQCvyT2cacyqdusK2Y6ubXwt5kA0ayInag/OzfEB5zamBZ1+tM6IIYO8HBbqmad0=
Received: from DM6PR15MB2379.namprd15.prod.outlook.com (2603:10b6:5:8a::16) by DM6PR15MB2666.namprd15.prod.outlook.com (2603:10b6:5:1a8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 20:46:37 +0000
Received: from DM6PR15MB2379.namprd15.prod.outlook.com ([fe80::a9f9:326f:8cfb:157b]) by DM6PR15MB2379.namprd15.prod.outlook.com ([fe80::a9f9:326f:8cfb:157b%7]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 20:46:37 +0000
From: Daniel Migault <daniel.migault@ericsson.com>
To: Alexey Melnikov <alexey.melnikov@isode.com>, "secdir@ietf.org" <secdir@ietf.org>
CC: "draft-ietf-extra-imap4rev2.all@ietf.org" <draft-ietf-extra-imap4rev2.all@ietf.org>, "extra@ietf.org" <extra@ietf.org>, "last-call@ietf.org" <last-call@ietf.org>
Thread-Topic: Secdir last call review of draft-ietf-extra-imap4rev2-24
Thread-Index: AQHW7osBCZRYcejh/kaFOg7r/oDlOqovTFtx
Date: Tue, 19 Jan 2021 20:46:37 +0000
Message-ID: <DM6PR15MB2379AD34B141FD5015D25E86E3A30@DM6PR15MB2379.namprd15.prod.outlook.com>
References: <161106792581.26552.4563982290675643872@ietfa.amsl.com>, <99082ebc-318b-5c4d-a9e6-b3893ab99c0d@isode.com>
In-Reply-To: <99082ebc-318b-5c4d-a9e6-b3893ab99c0d@isode.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: isode.com; dkim=none (message not signed) header.d=none;isode.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [96.22.11.129]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 3007eb55-b530-4a2e-8c23-08d8bcbb50fc
x-ms-traffictypediagnostic: DM6PR15MB2666:
x-microsoft-antispam-prvs: <DM6PR15MB2666A513834BB800245F72A0E3A30@DM6PR15MB2666.namprd15.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Rl0kw/RP7cly449tjtC8Lan+IIobuE73xAXU4gMhBikwQny+keD1EV1FYKwOEPtEztSy39CRFScxsXflAv34BoFLhmHRj/hsdBWEG73mln5MQlTl3QZeJSxTG5wnl6Nsnzfifz5MiH4kKXxAjHLCe2QreN8cT9YCCwUuNgyQ6hbbkNBzWXdt7jggkmYNh6lAYd+2qO60mIeE0wySV+l81uX4eYeJI3U7zVavS5vA//CZY0XUX8xSpLb3FPb4GlQl+LeHz1uD1ci+YKtei3+Lma0R+3NZguTQ+y8iesPFwpV9P7dsr/B9WbtcsLZA/nIN6jzUo8HUJAV4NjFjkumcaudRgmslTJvFGrlMqYt0MssW19xJUliKihgCgwQGrtIbmCCC+zBCJckh3WR4V0tvAUSsVL8ePy+7MO3djUliMxAS3zL2QUY4fM7AOrRghBDFuHY3bJ+MyUqCcDscfGcUxQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR15MB2379.namprd15.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(366004)(396003)(39860400002)(136003)(33656002)(8676002)(44832011)(71200400001)(66446008)(4326008)(19627405001)(26005)(55016002)(86362001)(7696005)(9686003)(8936002)(54906003)(83380400001)(66946007)(66476007)(91956017)(186003)(478600001)(52536014)(30864003)(316002)(76116006)(5660300002)(64756008)(66574015)(53546011)(110136005)(2906002)(66556008)(6506007); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: nsWV6bFMK+32yt1Qbzg/MpP9BRcmjWQ92QdjHWbGDr4tPrvJZIP2dL/WanAuhk+n59OGSMLkpTOTUEnFFVvY1y6iGjfji46wahNScr2iUaZXauXfCegGP5d60j913BeyffVUmUbHx6ntbTNmczewZ3Jdw8Teu5EP670CqUJzUQvEwYC2igx8EkbZzvaI5+3wtyTRcmyhlf5JmFFkFNeWY/Qh1M63bBiZ0FdzhamGvbBbvhUJ9VtGZq+e2D7svrUf+Tt2+lxX/qvgBdYbY9leoob8qx5I8UsTLikM56oUi6T1A+88LNBvW2YQX0uSTXBiYJ1wg52yPO0InGYMU+el0e07pVC9iO7pGqd5K3rTWmrBCLEWz/bNcohHZ1zgITC21GuLEI1/mS8y/kCZx0rPx6UmZWcIjvw57nS6KIz6X8ggEqYozXAAh77RPgs9fliDKH1YG5Uqs4Ph3cOeZBgAEphP9Qs0Y/J08NDf5G6UM4iQZrvA9Z/KsS9WBB1FGtW15VBGj+ESC9VY0a/hjbYDYFQXhHUIEEOM8wxaTNWMdd6GzlDY4eT7RBt5pvxlhdvRECVNLHsBufXp+8/IEKCTun74rTcv1B49fJmlOy8BkZctmKkuhJkMGtUHVjnJFAvhrblhIuvQMXwEe9wXyfBV3RdnFrES5BnbLn0N88zLifivy9QCdGBUg3Z7p0X4Gl8aXu+CTuIHAKDnJaw9WFZmiR81yOdtOJmrAcY06azDnDFecCVhg2nQ8gpHG9b6g5jHqzfIVLPCWrK5wNBaoWsDlRoWlhPeRPy+LrKfxqmyC68Ua7P7IfvqYClaATO6FvVKtsMyilpQV9YYLR5vAOCQ23peN1AeHvg8ptrBsYmyw/fP6mhl9gmpOf19+grGu9g0ZEsHzbM15CsDi4YmYpFNv5TQ+mh+z5IhohkhtDwvpQsoAIE7gLJQSkLGhQ1mUy8ypgCyijNMc4mpbVR9bTg0zB/ngr88PTEkNGz+EuhG2zo=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DM6PR15MB2379AD34B141FD5015D25E86E3A30DM6PR15MB2379namp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR15MB2379.namprd15.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 3007eb55-b530-4a2e-8c23-08d8bcbb50fc
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2021 20:46:37.5930 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ceXGFQLZj3OsK/qvC/Oynse3BSplqVBGSSFwhOsAAfiqmCAxhxq5wX9rR7L4w3SpJq+F0b3ludSd7vJyaxhBDitOuaDM52Z1aTt6B5WLA2g=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR15MB2666
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/baf848MEjDyzr2LdWwCvuMfHlPo>
Subject: Re: [Extra] Secdir last call review of draft-ietf-extra-imap4rev2-24
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email mailstore and eXtensions To Revise or Amend <extra.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/extra>, <mailto:extra-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/extra/>
List-Post: <mailto:extra@ietf.org>
List-Help: <mailto:extra-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/extra>, <mailto:extra-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2021 20:46:48 -0000

Hi Alexey,

Thanks for your response. Please find some clarifications/responses.

Yours,
Daniel

________________________________
From: Alexey Melnikov <alexey.melnikov@isode.com>
Sent: Tuesday, January 19, 2021 12:46 PM
To: Daniel Migault <daniel.migault@ericsson.com>; secdir@ietf.org <secdir@ietf.org>
Cc: draft-ietf-extra-imap4rev2.all@ietf.org <draft-ietf-extra-imap4rev2.all@ietf.org>; extra@ietf.org <extra@ietf.org>; last-call@ietf.org <last-call@ietf.org>
Subject: Re: Secdir last call review of draft-ietf-extra-imap4rev2-24

Hi Daniel,

Thank you for your review. My replies below. I removed some of your
comments that I need to think a bit more and will reply to them separately.

On 19/01/2021 14:52, Daniel Migault via Datatracker wrote:
> Reviewer: Daniel Migault
> Review result: Has Nits
>
> Hi,
>
> I have reviewed this document as part of the security directorate's
> ongoing effort to review all IETF documents being processed by the
> IESG.  These comments were written primarily for the benefit of the
> security area directors.  Document editors and WG chairs should treat
> these comments just like any other last call comments.
>
> The summary of the review is: Ready though I found some nits in
> the security consideration.
>
> Please find my comments/ questions below.
>
> Yours,
> Daniel
>
>
>
>
>
>         Internet Message Access Protocol (IMAP) - Version 4rev2
>                       draft-ietf-extra-imap4rev2-24
>
>
> [ ... ]
>
>     $Phishing  The $Phishing keyword can be used by a delivery agent to
>        mark a message as highly likely to be a phishing email.  An email
>        that's determined to be a phishing email by the delivery agent
>        should also be considered a junk email and have the appropriate
>        junk filtering applied, including setting the $Junk flag and
>        placing in the \Junk special-use mailbox (see Section 7.2.3) if
>        available.
>        If both the $Phishing flag and the $Junk flag are set, the user
>        agent should display an additional warning message to the user.
>        User agents should not use the term "phishing" in their warning
>        message as most users do not understand this term.  Phrasing of
>        the form "this message may be trying to steal your personal
>        information" is recommended.  Additionally the user agent may
>        display a warning when clicking on any hyperlinks within the
>        message.
>
> <mglt>
> I tend to believe that phishing is now
> (unfortunately) known by most users.
> I have the impression that UI is always a
> difficult problem, and I am wondering if such
> recommendations are still valid or if that is
> a legacy statement. I do not have strong
> feeling about what to do, so I leave it to
> you, but is interested in your opinion.
This text matches the original registration of the $Phishing keyword. I
have seen some modern email clients still following this advice, so I
think it is useful. Which part of it do you find outdated?

<mglt>

Just to be clear that was just a comment. In the following sentence,
"""
User agents should not use the term "phishing" in their warning
message as most users do not understand this term.
"""
I was questioning  "as most users do not understand this term" and tend to believe that most users have heard what phishing means. So I am wondering if the user the message is being shown does not translate to itself: "Oh yeah they mean phishing".  Again just some random thoughts from my part.

</mglt>
> </mglt>
>
> [ ... ]
>
> 6.2.3.  LOGIN Command
>
>     Arguments:  user name
>                 password
>
>     Responses:  no specific responses for this command
>
>     Result:     OK - login completed, now in authenticated state
>                 NO - login failure: user name or password rejected
>                 BAD - command unknown or arguments invalid
>
>     The LOGIN command identifies the client to the server and carries the
>     plaintext password authenticating this user.
>
>     A server MAY include a CAPABILITY response code in the tagged OK
>     response to a successful LOGIN command in order to send capabilities
>     automatically.  It is unnecessary for a client to send a separate
>     CAPABILITY command if it recognizes these automatic capabilities.
>
>
>
> Melnikov & Leiba          Expires July 9, 2021                 [Page 32]
>
> Internet-Draft                  IMAP4rev2                   January 2021
>
>
>        Example:    C: a001 LOGIN SMITH SESAME
>                    S: a001 OK LOGIN completed
>
>     Note: Use of the LOGIN command over an insecure network (such as the
>     Internet) is a security risk, because anyone monitoring network
>     traffic can obtain plaintext passwords.  The LOGIN command SHOULD NOT
>     be used except as a last resort, and it is recommended that client
>     implementations have a means to disable any automatic use of the
>     LOGIN command.
>
> <mglt>
> For my personal information.  It is unclear
> to me why the LOGIN command is SHOULD NOT and
> not MUST NOT. I am mostly likely missing
> something, but my impression was so far that
> STARTTLS was mandatory. I suppose that "a
> configuration" means that it is not always
> the case, but then it becomes unclear to me
> why we would have STARTTLS in one
> configuration but not the other. This sounds
> to me that we are sort of allowing a
> vulnerable configuration as long the server
> may be accessed with a secure configuration.
> I think I am missing some dots.

Thank you for drawing my attention to this. I agree that the text is
wrong. I think the intent was to allow LOGIN on "secure networks" and
disallow it otherwise. After rereading this the quoted paragraph is not
saying that. I will fix.

> </mglt>
>
>     Unless either the client is accessing IMAP service on IMAPS port
>     [RFC8314], the STARTTLS command has been negotiated or some other
>     mechanism that protects the session from password snooping has been
>     provided, a server implementation MUST implement a configuration in
>     which it advertises the LOGINDISABLED capability and does NOT permit
>     the LOGIN command.  Server sites SHOULD NOT use any configuration
>     which permits the LOGIN command without such a protection mechanism
>     against password snooping.  A client implementation MUST NOT send a
>     LOGIN command if the LOGINDISABLED capability is advertised.
>
> [... ]
>
> 11.  Security Considerations
>
>     IMAP4rev2 protocol transactions, including electronic mail data, are
>     sent in the clear over the network unless protection from snooping is
>     negotiated.  This can be accomplished either by the use of IMAPS
>     service, STARTTLS command, negotiated privacy protection in the
>     AUTHENTICATE command, or some other protection mechanism.
>
> 11.1.  STARTTLS Security Considerations
>
>     IMAP client and server implementations MUST comply with relevant TLS
>     recommendations from [RFC8314].
>
>
>
>
>
> Melnikov & Leiba          Expires July 9, 2021                [Page 143]
>
> Internet-Draft                  IMAP4rev2                   January 2021
>
>
>     Clients and servers MUST implement TLS 1.2 [TLS-1.2] or newer.  Use
>     of TLS 1.3 [TLS-1.3] is RECOMMENDED.  TLS 1.2 may be used only in
>     cases where the other party has not yet implemented TLS 1.3.
>     Additionally, when using TLS 1.2, IMAP implementations MUST implement
>     TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 cipher suite, and SHOULD
>     implement the TLS_RSA_WITH_AES_128_CBC_SHA [TLS-1.2] cipher suite.
>
> <mglt>
> I suspect there is an issue and that
> TLS_RSA_WITH_AES_128_CBC_SHA  is instead
> TLS_RSA_WITH_AES_128_CBC_SHA256.
>
> However, these suites are not set as
> "recommended" on the IANA registry.  Note
> that the term recommended may be misleading
> as it does not necessarily means the cipher
> is weak. It means instead that the cipher
> suite has not been through a standard
> process.  This could mean, for example, the
> cipher suite may correspond to a specific use
> case. If that is the case, I believe that
> should be mentioned.  However, I believe that
> in this case, the motivation for the
> community is that RSA authentication suffers
> from a significant number of attacks - [1],
> no forward secrecy - and I tend to believe
> its support may not be recommended. RFC7525
> for example mentions it as SHOULD NOT.
Good point. I will remove TLS_RSA_WITH_AES_128_CBC_SHA from the document.
> [1]https://www.usenix.org/conference/usenixsecurity18/presentation/bock
>
>
>
> In order to defer the cryptographic
> recommendations to RFC8447, and ensure these
> recommendations to be update to date, I would
> reference that the TLS client and server are
> expected to follow RFC8447 for their
> cryptographic recommendations. Currently
> RFC8847 sets a cipher suite as recommended
> when it has received a wide support from the
> community and it intend is as far as I think
> to remove ciphers that will become weak.
>
> RFC8447 works for TLS 1.2 and 1.3  keeps the
> number of cipher suites relatively low, so if
> the motivation to mandate
> TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 and
> LS_RSA_WITH_AES_128_CBC_SHA256 was to keep
> the number of cipher suites low. If that is
> the case,
> TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 may
> be a better fit at least in my opinion.
Ok.
> </mglt>
>
>     This is important as it assures that any two compliant
>     implementations can be configured to interoperate.  Other TLS cipher
>     suites recommended in RFC 7525 are RECOMMENDED:
>     TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
>     TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 and
>     TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.  All other cipher suites are
>     OPTIONAL.  Note that this is a change from section 2.1 of [IMAP-TLS].
>
> <mglt>
> I believe this is good to mention RFC7525 for
> TLS 1.2. There might small overlap concerning
> cipher recommendations with RFC8447, but
> RFC7525 recommendations go beyond and is not
> limited to cipher suites recommendations.
>
> Regarding the RSA versus ECDSA it seems to me
> that RSA is a bit behind. [1] mentions ECDSA
> and RSA in their intermediate profile with
> ECDSA recommended. I would maybe avoid
> explicitly recommend these cipher suites, and
> if that is needed, I would explain why these
> are recommended.
>
> [1]https://wiki.mozilla.org/Security/Server_Side_TLS
Thank you for the link, I will review.
> </mglt>
>
>     The list of mandatory-to-implement TLS 1.3 cipher suites is described
>     in Section 9.1 of [TLS-1.3].
>
  [snip]
>     Both the client and server MUST check the result of the STARTTLS
>     command and subsequent TLS ([TLS-1.3][TLS-1.2]) negotiation to see
>     whether acceptable authentication and/or privacy was achieved.
>
> <mglt>
> This is a bit unclear to me as I do not
> expect to have a server / client accepting
> cipher_suites, or being configured to
> establish a TLS session that does not achieve
> what we expect. In other word, I understand
> the paragraph as saying after the
> session establishment, we recheck that
> parameters chosen are appropriated. I suppose
> I am missing something, but if not I would
> have expected it to be the other way around.

I don't think all implementations control cipher suites to be used
before negotiation starts (this might be API and/or implementation
limitation), so this is encouraging to check whether negotiated
ciphersuite matches policy after negotiation completes.

<mglt>
ok, I agree this maybe the case for the client, but I expect the server to have its library being "specifically" configured.

</mglt>

> </mglt>
>
  [snip]
> 11.4.  Other Security Considerations
>
>     A server error message for an AUTHENTICATE command which fails due to
>     invalid credentials SHOULD NOT detail why the credentials are
>     invalid.
>
>     Use of the LOGIN command sends passwords in the clear.  This can be
>     avoided by using the AUTHENTICATE command with a [SASL] mechanism
>     that does not use plaintext passwords, by first negotiating
>     encryption via STARTTLS or some other protection mechanism.
>
>     A server implementation MUST implement a configuration that, at the
>     time of authentication, requires:
>     (1) The STARTTLS command has been negotiated.
>     OR
>     (2) Some other mechanism that protects the session from password
>     snooping has been provided.
>     OR
>     (3) The following measures are in place:
>     (a) The LOGINDISABLED capability is advertised, and [SASL] mechanisms
>     (such as PLAIN) using plaintext passwords are NOT advertised in the
>     CAPABILITY list.
>     AND
>     (b) The LOGIN command returns an error even if the password is
>     correct.
>     AND
>     (c) The AUTHENTICATE command returns an error with all [SASL]
>     mechanisms that use plaintext passwords, even if the password is
>     correct.
>
>     A server error message for a failing LOGIN command SHOULD NOT specify
>     that the user name, as opposed to the password, is invalid.
>
>     A server SHOULD have mechanisms in place to limit or delay failed
>     AUTHENTICATE/LOGIN attempts.
>
>     Additional security considerations are discussed in the section
>     discussing the AUTHENTICATE (see Section 6.2.2) and LOGIN (see
>     Section 6.2.3) commands.
>
> <mglt>
> Another concern regarding
> authentication with IMAP is user have usually
> one account and one login/password for a
> cloud account as well as an IMAP account. In
> many cases, the cloud account provides 2FA
> which makes possession of the login password
> not sufficient to gain access. However, IMAP
> authentication hardly provide 2FA, and mail
> may not benefit from the same protection and
> could be used to escape 2FA. I believe this
> could be mentioned as well as known
> mechanisms to provide 2FA with IMAP - if
> there are some.
There are some drafts adding 2FA to SASL authentication that are likely
to be discussed in the KITTEN WG. But at this point there is nothing
that can be referenced normatively. I will think what can be said about
that.
> Note that 2FA may not necessarily prevent to
> guess the correspondence between login and
> password.
>
> The section mentions that repeated attempts
> for a password associated is detected,
> somehow prevented. It may also worth
> mentioning that with a large number of login
> (known or guessed),
> an attacker may try to guess a login
> associated to a small number of commonly
> known weak passwords ( password
> spraying). I believe it might worth being
> mentioned, that correlating failed attempts
> worth also being mentioned.
Fair enough. Can you suggest some text?

<mglt>
Maybe something around these lines:

An IMAP server SHOULD report any authentication failure and analyze the attempt with regard to a password brute force attack as well as a password spraying attack. Accounts that matching password spraying attacks MUST be blocked and request to change their passwords and only password with significant strength SHOULD be accepted.
</mglt>

> Maybe that goes a bit too far in the purpose
> of recommendations, but it might may sense to
> recommend strong random passwords used in
> conjunction of passwords wallets or the use
> of mutually authenticate TLS.
>
> </mglt>
>
>
> <mglt>
> One question I would have - and with very
> little opinion on it - is how vulnerable IMAP
> parsing is to injection. I usually see the
> use of JSON as a big advantage toward
> this, but I would be happy to known
> your opinion on it.
Can you give me an example, as I am not sure what do you mean by
injection in this case?

<mglt>
I do not have specific example in mind. My question was if there are known ways to inject some commands in a specific field or if some parsers checks have been relaxed to enable interoperability.

</mglt>

> I also have the impression that injections
> can be performed via the web interface, so a
> web front end should be carefully considered
> and IMAP server may not believe they are
> always immune behind a web front end and
> still require to follow the best practises.
>
> </mglt>

Best Regards,

Alexey