Re: [core] Genart last call review of draft-ietf-core-stateless-05

Klaus Hartke <hartke@projectcool.de> Sun, 12 April 2020 09:31 UTC

Return-Path: <hartke@projectcool.de>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F1AEA3A1F8E; Sun, 12 Apr 2020 02:31:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 DlOk2o7pfZzt; Sun, 12 Apr 2020 02:31:55 -0700 (PDT)
Received: from wp382.webpack.hosteurope.de (wp382.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8597::]) (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 3B8C73A1F87; Sun, 12 Apr 2020 02:31:52 -0700 (PDT)
Received: from mail-qk1-f177.google.com ([209.85.222.177]); authenticated by wp382.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1jNYxx-0002Vv-Pu; Sun, 12 Apr 2020 11:31:49 +0200
Received: by mail-qk1-f177.google.com with SMTP id m67so6630512qke.12; Sun, 12 Apr 2020 02:31:49 -0700 (PDT)
X-Gm-Message-State: AGi0PubEHJA2+TOgYuydPGvdVDeMUnlXrS857uzl/Ca7daTq73626yj5 wRUtx5IKwHSy2gug5M44U8Pl2IYAvYdhm6ksH30=
X-Google-Smtp-Source: APiQypLZXzVnnVvdrfpyw2rQKW1YtkpbJRW+uoENHiZDnbtlQBPGsJzTXy/n2INZpBsrW3qfsvo1gkHH09i7Q4zm4Zc=
X-Received: by 2002:a37:c403:: with SMTP id d3mr10702075qki.448.1586683908534; Sun, 12 Apr 2020 02:31:48 -0700 (PDT)
MIME-Version: 1.0
References: <158573098630.30833.17715509721846547699@ietfa.amsl.com> <HE1PR07MB4346B6585F88A677DAF998E3E6C90@HE1PR07MB4346.eurprd07.prod.outlook.com> <CAFgnS4XTyD7AxwgbyAK9oWw_B+Owi6qCwbLhpSp1vn8LH+Lr2Q@mail.gmail.com>
In-Reply-To: <CAFgnS4XTyD7AxwgbyAK9oWw_B+Owi6qCwbLhpSp1vn8LH+Lr2Q@mail.gmail.com>
From: Klaus Hartke <hartke@projectcool.de>
Date: Sun, 12 Apr 2020 11:31:12 +0200
X-Gmail-Original-Message-ID: <CAAzbHvYWx394b+1tFpd4Ko6N_MON=93xqUxOSm-0KEY7dMkE8g@mail.gmail.com>
Message-ID: <CAAzbHvYWx394b+1tFpd4Ko6N_MON=93xqUxOSm-0KEY7dMkE8g@mail.gmail.com>
To: Dan Romascanu <dromasca@gmail.com>
Cc: Klaus Hartke <klaus.hartke@ericsson.com>, "last-call@ietf.org" <last-call@ietf.org>, "gen-art@ietf.org" <gen-art@ietf.org>, "draft-ietf-core-stateless.all@ietf.org" <draft-ietf-core-stateless.all@ietf.org>, "core@ietf.org" <core@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-bounce-key: webpack.hosteurope.de; hartke@projectcool.de; 1586683914; 274ae782;
X-HE-SMSGID: 1jNYxx-0002Vv-Pu
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/n5QqNF_jlPMdRk0gt_T0-g0L38w>
Subject: Re: [core] Genart last call review of draft-ietf-core-stateless-05
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Apr 2020 09:31:57 -0000

Dan Romascanu wrote:
>> > 1. It would be useful to include some considerations whether the authors
>> > consider useful / possible / allowed that the mechanism (extended token
>> > lengths) presented in this document can be used for other purposed than
>> > the by-design the use case (avoiding per-request state).
>>
>> The last paragraph in Section 1 says:
>>
>>    While the use case (avoiding per-request state) and the mechanism
>>    (extended token lengths) presented in this document are closely
>>    related, both can be used independently of each other: Some
>>    implementations may be able to fit their state in just 8 bytes; some
>>    implementations may have other use cases for extended token lengths.
>>
>> Does that solve your issue?
>
> Actually this is exactly the paragraph that triggered my concern. Does 'using independently' mean that you encourage or do not care implementations in the future dealing with other use cases? If the answer is yes, maybe the current text is fine. If the answer is 'rather not' than a discussion would be welcome.

The paragraph is intended to give permission that extended token
lengths may be used for other purposes than avoiding per-request
state. Of course, these will need security considerations etc., but
those are out of this document's scope.

>> > > The use of encryption, integrity protection, and replay protection of
>> >    serialized state is recommended in general, unless a careful analysis
>> >    of any potential attacks to security and privacy is performed.  AES-
>> >    CCM with a 64 bit tag is recommended, combined with a sequence number
>> >    and a replay window.  Where encryption is not needed, HMAC-SHA-256,
>> >    combined with a sequence number and a replay window, may be used.
>> >
>> > A few issues with this paragraph. Why are not 'recommended' and 'may'
>> > capitalized? The formulation 'is recommended in general' seems odd, and
>> > the rest of the sentence does not clarify. What does 'a careful analysis of any
>> > potential attacks' mean? Who is supposed to perform this analysis and who
>> > can ensure it is 'careful enough' at any given point in time for any potential
>> > attacks?
>>
>> AFAIK, the Security Considerations section is supposed to discuss security-related issues that users need to be aware of, but not make normative statements. So all the normative requirements are in Section 3.1. (Where 'users' in this case are implementations and specifications that decide to make use of this implementation strategy in clients.)
>>
>> Overall, it's a bit difficult to make normative requirements here, because these are usually about the interoperability e.g. of a client and a server. But in this case, the client only needs to interoperate with itself (it needs to accept a token that it created itself) and the only real requirement is that "client implementations MUST NOT be vulnerable to maliciously crafted tokens". The meaning of "vulnerable" and "malicious" here depends a lot on the application/deployment-specific context; the document can really just highlight some potential issues that users should take into consideration.
>>
>> I'm open to concrete suggestions for text improvements, though.
>
> I believe that I understood the point that you are making. If I am to suggest text improvements, I would:
>
> - s/recommended in general/recommended/
> - clarify, maybe in this very words that "the requirement is that client implementations must not be vulnerable to maliciously crafted tokens"

I've made these two changes in the Security Considerations section and
also tried to improve clarity in section 3.1. I will submit a -06
shortly.

Thanks!

Klaus