Re: [Rats] CDDL, CBOR and JSON for claims

Henk Birkholz <henk.birkholz@sit.fraunhofer.de> Fri, 10 May 2019 08:57 UTC

Return-Path: <henk.birkholz@sit.fraunhofer.de>
X-Original-To: rats@ietfa.amsl.com
Delivered-To: rats@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7A12D12020A for <rats@ietfa.amsl.com>; Fri, 10 May 2019 01:57:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=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 HcP2mQtqZbdw for <rats@ietfa.amsl.com>; Fri, 10 May 2019 01:56:58 -0700 (PDT)
Received: from mailext.sit.fraunhofer.de (mailext.sit.fraunhofer.de [141.12.72.89]) (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 657851201E5 for <rats@ietf.org>; Fri, 10 May 2019 01:56:56 -0700 (PDT)
Received: from mail.sit.fraunhofer.de (mail.sit.fraunhofer.de [141.12.84.171]) by mailext.sit.fraunhofer.de (8.14.4/8.14.4/Debian-4.1ubuntu1.1) with ESMTP id x4A8ur6O027279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <rats@ietf.org>; Fri, 10 May 2019 10:56:54 +0200
Received: from [134.102.165.32] (134.102.165.32) by mail.sit.fraunhofer.de (141.12.84.171) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 10 May 2019 10:56:48 +0200
To: rats@ietf.org
References: <D55151D8-2E14-477D-A072-C1D5140E8D4E@island-resort.com>
From: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Message-ID: <f770e973-1822-3f68-230d-ab813e70c6d6@sit.fraunhofer.de>
Date: Fri, 10 May 2019 10:56:48 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <D55151D8-2E14-477D-A072-C1D5140E8D4E@island-resort.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Originating-IP: [134.102.165.32]
Archived-At: <https://mailarchive.ietf.org/arch/msg/rats/ceidpylhJVULzyn9NUrtwdvJgyw>
Subject: Re: [Rats] CDDL, CBOR and JSON for claims
X-BeenThere: rats@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Remote Attestation Procedures <rats.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rats>, <mailto:rats-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rats/>
List-Post: <mailto:rats@ietf.org>
List-Help: <mailto:rats-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rats>, <mailto:rats-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 May 2019 08:57:11 -0000

Hi Laurence

On 5/9/19 9:03 PM, Laurence Lundblade wrote:
> I’ve just looked at the SenML RFC 
> [...]
> It does not use CDDL.

Please have a closer look:

> https://tools.ietf.org/html/rfc8428#section-11

Spoiler: section 11 shows the CDDL data definition.

Actually, this RFC also illustrates a convenient way how to design a 
CDDL data definitions that enables you to provide support for both 
serialization in JSON an/or CBOR. There is a serialization-agnostic 
"body" (Figure 1) and then a branching for a "JSON-Specific CDDL" data 
definition (Figure 2) and/or a "CBOR-Specific CDDL" data definition 
(Figure 3).

Although it does not provide direct support for JSON (only SBOR), CoSWID 
also enables this option by using the same "mapping mechanism" for map 
member label names.

> https://github.com/sacmwg/draft-ietf-sacm-coswid/blob/master/concise-swid-tag.cddl

Viele Grüße,

Henk