Re: [Ace] Review of draft-ietf-ace-mqtt-tls-profile-06

Cigdem Sengul <cigdem.sengul@gmail.com> Mon, 17 August 2020 17:45 UTC

Return-Path: <cigdem.sengul@gmail.com>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 29A283A1250; Mon, 17 Aug 2020 10:45:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 7AYVLlQ9IfT9; Mon, 17 Aug 2020 10:45:36 -0700 (PDT)
Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 163433A0D89; Mon, 17 Aug 2020 10:45:36 -0700 (PDT)
Received: by mail-vs1-xe2c.google.com with SMTP id a1so8703687vsp.4; Mon, 17 Aug 2020 10:45:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ECJaecc4UXzj/QS8fq5uiHDi6otzEsgIeIdhvo/sfRs=; b=e4OnjgKOhT+W75nKQ9gHQnL7iceFHp+C8mZ7rx0jSmmv7ukMt3yjloBwmTsogIHz+n amY8M1vnuNLasRW+gFvii0q4RGkTymSHdUcrLkwmJCFSZac9qT0/vI+j58dhcdce+U74 h6X1WvYJnMZrHkBclm/uHhaYRHE97r6K50u5f84ZhGd7iRgkBpRMcd1aKkqgQpcZOH7W 6Dm+sT/M+czIzcFZN80p/qNayJrKw6U6pABdbyrdvW60QrubeinuvFVrXiade9t+T84D e+8vzrmdD2CXj2UTq6wvPz5X2UQ9/7zEM7k/kcryZrnrmgoykQEh4LAWv/tfBD0LX30a cmnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ECJaecc4UXzj/QS8fq5uiHDi6otzEsgIeIdhvo/sfRs=; b=D4evVOhdkyPJjX1VrLSu24ew1ApAoIqUS/QuBmjOyjHNj5UDto72JYnpxEp77XyOPq for47RVM8C03xXlz3zH0ld+DHMV7fKy7RfTa5BaT92fXSiG+/IyA10TN7k3aPNw6Iyod nvFaj11ofYjOlgB5gMlkWpYLVzkZIRrmOpmkbSuZ6gAGgfCUDTIBSQ2KB6LgHhYv5w8P OaFIfOdoanxt9HtwWQIM3U2KNCwH3yIFWDb0DI5PFfv5btqInh2diDBjdnHs0vBqSrIJ eK4PwlFbc1y4KHlSXSFIZST1uzAswm0hmZGbis7WRj0OSgIeHWlY3CXdr1SItgidZHme VTIQ==
X-Gm-Message-State: AOAM532mmo1qc0qlpkoZ/I7lPOovhDPIjGEkmc/HAkXZX8bwX4a3pmw3 OO0rowTjFsLXd1XjrUNRCLlA16gZj7OcM30Pr7HB35cesChx/w==
X-Google-Smtp-Source: ABdhPJx2RpHmDtSEvJwoivE3Ekc09ObUAwvWm17NykAyTjLVTpbuTE88tZTV2gHAwWfNfeRS+BMylrJGgfGRwMwt1ZM=
X-Received: by 2002:a05:6102:2012:: with SMTP id p18mr9515556vsr.62.1597686335081; Mon, 17 Aug 2020 10:45:35 -0700 (PDT)
MIME-Version: 1.0
References: <00dd01d6734e$09020920$1b061b60$@augustcellars.com> <CAA7SwCMAQw84Qr3z+3oPrfjyFoYF2pfCCt7a+zoFHDcKwLxtiA@mail.gmail.com> <00f601d67409$4a3f04e0$debd0ea0$@augustcellars.com> <CAA7SwCPCBknichaNZwrS3ig-hSUGTP=Gfsd3=gAFhH0PRmuc6Q@mail.gmail.com> <014901d674b3$d16e19b0$744a4d10$@augustcellars.com>
In-Reply-To: <014901d674b3$d16e19b0$744a4d10$@augustcellars.com>
From: Cigdem Sengul <cigdem.sengul@gmail.com>
Date: Mon, 17 Aug 2020 18:45:24 +0100
Message-ID: <CAA7SwCONyAOpO9+TKZNB3UHsuBOQzQ99+b1KP57ek+d-k8LCsg@mail.gmail.com>
To: Jim Schaad <ietf@augustcellars.com>
Cc: draft-ietf-ace-mqtt-tls-profile@ietf.org, Ace Wg <ace@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000077126105ad165677"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/PcYEQRuxjQ7PUuizYa-ZuuaXh5s>
Subject: Re: [Ace] Review of draft-ietf-ace-mqtt-tls-profile-06
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Aug 2020 17:45:38 -0000

>
>
> I've got that from MQTT v5 spec:
>
> If a Client sets an Authentication Method in the CONNECT, the Client MUST
> NOT send any packets other than AUTH or DISCONNECT packets until it has
> received a CONNACK packet [MQTT-3.1.2-30].
>
>  and:
>
> If the Server rejects the CONNECT, it MUST NOT process any data sent by
> the Client after the CONNECT packet except AUTH packets [MQTT-3.1.4-6].
>
>
>
> [JLS] I read this as the following would not do the publish
>
> CONNECT à
>
> PUBLISH à
>
>                 ß AUTH
>
> AUTH à
>
>                 ß CONNACK fail
>
> The PUBLISH can be received but is not processed unless the CONNACK is
> going to be a success.
>
> [/JLS]
>
>
>
> [CS] I think this sequence should not happen, as Client MUST NOT send
> PUBLISH before CONNACK.
>
> I did not know what brokers do if they receive PUBLISH (and still
> processing a CONNECT) - drop or buffer until process. I quickly browsed
> mosquitto src.
>
> It looks like the broker sets a context flag to mark the session active
> after CONNECT is processed and accepted.
>
> If this flag is not set when processing publish,  it goes to an error
> state and doesn't look like it keeps the packet.
>
>
>
> [JLS] No, Clients are allowed to send further MQTT Control Packets
> immediately after sending a CONNECT packet; Clients need not wait for a
> CONNACK packet to arrive from the Server. – this is the preceding two
> sentences to requirement MQTT-3.1.4-6.  I would agree that this is going to
> be server specific.  The following paragraph suggests that clients SHOULD
> wait for the CONNACK but it is non-normative.  I think that I would write
> my client code to wait.  I would have to work really hard to figure out
> what my code base would do for this as I know it does queue packets for
> later processing but I am not sure what it would do for this case.
>
>
>
[CS] Ok, this is confusing.  I assumed that sentence regarding clients
about not having to wait was when no Authentication Method set.
Because there is: If a Client sets an Authentication Method in the CONNECT,
the Client MUST NOT send any packets other than AUTH or DISCONNECT packets
until it has received a CONNACK packet [MQTT-3.1.2-30].
 In the profile, we do set an authentication method in connect to "ace".

--Cigdem