Re: [core] CORECONF k parameter encoding

Carsten Bormann <cabo@tzi.org> Thu, 15 September 2022 16:42 UTC

Return-Path: <cabo@tzi.org>
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 013FCC14F721 for <core@ietfa.amsl.com>; Thu, 15 Sep 2022 09:42:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.207
X-Spam-Level:
X-Spam-Status: No, score=-4.207 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IIdkWQ6xNBJm for <core@ietfa.amsl.com>; Thu, 15 Sep 2022 09:42:07 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C9BF6C14F692 for <core@ietf.org>; Thu, 15 Sep 2022 09:41:34 -0700 (PDT)
Received: from [192.168.217.124] (p5089abf5.dip0.t-ipconnect.de [80.137.171.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4MT2yy5ZcjzDCcR; Thu, 15 Sep 2022 18:41:30 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <4e9673fa-f1cb-a36a-50d2-b2583f144164@inria.fr>
Date: Thu, 15 Sep 2022 18:41:30 +0200
Cc: core@ietf.org
X-Mao-Original-Outgoing-Id: 684952890.440298-56fbfb90e8bdecb910a14da6b540d733
Content-Transfer-Encoding: quoted-printable
Message-Id: <A18B1037-365A-4578-8558-5029899ED847@tzi.org>
References: <4e9673fa-f1cb-a36a-50d2-b2583f144164@inria.fr>
To: Koen Zandberg <koen.zandberg@inria.fr>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/0fHIDZ1kCkohEP5vomDKC2QiWCY>
Subject: Re: [core] CORECONF k parameter encoding
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
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: Thu, 15 Sep 2022 16:42:12 -0000

On 2022-09-15, at 16:34, Koen Zandberg <koen.zandberg@inria.fr> wrote:
> 
> One thing I'm running into, where I'm wondering if there has been previous discussion on this, is the encoding of YANG datatypes in the 'k' query parameter. There is a large variety of different encoding methods for the content, increasing the decoding complexity on the constrained device. Has it been consider of encoding all query params as a CBOR array and urlSafeBase64 as key value. The upside to this approach is that decoding the query parameter for a GET and DELETE requests closely matches the decoding of the payload with FETCH and iPATCH requests. Encoding the 'k' parameter also as CBOR array results in that for both a FETCH and a GET, the YANG list keys can in both cases be retrieved by iterating over a CBOR array.

Hi Koen,

The irregularity of the table at Section 4.1 of draft-ietf-core-comi [1] was exactly what I tried to bring up in [2].
I tried to find out reasons why it is so irregular and came up empty.

I like your suggestion for resolving this (except that I would maybe encode an RFC 8742 CBOR sequence, saving a byte or 4/3 characters in the base64url encoding).

It is late for this change, but possibly not too late.

Grüße, Carsten



[1]: https://tools.ietf.org/html/draft-ietf-core-comi-11#page-14
[2]: https://mailarchive.ietf.org/arch/msg/core/8ZLdtAGTlr7IMLT4ZT0YGFYVKmI/