Re: [netmod] Benjamin Kaduk's No Objection on draft-ietf-netmod-yang-instance-file-format-20: (with COMMENT)

Benjamin Kaduk <kaduk@mit.edu> Thu, 07 October 2021 21:45 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 084F43A0EF8; Thu, 7 Oct 2021 14:45:16 -0700 (PDT)
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, SPF_HELO_NONE=0.001, SPF_NONE=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 XTOx97okXD2m; Thu, 7 Oct 2021 14:45:11 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 C7B013A0EF3; Thu, 7 Oct 2021 14:45:10 -0700 (PDT)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 197LiqQc006570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 7 Oct 2021 17:44:57 -0400
Date: Thu, 07 Oct 2021 14:44:51 -0700
From: Benjamin Kaduk <kaduk@mit.edu>
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: The IESG <iesg@ietf.org>, Benoit Claise <benoit.claise@huawei.com>, "draft-ietf-netmod-yang-instance-file-format@ietf.org" <draft-ietf-netmod-yang-instance-file-format@ietf.org>, "netmod-chairs@ietf.org" <netmod-chairs@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, Kent Watsen <kent+ietf@watsen.net>
Message-ID: <20211007214451.GP4103@kduck.mit.edu>
References: <163358247829.29462.17588872571177332548@ietfa.amsl.com> <AM8PR07MB8230FBE7CE299FC130504357F0B19@AM8PR07MB8230.eurprd07.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AM8PR07MB8230FBE7CE299FC130504357F0B19@AM8PR07MB8230.eurprd07.prod.outlook.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/k4-jfePlHecH7h_eE_-eqoBKdTo>
Subject: Re: [netmod] Benjamin Kaduk's No Objection on draft-ietf-netmod-yang-instance-file-format-20: (with COMMENT)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Oct 2021 21:45:16 -0000

Hi Balázs,

Replies inline as well (where needed)

On Thu, Oct 07, 2021 at 10:43:28AM +0000, Balázs Lengyel wrote:
> Hello Benjamin,
> Thank you for the thorough review. I used your comments to improve the draft. See my detailed answers below as BALAZS:
> Regards Balazs
> 
> -----Original Message-----
> From: Benjamin Kaduk via Datatracker <noreply@ietf.org> 
> Sent: 2021. október 7., csütörtök 6:55
> To: The IESG <iesg@ietf.org>
> Cc: draft-ietf-netmod-yang-instance-file-format@ietf.org; netmod-chairs@ietf.org; netmod@ietf.org; Kent Watsen <kent+ietf@watsen.net>; kent+ietf@watsen.net
> Subject: Benjamin Kaduk's No Objection on draft-ietf-netmod-yang-instance-file-format-20: (with COMMENT)
> 
> Benjamin Kaduk has entered the following ballot position for
> draft-ietf-netmod-yang-instance-file-format-20: No Objection
> 
> When responding, please keep the subject line intact and reply to all email addresses included in the To and CC lines. (Feel free to cut this introductory paragraph, however.)
> 
> 
> Please refer to https://www.ietf.org/blog/handling-iesg-ballot-positions/
> for more information about how to handle DISCUSS and COMMENT positions.
> 
> 
> The document, along with other ballot positions, can be found here:
> https://datatracker.ietf.org/doc/draft-ietf-netmod-yang-instance-file-format/
> 
> 
> 
> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
> 
> Should we register media-types for the file formats being specified?
> 
> Section 2
> 
>    Two formats are specified based on the XML and JSON YANG encodings.
>    Later, as other YANG encodings (e.g., CBOR) are defined, further
>    instance data formats may be specified.
> 
> I don't remember seeing a clear description of the specifics of these two specified formats.  (I assume it's just "use the XML/JSON encoding for YANG structures", but I don't remember that stated anywhere.)
> BALAZS: I added references to the relevant RFCs (7950, 7951, 8791) As the model starts with a YAN structure, I included YANG Data Structure Extensions RFC8791 too.

I was hoping for a statement like "The file formats are achieved by
applying the respective XML and JSON encoding rules for the YANG structure
included in this document."

>    The name of the instance data file SHOULD be of the form:
> 
>       instance-data-set-name ['@' ( revision-date / timestamp ) ]
>                      ( '.xml' / '.json' )
> 
> This looks (almost?  Not sure about '@' vs. "@".) like valid ABNF.  Do we want to say that and reference RFC 5234 for the interpretation of the symbols?
> BALAZS: reference to ABNF added. Changed to double quotes.
> 
>    If the leaf "name" is present in the instance data header, its value
>    SHOULD be used for the "instance-data-set-name".  If the "revision-
>    date" is present in the filename it MUST conform to the format of the
>    revision-date leaf in the YANG model.  [...]
> 
> This seems unenforcable, and contrary to the Unix ethos.  Why is it necessary to try to have consistency betwen the contents of the file and its name in the file system, as opposed to letting the type and contents of a file speak for itself regardless of the name in the file system?
> BALAZS: We use the convention of RFC7950: to use the name of the top YANG construct 
> in the filename (there the module name here the structure name). 
> In practice this convention proved very useful. (There already exist some implementations of the YANG instance data).
> A similar rule for YANG modules is enforced by many tools e.g., pyang and confdc.

This is just a COMMENT, so I don't specifically object, even if it seems
surprising to me.

>    Metadata, information about the data set itself SHOULD be included in
>    the instance data set.  Some metadata items are defined in the YANG
>    module "ietf-yang-instance-data", but other items MAY be used.
> 
>    Metadata MUST include:
> 
>       -  Version of the YANG Instance Data format
> 
> Doesn't the latter (MUST) effectively make the former (SHOULD) also into a "MUST"?
> BALAZS: Yes, I will change it to MUST. The format-version is a MUST either as a default value 
> (not actually present according to YANG rules) or as an explicitly specified value. 
> The other metadata items are only recommended (SHOULD).
> 
> Also, if this is actually mandatory, shouldn't that be reflected in the YANG module?
> BALAZS: IN the YANG module leaf format-version has a default value. That means that 
> either the default value or some explicitly set vale is always usable for the user of the file. 
> Added text to clarify this.

Ah, good point, I forgot about the interaction between default and
mandatory.

> Section 2.1.2
> 
>    import-only dependencies MAY be excluded from the leaf-list.  If they
>    are excluded then the consumer of the instance data set has to apply
>    the YANG language rules to resolve the imports.  An example of the
> 
> Do we want to say something like "Accordingly, recipients of the instance data set must be prepared to perform this processing, absent prior knowledge about the files they will be processing"?
> BALAZS: According to YANG rules the "implemented" module that is specified in the content schema MAY have used an 
>   Import-by-revision statement in which case the revision date of the imported module is fixed/specified in that YANG module.
> If import-by-revision was not used, any revision of the imported module is usable, which in practice for most tools means the
>    latest available revision. 
> IMHO which revision of an imported module to use should be and is covered by RFC7950.

Ok.  I agree that the YANG spec is pretty clear on what has to happen, so
there's not a strong need to reiterate it here.

> Section 2.2.1
> 
>     <contact>info@acme.com</contact>
> 
> Unfortunately, acme.com is a real domain name; we should probably use a BCP 32 name.  Likewise for urn:rdns:acme.com:oammodel:acme-system-ext,
> etc.
> BALAZS: OK, I will change references to acme.example.com.com as according to BCP 32 example.com is reserved.
> 
> Section 2.2.2
> 
>      <nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
>        <enable-nacm>true</enable-nacm>
>        <read-default>deny</read-default>
>        <exec-default>deny</exec-default>
> 
> Is there a <write-default> that should be set as well?  Or do we just implicitly rely on the default from RFC 8341?
> BALAZS: The latter. As defined in RFC8341 write-default's default is deny, so it is strict enough.
> 
> Section 3
> 
>          description
>            "An arbitrary name for the YANG instance data set.  This
>             value is primarily used for descriptive purposes.  However,
>             when the instance data set is saved to a file, then the
>             filename MUST encode the name's value, per Section 3
>             of RFC XXXX.";
> 
> I think this requirement is currently stated in Section 2, not 3 (though in my previous comment I suggest that the requirement should be removed).
> BALAZS: Thanks,  Section number corrected.
> 
> Section 4
> 
> (I wrote, then deleted as duplicate, essentially all of the same things that Roman commented on.  Thanks for updating in response to his
> comments.)
> 
>    The document does not specify any method to influence the behavior of
>    a server.
> 
> A few of the listed use cases seem to involve loading configuration into a server, which could perhaps be considered to influence the behavior of the server in question.
> BALAZS: Yes, but the document only defines the data format. Section 1 states:
> " specifying how and when to use YANG instance data is out of
>    scope for this document.  It is anticipated that other documents will
>    define specific use cases.  Use cases are listed only as examples."
> 
>    The header part is not security sensitive with one possible
>    exception.  If the URI method is used for specification of the
>    content schema and the URI includes a username and/or a password, the
>    instance data file needs to be handled securely as mentioned below.
> BALAZS: Corrected based on Roman's comment.
> 
> In the terminology of RFC 3986 this is the "userinfo subcomponent", as in "the URI includes a userinfo subcomponent".
> BALAZS: OK, to be updated.
> 
> NITS
> 
> Section 2.2.1, 2.2.2
> 
> It's a bit challenging to get the <revision> of the file to be much older than the <revision> of the YANG modules it uses.
> BALAZS: It was a bit of a joke to use two historically significant dates
> 1776-07-04 US declaration of independence
> 1956-10-23 Hungary, the start of the revolution against communism and Russian occupation
> I will change them to newer dates.

It does seem fun to have the historically significant dates as the document
is being developed.  I appreciate your willingness to change the dates to
avoid confusing readers about how the dates could have gotten that way in
the examples.

Thanks for all the replies and updates,

Ben