Re: [Yot] questions concerning sid value assignments

peter van der Stok <stokcons@xs4all.nl> Mon, 19 February 2018 10:09 UTC

Return-Path: <stokcons@xs4all.nl>
X-Original-To: yot@ietfa.amsl.com
Delivered-To: yot@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 08846127241 for <yot@ietfa.amsl.com>; Mon, 19 Feb 2018 02:09:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.621
X-Spam-Level:
X-Spam-Status: No, score=-2.621 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 3OFl2_6eGKVA for <yot@ietfa.amsl.com>; Mon, 19 Feb 2018 02:09:02 -0800 (PST)
Received: from lb1-smtp-cloud8.xs4all.net (lb1-smtp-cloud8.xs4all.net [194.109.24.21]) (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 5B2A0126D05 for <yot@ietf.org>; Mon, 19 Feb 2018 02:09:02 -0800 (PST)
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:212]) by smtp-cloud8.xs4all.net with ESMTPA id niNXeOdgGar0wniNXeNNfq; Mon, 19 Feb 2018 11:08:59 +0100
Received: from AMontpellier-654-1-73-22.w90-0.abo.wanadoo.fr ([90.0.168.22]) by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Mon, 19 Feb 2018 11:08:59 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"; format="flowed"
Content-Transfer-Encoding: 7bit
Date: Mon, 19 Feb 2018 11:08:59 +0100
From: peter van der Stok <stokcons@xs4all.nl>
To: Michel Veillette <Michel.Veillette@trilliantinc.com>
Cc: consultancy@vanderstok.org, Michael Richardson <mcr+ietf@sandelman.ca>, "Panos Kampanakis (pkampana)" <pkampana@cisco.com>, Kent Watsen <kwatsen@juniper.net>, yot@ietf.org
Organization: vanderstok consultancy
Reply-To: consultancy@vanderstok.org
Mail-Reply-To: consultancy@vanderstok.org
In-Reply-To: <eaccba06f07bc88eac32285fb8880f06@xs4all.nl>
References: <faa44e95aa561876f119edc7358fd118@xs4all.nl> <26096.1518551413@obiwan.sandelman.ca> <9e0d297ad888a36e16921d10873cc947@xs4all.nl> <BN6PR06MB23082D66ED7486BDA002B1DBFEF50@BN6PR06MB2308.namprd06.prod.outlook.com> <eaccba06f07bc88eac32285fb8880f06@xs4all.nl>
Message-ID: <22cc48128046319c662c116bcc39d761@xs4all.nl>
X-Sender: stokcons@xs4all.nl
User-Agent: XS4ALL Webmail
X-CMAE-Envelope: MS4wfC2+7apZT0X6amJ47Q56+0TXuKgnU1G0DX5yXEV9DFlzZi/kmFnDgh2arf2DUh8xc/LTr4Fe7dYD1QZdkqF61a+3VjneOUk7wEyOhLbfXt9lcS2MJyw0 ErDC8ZSUISasgONDE/uBBc0ya6RrO2EOLfWM02cODGLOw1MVSbl0A9zfAm3k1vOB7Q5cSQ9E0H3cNO3BX0mHjQC0DzKGpm8ktJVFgM0CmTySfeqFjyekawHd tjKs7gXGkhUgFuPaafA9KisMm4qWovPYBWWD4JXxsB/NWa4Vhh6g7EH/0ASjw1H+tv5mThJ2OlnU/J8O4+a8IQ==
Archived-At: <https://mailarchive.ietf.org/arch/msg/yot/XKU3HNzW15PRY2bzumknn4HI8Mc>
Subject: Re: [Yot] questions concerning sid value assignments
X-BeenThere: yot@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Yang of Things <yot.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yot>, <mailto:yot-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yot/>
List-Post: <mailto:yot@ietf.org>
List-Help: <mailto:yot-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yot>, <mailto:yot-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Feb 2018 10:09:05 -0000

Hi Michel,

I created an example for myself by heart. Can you see if my memory is 
still correct?

I assume a server with one voucher module and one cwt-voucher module;
The augment with grouping is used for SID allocation.
The diagnostic notation is used for CBOR.

All goes well for the cwt-voucher use as described in the constrained 
voucher document.

A returned voucher may look like (checked with cbor.me)

{
      1001000: {
        +3 : "2016-10-07T19:31:42Z",
        +5 : "2016-10-21T19:31:42Z",
        +2 : "verified",
        +11 : "JADA123456789",
        +6 : "base64encodedvalue==",
        +9 : "base64encodedvalue==",
        +4 : "true",
        +7 : "2017-10-07T19:31:42Z",
      }
    }

A returned cwt-voucher may look like:

{
      1001030: {
        -27 : "2016-10-07T19:31:42Z",
        -25 : "2016-10-21T19:31:42Z",
        -28 : "verified",
        -19 : "JADA123456789",
        -24 : "base64encodedvalue==",
        -21 : "base64encodedvalue==",
        -26 : "true",
        -23 : "2017-10-07T19:31:42Z",
        +1 : "base64encodedvalue=="
      }
    }

Both can be identified nicely though the presence of 1001030 or 1001000

However, when using comi to return the value of for example:
ietf-voucher/created-on, or
iet-cwt-voucher/created-on

The request for both is identical:

GET //example-server.com/c/1001003

The server does not know which one to return.

Did I miss something?

Peter

peter van der Stok schreef op 2018-02-15 09:45:
> Hi Michel,
> 
> I understand.
> 
> What I have not completely reasoned through is the use of augment in
> test2 augment with grouping.
> The SIDS of most of the voucher/leaves and the cwt-voucher/leaves are 
> identical.
> I wonder if that can lead to confusion when a server contains both
> cwt-vouchers and vouchers
> Does the client need to check on the presence of the leaf
> "pinned-domain-subject-public-key-info" to know the answer?
> 
> I need to construct an example with a container containing both
> vouchers and a list of both vouchers.
> Will do that next week.
> 
> Peter
> 
> Michel Veillette schreef op 2018-02-14 22:31:
>> About " When two YANG identifiers are different the SIDs should be
>> different, I think."
>> 
>> [I-D.ietf-core-sid] map a SID to a fully qualified path.
>> The same leaf name or path defined in two different YANG modules will
>> be map to two different SIDs.
>> 
>> For example:
>>        {
>>          "namespace": "data",
>>          "identifier": "/ietf-system:system-state/platform/os-name",
>>          "sid": 1726
>>        },
>> 
>> Regards,
>> Michel
>> 
>> -----Original Message-----
>> From: peter van der Stok [mailto:stokcons@xs4all.nl]
>> Sent: Wednesday, February 14, 2018 3:07 AM
>> To: Michael Richardson <mcr+ietf@sandelman.ca>
>> Cc: consultancy@vanderstok.org; Panos Kampanakis (pkampana)
>> <pkampana@cisco.com>; Michel Veillette
>> <Michel.Veillette@trilliantinc.com>; Kent Watsen <kwatsen@juniper.net>
>> Subject: Re: questions concerning sid value assignments
>> 
>> Hi Michael,
>> 
>> This is a serious issue; Thinking about is, I changed my mind several 
>> times.
>> I have cc'ed Kent, hoping he can provide some assistance.
>> 
>> Actually, there is a one to one relation between SID value and YANG 
>> identifier.
>> The YANG identifier includes the module name and prefix, as specified
>> in the SID I-D (did not check).
>> When two YANG identifiers are different the SIDs should be different, 
>> I think.
>> Given that voucher and cwt-voucher have different module names, the
>> YANG identifiers are different.
>> Conclusion, the SIDs should be different For example, the SID of
>> expires-on in the cwt-voucher module is different from the SID of
>> expires-on in the voucher module.
>> 
>> What do you think? It seems to hold more water than the semantics 
>> argument.
>> 
>> Peter
>> 
>> Michael Richardson schreef op 2018-02-13 20:50:
>>> peter van der Stok <stokcons@xs4all.nl> wrote:
>>>     > There are two ways to go forward:
>>>     > 1) reuse as much as possible SID values generated for the 
>>> voucher
>>>     > identifiers in "used" versions
>>> 
>>> Are we talking about the SID value for "expires-on" would be the same
>>> between an ietf-cwt-voucher-request and ietf-cwt-voucher, because 
>>> both
>>> are derived from the same ietf-voucher document?
>>> 
>>> I want to say that I can live with it either way. I prefer it to be
>>> the same, because it makes coding easier, but I can cope.
>>> 
>>>     > 2) assume that reusing is OK, but the voucher identifiers can 
>>> be
>>> assigned
>>>     > different SID values, because their semantics are different.
>>> 
>>> So that's the thing, it might be different in other situations, and
>>> wouldn't want to screw things up down the road just to save a
>>> definition in a
>>> file.   Maybe different semantics are in fact a "do not" though.
>>> 
>>>     > Do you have an idea about that. Possibly you can explain how 
>>> you
>>> think that
>>>     > the grouping should be used for different voucher versions and
>>> if that
>>>     > applies to the cwt-voucher.
>>> 
>>>     > As far as I understand, the semantics of identifiers of the
>>> cwt-voucher are
>>>     > identical to the ones of the original yang voucher 
>>> specification.
>>> In that
>>>     > case the SID values should be identical as well (seems to me)
>>> 
>>> Agreed.
>>> 
>>> --
>>> Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
>>> -= IPv6 IoT consulting =-