Re: [Iot-onboarding] [Anima] RFC 8366: voucher artifact error in example?

Kent Watsen <kent+ietf@watsen.net> Wed, 12 February 2020 00:01 UTC

Return-Path: <0100017036b2e734-98b9ea60-f321-4ef1-92cf-c1243dc9d07c-000000@amazonses.watsen.net>
X-Original-To: iot-onboarding@ietfa.amsl.com
Delivered-To: iot-onboarding@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74C0512006D; Tue, 11 Feb 2020 16:01:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 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_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.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 xLQo5ePRJ02r; Tue, 11 Feb 2020 16:01:01 -0800 (PST)
Received: from a8-83.smtp-out.amazonses.com (a8-83.smtp-out.amazonses.com [54.240.8.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EFAEC12004C; Tue, 11 Feb 2020 16:01:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1581465659; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=Do2YJ14hNNIyrh9SmwDZhEhS2PfmWU95FJU08WI5cKQ=; b=CA1U+v+T98dXoR1js8FzGW5ycBS0glDJgAuF8zFyP05ziTer1xFdNckFAoO4rpyt g98U3Dpwdq4Va24PJYSzSBHcdHBClNUYdPhMA6Jsc82edqxdgAU4UtmRV3ri/MBp4go gUfemuh3zAlXBryB4owroRZ5YKsBXdDFc68vvmuA=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <0100017036b2e734-98b9ea60-f321-4ef1-92cf-c1243dc9d07c-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_E78B1EED-B330-47A5-9848-4CFFAE7B38EA"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Wed, 12 Feb 2020 00:00:59 +0000
In-Reply-To: <2056.1581454913@dooku>
Cc: iot-onboarding@ietf.org, anima@ietf.org, "M. Ranganathan" <mranga@gmail.com>
To: Michael Richardson <mcr+ietf@sandelman.ca>
References: <CAHiu4JOMfY2oZb1TG5Lbbyb=Wd09+Ju9fOcBU5VcvmvmCQ7_ZQ@mail.gmail.com> <1556.1581357910@dooku> <0100017031a2d6ec-545e8e6a-1259-45da-a7da-1da0a461cce6-000000@email.amazonses.com> <27564.1581420319@dooku> <0100017034d44195-102b3d22-0c0f-48dd-b9f2-0487e81270f2-000000@email.amazonses.com> <2056.1581454913@dooku>
X-Mailer: Apple Mail (2.3445.104.11)
X-SES-Outgoing: 2020.02.12-54.240.8.83
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/iot-onboarding/Kz9JHcQBCIZZtP6AtkcwTy_QcIc>
Subject: Re: [Iot-onboarding] [Anima] RFC 8366: voucher artifact error in example?
X-BeenThere: iot-onboarding@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion of IoT onboarding mechanisms <iot-onboarding.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/iot-onboarding>, <mailto:iot-onboarding-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/iot-onboarding/>
List-Post: <mailto:iot-onboarding@ietf.org>
List-Help: <mailto:iot-onboarding-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/iot-onboarding>, <mailto:iot-onboarding-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Feb 2020 00:01:03 -0000

>>>> The confusion is likely because folks expect that the “yang-data”
>>>> extension define a node, but it doesn’t.  It acts more like a YANG
>>>> “grouping” than a YANG “container” in that regard. For instance, give
>>>> the YANG:
>>> 
>>> Okay, so are you saying that it has to be a voucher-artifact, not a voucher,
>>> and the examples in BRSKI are wrong?
>>> (That's really annoying)
> 
>> I’m unsure what you mean by “it” but, again, the examples in RFC 8366 are correct.
>> Note that “voucher-artifact” does NOT appear in the examples.
> 
> By, "it", I meant the marker in the JSON:
> 
>    ranga> {
>    ranga> "ietf-voucher:voucher-artifact": {

Ranga’s question was if this should be the case.  The answer is “no” and no errata is needed.



>> AFAICT, the examples in Section 3.3 in keyinfra-35 are also correct.
> 
> okay, I was worried it didn't work out. (Whew!!!)

> What is it in the YANG that means the serialized JSON is
>     "ietf-voucher:voucher" rather than "ietf-voucher:voucher-artifact”?

The "ietf-voucher:” prefix appears because “ietf-voucher" is the name of the module (i.e. ietf-voucher@2018-05-09.yang <mailto:ietf-voucher@2018-05-09.yang>).

The “name” parameter of the “rc:yang-data” statement has no effect on the serialized encoding.  Yes, the name is “voucher-artifact”, but that string never appears in instance documents.

What does matter is that the rc:yang-data’s immediate descendent is a ‘container’ node called “voucher”.  This string *does* appear in the serialized form.

Hence it is "ietf-voucher:voucher" rather than "ietf-voucher:voucher-artifact”.

Kent