Re: [yang-doctors] Yangdoctors early review of draft-ietf-opsawg-mud-08

Andy Bierman <andy@yumaworks.com> Wed, 23 August 2017 16:59 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 80C3C120721 for <yang-doctors@ietfa.amsl.com>; Wed, 23 Aug 2017 09:59:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 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_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 O5mhChSUDnum for <yang-doctors@ietfa.amsl.com>; Wed, 23 Aug 2017 09:59:45 -0700 (PDT)
Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 29CA4124B18 for <yang-doctors@ietf.org>; Wed, 23 Aug 2017 09:59:45 -0700 (PDT)
Received: by mail-wm0-x22e.google.com with SMTP id l19so3182414wmi.1 for <yang-doctors@ietf.org>; Wed, 23 Aug 2017 09:59:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LODwwBWKdXn3Wvvesch3ADh9faXW0854ofVGvQoq+oI=; b=MMyc7wvY+AxNEcaxYhdA201OoDSGA94TRiItLMii4ZzRiQRPt6W0Sm7WrNeynTsJ5S ksSa9fHN3CEeT/QJtlH8pe+OF2Kouef4gepAMymPclssg3U2gg1aA71DDR+CeVEYoDWr cXV9YTyh8OG3ddKdqmrS8MLVN7hJ+We/KqHiiQxxfOF87Tr/hiXuEkiwcmLChI3sXMFh EmeAXMUB+DxminN+k0x7BLOvc3tWMMeyXlZPhmQtf5TWPxgqrcBsnq2c3QycgYcXE/bB iTxqePWxsSfPnAl36kWOithOoTl3zI5G9B17z5yf12lrTu9sWP/k59grJhcPfuww7g/R CKbQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LODwwBWKdXn3Wvvesch3ADh9faXW0854ofVGvQoq+oI=; b=ra7qphDVix8Zmkob47rhNTNtdOoAn2tDsz2w6rS/ihfCVdweqwc/k+eRdkazFCPWND JoflpiFE22isgb3IarmBfKFbjG0d8zkLhLMLcnwrhtRbBvzN0EORAhecykkWLWg6WAQ3 NF0B2rk93Z4MeHwx5D+24F06A9QvGpVmeqCKApVjthBX1vSimDOarqDJplUVs+8EKZmO dBtB/yzMUbx0ehsm1z6L4uL0VAdFEHYvpgGoGnsCzYDESooYSgif2zzZoUgam4pJGsZ9 M3IfdqB2K/RjFPrEYYNSNPPgFpitLhuOU0XPUrGPMepb+NXCDRXHfvBiEMazyiNmP1By U5Sw==
X-Gm-Message-State: AHYfb5hknsn0ZwVyfBvw/sx7LzXXZpO9I/PledlBpiSl73YjDxop00zA rmlr7do8cr8vbdFMdwH2yOA4PCeaUKVY
X-Received: by 10.28.16.133 with SMTP id 127mr1939770wmq.75.1503507583633; Wed, 23 Aug 2017 09:59:43 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.164.221 with HTTP; Wed, 23 Aug 2017 09:59:42 -0700 (PDT)
In-Reply-To: <20170823.100659.305891042923397070.mbj@tail-f.com>
References: <150340909415.6001.14045177084948571272@ietfa.amsl.com> <20170823.100659.305891042923397070.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 23 Aug 2017 09:59:42 -0700
Message-ID: <CABCOCHQznpgCYssekPz+-EjST13tisrdeuv_k6PppW0XpONA0w@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: YANG Doctors <yang-doctors@ietf.org>, draft-ietf-opsawg-mud.all@ietf.org
Content-Type: multipart/alternative; boundary="001a1146d95070dd1105576ea32b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/5m-tV6DShcuLPwvzS5BfF5mDtu4>
Subject: Re: [yang-doctors] Yangdoctors early review of draft-ietf-opsawg-mud-08
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Aug 2017 16:59:49 -0000

On Wed, Aug 23, 2017 at 1:06 AM, Martin Bjorklund <mbj@tail-f.com> wrote:

> Hi,
>
> I would like to direct the YANG doctors attention to one design choice
> in this document:
>
> The document defines a normal "config true" data model, but this data
> model is not intended to be implemented by a server, but rather it
> defines the file format of a "MUD file".
>
> This idea is not new, it is used e.g. in the anima voucher document.
> Normally, we would require that they use "rc:yang-data" to define such
> a structure.
>
> However, the MUD file is supposed to contain some top-level nodes
> defined in the MUD YANG module, and also some /acl:access-lists
> nodes.  So even if the MUD document could define a rc:yang-data
> structure for the top-level nodes defined in the MUD document, it
> cannot get the access lists into this rc:yang-data structure.
>
> So the question to the YANG doctors is if this is ok, or if there is a
> better way to define this file format.
>
>
Why is it a problem to use a grouping in rc:yang-data?
This clearly needs to be rc:yang-data, not a real module with config=true
objects.
I think the artifact can contain data that matches the structure of config
data.
It is an implementation detail to convert the artifact to config data in a
datastore.



>
> /martin
>
>
>
Andy


>
> Martin Bjorklund <mbj@tail-f.com> wrote:
> > Reviewer: Martin Bjorklund
> > Review result: Ready with Issues
> >
> > Hi,
> >
> > I am the assigned YANG doctors reviewer for this document.  Here are
> > my comments:
> >
> >
> > o  Section 2 says:
> >
> >    The MUD file is limited to the serialization of a
> >    small number of YANG schema, including the models specified in the
> >    following documents:
> >
> >    o  [I-D.ietf-netmod-acl-model]
> >
> >    o  [RFC6991]
> >
> >    Is the intention that *only* these models are included, or *at
> >    least* these models are included?
> >
> >    RFC6991 doesn't define any data nodes, so I don't think it needs to
> >    be listed.  I suggest you are a bit more specific, and list:
> >
> >      o  ietf-access-control-list [I-D.ietf-netmod-acl-model]
> >
> >      o  ietf-mud [...]
> >
> >
> > o  Section 3 uses the term "element" (it is used in other places as
> >    well).  YANG uses the term "data node" or "node".  Or "YANG data
> >    node".  I suggest you use one of these terms, and import the term
> >    in your Terminology section.
> >
> >    Also, the YANG module uses the term "element" to refer to "device":
> >
> >     leaf is-supported {
> >       type boolean;
> >       description
> >         "The element is currently supported
> >          by the manufacturer.";
> >     }
> >
> >
> > o  In your Terminology section you introduce the term "Thing".  But
> >    the text often use "device".  Maybe use "device" consistently?
> >
> >
> > o  In order to get consistent indentation of the YANG modules, I
> >    suggest you run:
> >
> >      pyang -f yang ietf-mud.yang
> >
> >    (and same for ietf-acldns.yang)
> >
> >
> > o  Ensure that description statements contain proper sentences.  Also
> >    ensure that the descriptions are descriptive.  As an example of the
> >    latter, this is not a good description:
> >
> >     description
> >       "Which way are we talking about?";
> >
> >    In general, I found that the main document had better descriptions
> >    than the YANG module.  Consider moving the text from the main
> >    document to the YANG module (this also reduces the risk of
> >    inconsistencies).  If don't want to move text, I think you need to
> >    spend some effort on almost all descriptions in the YANG module.
> >
> >
> > o  In both modules, make sure you have a single revision
> >    statement.  Note that in IETF-terms, a revision statement is added
> >    when a new version of the module is publsihed as an RFC (so the
> >    initial RFC would have one revision statement).
> >
> >
> > o  The "ietf-mud" module is a bit unorthodox; it defines configuration
> >    data nodes, but it is not supposed to be implemented by a normal
> >    NETCONF/RESTCONF server.  Rather, it will be instantiated in a JSON
> >    file.  I think this should be stated in the description of the
> >    module.
> >
> >
> > o  I don't think the feature "mud-acl" is necessary.  It is only used
> >    to make the acl augment conditional on the feature.  I think that
> >    if this module is supported, the feature is also supported.  Or do
> >    you envision implementations of this module that would not support
> >    this feature?  If so, maybe you can explain that use case in the
> >    document.
> >
> >
> > o  leaf cache-validity could use a "units" statement:
> >
> >      units "hours";
> >
> >
> > o  I suggest you rename the grouping "access_lists" to "access-lists"
> >    for consitency.
> >
> >
> > o  Should any of the leafs in "/metainfo" be mandatory?
> >
> >
> > o  The "extensions" leaf-list mentions an IANA registry for
> >    extensions.  It would be usefule to mention this registry by name.
> >
> >    Also, shouldn't this registry be defined in the IANA Considerations
> >    section?
> >
> >
> > o  Section 3.7 mentions a leaf "packet-direction".  There is no such
> >    leaf in the YANG module.  There is one called "direction-initiated"
> >    though.
> >
> >    But since the "/device" container contains two different ACL sets,
> >    one for "to" and one for "from", is this augmentation really
> >    necessary?
> >
> >
> > o  The model has:
> >
> >       leaf local-networks {
> >         type empty;
> >         description
> >           "this string is used to indicate networks
> >            considered local in a given environment.";
> >
> >    This leaf is of type "empty", but the description says it is a
> >    string.
> >
> >    Also, what is the format of this string?  (Hmm, I think the
> >    description is wrong, this should indeed be type empty).
> >
> >
> > o  Would it be useful with an indication of the revision of "ietf-mud"
> >    that is used as the schema for a MUD file?  I.e., something like a
> >    leaf "mud-module-revision" in the "metainfo" container.
> >
> >
> > o  The example in section 8 has some errors, e.g., it has some
> >    camelCase node names.
> >
> >
> > _______________________________________________
> > yang-doctors mailing list
> > yang-doctors@ietf.org
> > https://www.ietf.org/mailman/listinfo/yang-doctors
> >
>
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors
>