Re: [Suit] draft-moran-suit-manifest-02
Brendan Moran <Brendan.Moran@arm.com> Thu, 12 July 2018 14:23 UTC
Return-Path: <Brendan.Moran@arm.com>
X-Original-To: suit@ietfa.amsl.com
Delivered-To: suit@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E71D8131116; Thu, 12 Jul 2018 07:23:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.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 iynl8gB6id9B; Thu, 12 Jul 2018 07:23:16 -0700 (PDT)
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10044.outbound.protection.outlook.com [40.107.1.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 242AD13110C; Thu, 12 Jul 2018 07:23:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7Q6hENR525cQyqhs/qPhFvp7aiI1byAK4Ls5j6ps/Lw=; b=bJZo26RtomKO+2VmIhUoomtdaV5he4RC1/ZrinUVmtF3Sph8+LsnQdCqVqMM+J4J/Y50zDk0EWBrjW9Yay+aW9Wn9y+ZaSEP0OffsiXwmpVKGXfJyoYYKGarV4WJMo5ECRqJM5sZi3i7M6L939KSvd13Vprz4gg4oKgvQO2os2c=
Received: from AM4PR0802MB2260.eurprd08.prod.outlook.com (10.172.217.150) by AM4PR0802MB2306.eurprd08.prod.outlook.com (10.172.218.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.18; Thu, 12 Jul 2018 14:23:13 +0000
Received: from AM4PR0802MB2260.eurprd08.prod.outlook.com ([fe80::3c9f:d4ca:23a0:2aad]) by AM4PR0802MB2260.eurprd08.prod.outlook.com ([fe80::3c9f:d4ca:23a0:2aad%4]) with mapi id 15.20.0952.017; Thu, 12 Jul 2018 14:23:13 +0000
From: Brendan Moran <Brendan.Moran@arm.com>
To: Carsten Bormann <cabo@tzi.org>
CC: Øyvind Rønningstad <Oyvind.Ronningstad@nordicsemi.no>, suit <suit@ietf.org>, "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: [Suit] draft-moran-suit-manifest-02
Thread-Index: AdQTbk+t1KsTGeClRXioTvYSJXY/hwAaKKmAAYU6uQA=
Date: Thu, 12 Jul 2018 14:23:13 +0000
Message-ID: <F4C61E4F-4FCD-431B-8423-F65038F6F476@arm.com>
References: <edc46af214244a119950582014c8dbfe@nordicsemi.no> <F5F669C7-EBE8-41B7-B9C3-9A27F45F264B@tzi.org>
In-Reply-To: <F5F669C7-EBE8-41B7-B9C3-9A27F45F264B@tzi.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3445.8.2)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brendan.Moran@arm.com;
x-originating-ip: [217.140.96.140]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM4PR0802MB2306; 7:jIyWXU4Q101rkNxvG71dGWUtaB18kmSIzGTzTgRWb1lgJPKZ4z72KKAxK4sipdwHobK7W+zx0GZCr6KRR1O48cu4+THWZe1fzYU1E7yLo36WaHcjNrg7RuIq95TGxBwQDZcJ9yK8Dzd4kZ9mvezZd/Y2wVkRTnz58GoAKmcvQVc4k7Bcyc7h9JNO4CTO9TE6BPtx8Cicu+QtOxVdGc+4i+MRnYEIboMY+yb9mLPSBtSH17NzRig5oxlNPTOiO7oX
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 55b364b9-ef43-4e9b-579b-08d5e8030064
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM4PR0802MB2306;
x-ms-traffictypediagnostic: AM4PR0802MB2306:
x-microsoft-antispam-prvs: <AM4PR0802MB23062236649F24015F3808CCEA590@AM4PR0802MB2306.eurprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(278428928389397)(189930954265078)(223705240517415)(238713787762100);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM4PR0802MB2306; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0802MB2306;
x-forefront-prvs: 0731AA2DE6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(376002)(366004)(346002)(396003)(40434004)(51444003)(189003)(199004)(6916009)(36756003)(2906002)(50226002)(82746002)(6486002)(106356001)(6436002)(14454004)(6512007)(54896002)(14444005)(345774005)(5024004)(236005)(256004)(6506007)(102836004)(478600001)(53546011)(316002)(6246003)(3846002)(6116002)(26005)(186003)(83716003)(72206003)(54906003)(33656002)(105586002)(76176011)(57306001)(81156014)(486006)(68736007)(11346002)(446003)(81166006)(5250100002)(97736004)(476003)(53936002)(229853002)(86362001)(7736002)(25786009)(99286004)(66066001)(2900100001)(8676002)(8936002)(2616005)(4326008)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0802MB2306; H:AM4PR0802MB2260.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: vMx3vfMULoUQoGYFb9f/5ozFU8s5cIpcWMnd23IveiV4S7Flyx1fSIb+ecAShHmSnWy5ZR0uXPC/FLZeaLjuCdLkQNErG1VC5bzxjJJgmPP6FU5mo93U5U06Gy+Bie5qw77foxJhyw4/rnVbuFUnAAyTPAoLpmKdrlaN/yDk66vN8pE1D0CKpNZqPBvZ+PXAAHoS+PNX5IzEYDdWteLqY7eflLhK0F1I2DbIwSp8S4Eq5vXuuUr1eYm6mE0tsON0E1I/WBbWF5RfqfnqZWghytLKKZYxTde/BcUrrDXxVm+ncyDHg7cITD4dLmqmjjgWzCDVv+zRnDQmb2sLNWT3etF63G2piRC6glqx/RzRS24=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_F4C61E4F4FCD431B8423F65038F6F476armcom_"
MIME-Version: 1.0
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 55b364b9-ef43-4e9b-579b-08d5e8030064
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2018 14:23:13.1114 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2306
Archived-At: <https://mailarchive.ietf.org/arch/msg/suit/VCxr8OCEYnmkLfLsHX_CxEg3BH8>
Subject: Re: [Suit] draft-moran-suit-manifest-02
X-BeenThere: suit@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Software Updates for Internet of Things <suit.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/suit>, <mailto:suit-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/suit/>
List-Post: <mailto:suit@ietf.org>
List-Help: <mailto:suit-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/suit>, <mailto:suit-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Jul 2018 14:23:21 -0000
Thank you for the comments Carsten and Øyvind. I think I submitted that draft in too much of a hurry!
Directives are intended to handle a set of problems that are entirely constrained to the application of the manifest. For example:
* Wait until battery level is above 50% before applying manifest (note that there is a similar condition for non-energy harvesting applications)
* Reboot after application
* Restart designated component when installation is complete
* Apply only at 23:59 on a Saturday.
* Disconnect from the network prior to installation
Meanwhile, extensions are a placeholder for all those concepts that we haven’t realised we’re missing yet.
The ProcessingSteps need to have multiple inputs. I think that inode should be a list and onode should be single. Then, a processor is the aggregate of a map of inputs and a single output. It may be that this is not correct and that multiple onodes are needed.
If a target is an alias, that implies several things:
* There must be another target with the same digest in a dependency manifest
* The target is missing several key pieces of information:
* Size
* Component ID
* Storage location
* Encoding
* The containing manifest doesn’t need to have rights to install the target
The point of the alias is to redirect a client to different hosting infrastructure for a given payload.
There must be a way to reference the resources declared by dependency manifests. There are two ways that I can see to handle this:
1. Use arbitrary names (this is vulnerable to node-name collisions)
2. Use node paths (this makes cross-branch references more difficult, but I’m not certain that those are legitimate: each manifest should declare its dependencies explicitly; if that means there are duplicate manifests in a tree, that is acceptable.)
If node paths are used, then how are they encoded? I would suspect they should be CBOR arrays.
I’ll see what I can do about those CDDL problems! Once I have a chance to take in some more of the feedback, I’ll send a CDDL file that encompasses these and more recommendations out.
Thanks,
Brendan
On 4 Jul 2018, at 21:38, Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>> wrote:
On Jul 4, 2018, at 10:26, Rønningstad, Øyvind <Oyvind.Ronningstad@nordicsemi.no<mailto:Oyvind.Ronningstad@nordicsemi.no>> wrote:
>
> • CDDL nitpicking:
> • Some name inconsistencies: ProcessingStep vs Processor, TargetInfo vs Target.
> • There's probably a typo in the definition of Directive. Should it be an array of maps?
> • Target::storageIdentifier and Target::componentIdentifier don't use the custom types for StorageIdentifier and ComponentIdentifier.
> • I think digests should have a type, so the user can more easily restrict its format after choosing a digest algorithm.
> • Suggestion: Add nint to textKeys group.
> • AuthenticatedManifest should probably contain an authenticatedManifestVersion or similar.
> • "Processor" might be confusing (“does it mean CPU?”).
It also helps to occasionally run instances of formal languages through some tool to check them…
Apart from inconsistent use of names, most of the syntax errors stem from the arcane syntax that CDDL is using for its workaround for not having true enumerations (Section 2.2.2.2 of draft-ietf-cbor-cddl-03.txt); this requires commas (or nothing) instead of slashes, and an enclosing &, so with Øyvind’s suggestion, textKeys becomes, e.g.:
textKeys = &(
uninitialised: 0
manifestDescription: 1
payloadDescription: 2
vendorName: 3
modelName: 4
payloadVersion: 5
) / nint
And Processor starts off as:
Processor = [
&(decrypt: 1, decompress: 2, undiff: 3, relocate: 4, unrelocate: 5),
(Of course, the same thing can be expressed as:
Processor = [
&(decrypt: 1, decompress: 2, undiff: 3, relocate: 4, unrelocate: 5),
decrypt: 1 // decompress: 2 // undiff: 3 // relocate: 4 // unrelocate: 5,
Not sure what the intent is here; in the first case, I’d probably also add a label, as in
Processor = [
process: &(decrypt: 1, decompress: 2, undiff: 3, relocate: 4, unrelocate: 5),
I have attached a version that parses (I don’t think an attachment will make it to the lists) but does not address any other of Øyvind’s suggestions.
The other problem that should probably be addressed is that most rules are unused — there would need to be one cddl file for the manifest, and maybe one for the COSE envelope. We simply don’t have a good way in CDDL yet to say “Manifest goes through an algorithm and turns up in COSE_Sign” — actually, in this case this could be solved in part as the manifest turns up in cleartezt.
I have included a dirty hack in the attached which I intend to fix.
I’m CCing the CBOR WG to give an example for CDDL being used in another WG. If you want to discuss a CDDL feature, please strike SUIT from the list (and if you want to discuss a SUIT feature, maybe strike CBOR from the list).
Grüße, Carsten
<suit.cddl>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
- [Suit] draft-moran-suit-manifest-02
- Re: [Suit] draft-moran-suit-manifest-02 Carsten Bormann
- Re: [Suit] draft-moran-suit-manifest-02 Brendan Moran