Re: [Lsr] Benjamin Kaduk's Discuss on draft-ietf-ospf-yang-26: (with DISCUSS and COMMENT)

Benjamin Kaduk <kaduk@mit.edu> Fri, 23 August 2019 01:44 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: lsr@ietfa.amsl.com
Delivered-To: lsr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 49781120227; Thu, 22 Aug 2019 18:44:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.801
X-Spam-Level:
X-Spam-Status: No, score=0.801 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, GB_SUMOF=5, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no 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 JWyJuKmMudCG; Thu, 22 Aug 2019 18:44: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 1BE7612010E; Thu, 22 Aug 2019 18:44: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 x7N1i2Sb015257 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Aug 2019 21:44:05 -0400
Date: Thu, 22 Aug 2019 20:44:02 -0500
From: Benjamin Kaduk <kaduk@mit.edu>
To: "Acee Lindem (acee)" <acee@cisco.com>
Cc: The IESG <iesg@ietf.org>, "draft-ietf-ospf-yang@ietf.org" <draft-ietf-ospf-yang@ietf.org>, Stephane Litkowski <stephane.litkowski@orange.com>, "aretana.ietf@gmail.com" <aretana.ietf@gmail.com>, "lsr-chairs@ietf.org" <lsr-chairs@ietf.org>, "lsr@ietf.org" <lsr@ietf.org>
Message-ID: <20190823014342.GY60855@kduck.mit.edu>
References: <156645274645.25722.10228898924938704759.idtracker@ietfa.amsl.com> <DCC2B37B-7E04-4D6B-8C77-C48650CDA4B9@cisco.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <DCC2B37B-7E04-4D6B-8C77-C48650CDA4B9@cisco.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/lsr/mHqsnjdQvKPFC0EYRrVe7_RR2gM>
Subject: Re: [Lsr] Benjamin Kaduk's Discuss on draft-ietf-ospf-yang-26: (with DISCUSS and COMMENT)
X-BeenThere: lsr@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Link State Routing Working Group <lsr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lsr>, <mailto:lsr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lsr/>
List-Post: <mailto:lsr@ietf.org>
List-Help: <mailto:lsr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lsr>, <mailto:lsr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Aug 2019 01:44:14 -0000

On Fri, Aug 23, 2019 at 12:30:27AM +0000, Acee Lindem (acee) wrote:
> Hi Ben, 
> 
> ´╗┐On 8/22/19, 1:46 AM, "Benjamin Kaduk via Datatracker" <noreply@ietf.org>; wrote:
> 
>     Benjamin Kaduk has entered the following ballot position for
>     draft-ietf-ospf-yang-26: Discuss
>     
>     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/iesg/statement/discuss-criteria.html
>     for more information about IESG DISCUSS and COMMENT positions.
>     
>     
>     The document, along with other ballot positions, can be found here:
>     https://datatracker.ietf.org/doc/draft-ietf-ospf-yang/
>     
>     
>     
>     ----------------------------------------------------------------------
>     DISCUSS:
>     ----------------------------------------------------------------------
>     
>     (1) Can we check whether it's okay to use the yang "string" type for raw
>     cryptographic keys (e.g., ospfv2-key, ospfv3-key)?  My understanding was
>     that yang strings were limited to human-readable, but that the crypto
>     keys could be raw binary values.
> 
> It does only include human-readable keys. Here is the RFC 7950 YANG ABNF definition.
> 
> 
>    ;; any Unicode or ISO/IEC 10646 character, including tab, carriage
>    ;; return, and line feed but excluding the other C0 control
>    ;; characters, the surrogate blocks, and the noncharacters
>    yang-char = %x09 / %x0A / %x0D / %x20-D7FF /
>                                ; exclude surrogate blocks %xD800-DFFF
>               %xE000-FDCF /    ; exclude noncharacters %xFDD0-FDEF
>               %xFDF0-FFFD /    ; exclude noncharacters %xFFFE-FFFF
>               %x10000-1FFFD /  ; exclude noncharacters %x1FFFE-1FFFF
>               %x20000-2FFFD /  ; exclude noncharacters %x2FFFE-2FFFF
>               %x30000-3FFFD /  ; exclude noncharacters %x3FFFE-3FFFF
>               %x40000-4FFFD /  ; exclude noncharacters %x4FFFE-4FFFF
>               %x50000-5FFFD /  ; exclude noncharacters %x5FFFE-5FFFF
>               %x60000-6FFFD /  ; exclude noncharacters %x6FFFE-6FFFF
>               %x70000-7FFFD /  ; exclude noncharacters %x7FFFE-7FFFF
>               %x80000-8FFFD /  ; exclude noncharacters %x8FFFE-8FFFF
>               %x90000-9FFFD /  ; exclude noncharacters %x9FFFE-9FFFF
>               %xA0000-AFFFD /  ; exclude noncharacters %xAFFFE-AFFFF
>               %xB0000-BFFFD /  ; exclude noncharacters %xBFFFE-BFFFF
>               %xC0000-CFFFD /  ; exclude noncharacters %xCFFFE-CFFFF
>               %xD0000-DFFFD /  ; exclude noncharacters %xDFFFE-DFFFF
>               %xE0000-EFFFD /  ; exclude noncharacters %xEFFFE-EFFFF
>               %xF0000-FFFFD /  ; exclude noncharacters %xFFFFE-FFFFF
>               %x100000-10FFFD  ; exclude noncharacters %x10FFFE-10FFFF
> 
> However, this is the intent as this is support for implementations that don't support key-chains (RFC 8177). The "Security Considerations" recommend key chains. We'll add the hexadecimal specification as another reason for preferring key-chains. 

Okay, that's enough to resolve the discuss.

>  
>   
>     (2) Do we need to say anything about how to indicate when there are
>     discontinuities for the various "counter" types?
> 
> I've never heard any mention of counter discontinuities in the context of OSPF control plane counters. 

Oh, I think this is more of a YANG thing than an OSPF thing (and I'm hardly
a YANG expert).  That is, the yang:counter32 and similar types are
constrained to only ever increment ("count events that happened", roughly),
as opposed to a gauge32 that measures the current level of something and
can go up or down, or a generic uint32.  Of course, in the real world
software crashes or restarts, so a YANG consumer might in practice see the
value of a "counter" type go backwards, even though that's forbidden by the
spec.  In some cases (and I don't know exactly when it becomes most
relevant), the YANG model includes a "discontinuity time" (e.g., router
restart time) to indicate when the counters were last reset to zero, in
order to give consumers a sense for how long it took the counter to get
that big.  It's entirely possible that this doesn't make sense for the OSPF
counters, and if you tell me that I'm happy to clear.

Searching for "RFC YANG discontinuity" brings up several representative
results, such as RFC 8343, which says:

           leaf discontinuity-time {
             type yang:date-and-time;
             mandatory true;
             description
               "The time on the most recent occasion at which any one or
                more of this interface's counters suffered a
                discontinuity.  If no such discontinuities have occurred
                since the last re-initialization of the local management
                subsystem, then this node contains the time the local
                management subsystem re-initialized itself.";


>     
>     ----------------------------------------------------------------------
>     COMMENT:
>     ----------------------------------------------------------------------
>     
>     I'm happy to see the discussion around Roman's Discuss.
>     
>     Section 1
>     
>        YANG [RFC6020][RFC7950] is a data definition language used to define
>        the contents of a conceptual data store that allows networked devices
>        to be managed using NETCONF [RFC6241].  YANG is proving relevant
>        beyond its initial confines, as bindings to other interfaces (e.g.,
>        ReST) and encodings other than XML (e.g., JSON) are being defined.
>     
>     This text feels a bit stale at this point.
> 
> Updated in -27.
>     
>     Section 2
>     
>        model varies among router vendors.  Differences are observed in terms
>        of how the protocol instance is tied to the routing domain, how
>        multiple protocol instances are be instantiated among others.
>     
>     nit: the grammar here is a bit odd, with the comma suggesting the start
>     of a list but no "and" present.
> 
> Fixed in -27.
>     
>     Section 2.2
>     
>        The ospf module is intended to match to the vendor specific OSPF
>        configuration construct that is identified by the local identifier
>        'name'.
>     
>     I don't really understand what this is intended to mean.
> 
> I removed this paragraph and augmented the next one.

Thanks; it makes a lot more sense to me now.

>     Section 2.7
>     
>     hello-timer in the module claims to be a rt-types:timer-value-seconds16
>     but shows up in the tree(s) as a uint32.
>     Similarly, the wait-itmer is a rt-types:timer-value-seconds32, which
>     also shows up in the tree(s) as a uint32, which is perhaps more
>     reasonable but perhaps not entirely accurate.
>     Other 'timer' leafs seem to have similar issues.
> 
> Fixed. 
>     
>     Section 3
>     
>          feature ospfv2-authentication-trailer {
>            description
>              "Use OSPFv2 authentication trailer for OSPFv2
>               authentication.";
>     
>     Is the feature for "use" or "support for"?
>     (Similarly for the ospfv3 authentication features.)
> 
> The latter - fixed. 
>     
>          identity ospfv2-lsa-option {
>            description
>              "Baes idenity for OSPFv2 LSA option flags.";
>     
>     nit: "Base"
> 
> Fixed. 
>     
>          identity v2-p-bit {
>            base ospfv2-lsa-option;
>            description
>              "Only used in type-7 LSA. When set, an NSSA
>               border router should translate the type-7 LSA
>               to a type-5 LSA.";
>     
>     There seem to be a few "identity <foo>-bit" stanzas whose description do
>     not mention the named bit specifically (but many that do).  Do we want
>     to be consistent about doing so?  (Likewise for <foo>-flag.)
> 
> Made these consistent. This was added very late when we realized that YANG type bit is not extendable. 

The YANG type bit is not extendable?!  I'll have to remebmer that for the
future...

>          grouping tlv {
>            description
>              "Type-Length-Value (TLV)";
>            leaf type {
>              type uint16;
>              description "TLV type.";
>            }
>            leaf length {
>              type uint16;
>              description "TLV length (octets).";
>            }
>            leaf value {
>              type yang:hex-string;
>              description "TLV value.";
>     
>     Is there a way to apply a constraint so the 'length' matches the
>     hext-string's length?
> 
> Since this is returned operational data, it doesn't make a lot of sense to put constraints on it. It is basically what the router returns. If it is wrong, it wouldn't have been parsed correctly in the first place. 

Ah, good point.

>          grouping router-capabilities-tlv {
>     
>     The various descriptions hereunder could perhaps benefit from section
>     references, as, e.g., two nodes named "informational-capabilities" may
>     otherwise require some effort to distinguish.  Well, aside from the fact
>     that one is currently listed as "capabilitiess" with two esses, which
>     seems unlikely to be intended.
> 
> I fixed the description on these to differential between the list uint32 flags and the identities.

Thanks (BTW please double-check the description for "leaf functional-flag",
that currenty looks like "Individual informational capability flag.")

>          grouping ospf-router-lsa-bits {
>            container rputer-bits {
>     
>     s/rputer/router/?
> 
> Fixed. 
>     
>              container te-opaque {
>                [...]
>                container link-tlv {
>                  description "Describes a singel link, and it is constructed
>                  of a set of Sub-TLVs.";
>     
>     s/singel/single/
> 
> Fixed. 
>     
>          grouping ospfv3-lsa-external {
>            [...]
>            leaf referenced-link-state-id {
>              type yang:dotted-quad;
>     
>     RFC 5340 section 2.2 implies that the Link State ID is going to be a
>     32-bit identifier that need not be represented as dotted-quad, as it
>     does not have addressing semantics.  (dotted-quad seems to be used for
>     Link-State-ID-shaped things elsewhere, too, though the preferred form
>     may be the union of dotted-quad and uint32.)
> 
> Good catch. This should be unit32 for OSPFv3. There were two instances of this. 
>     
>          grouping lsa-common {
>            description
>                "Common fields for OSPF LSA representation.";
>            leaf decode-completed {
>              type boolean;
>              description
>                "The OSPF LSA body was successfully decoded other than
>                 unknown TLVs. Unknown LSAs types and OSPFv2 unknown
>                 opaque LSA types are not decoded. Additionally,
>                 malformed LSAs are generally not accepted and are
>                 not be in the Link State Database.";
>     
>     nit: "are not be" is not grammatical.
> 
> Fixed - "will not be".
>     
>          grouping lsa-key {
>            description
>              "OSPF LSA key.";
>     
>     This could maybe benefit from a more descriptive description; is this a
>     sort or lookup key, for example?
> 
> Yes - I've improved.
>     
>            container database {
>              description "Container for per AS-scope LSA statistics.";
>              list as-scope-lsa-type {
>                [...]
>                leaf lsa-cksum-sum {
>                  type uint32;
>                  description
>                    "The sum of the LSA checksums of the LSA type.";
>     
>     [It's not entirely clear to me why this sum-of-checksums is a useful
>     thing to track, but it may not be this document's role to do so.
>     Though, perhaps we do need to say if the sum is computed as integers
>     modulo 2**32.]
> 
> This is from the OSPF MIB (RFC 4750). It is not used functionally as one cannot guarantee differing LSDBs will not yield the same checksum. However, if the checksums are different, you can assure the databases are different. 

Thanks for the extra text -- it helps confirm my guess as to what's going
on.

>            leaf transmit-delay {
>              type uint16;
>              units seconds;
>              description
>                "Estimated time needed to transmit Link State Update
>                 (LSU) packets on the interface (seconds). LSAs have
>                 their age incremented by this amount on advertised
>                 on the interface. A sample value would be 1 second.";
>     
>     nit: "on advertised on" does not seem grammatical.
> 
> Fixed - "when advertised on".
>     
>            leaf lls {
>            [...]
>            container ttl-security {
>     
>     Should these have a default value?
> 
> I think 1 would be appropriate since only virtual-links and sham-links require more.
>     
>                case ospfv3-auth-ipsec {
>                  when "derived-from-or-self(../../../../../../rt:type, "
>                    +  "'ospfv3')" {
>                    description "Applied to OSPFv3 only.";
>                  }
>                  if-feature ospfv3-authentication-ipsec;
>                  leaf sa {
>                      type string;
>     
>     I don't see RFC 4552 talking about names for SAs; where would this be
>     discussed (and, are they guaranteed to be human-readable)?
> 
> If it is not human readable, how would it be configured? 

I wasn't sure if this was config or operational state, but you make a good
point.

>                leaf poll-interval {
>                  type uint16;
>                  units seconds;
>                  description
>                    "Neighbor poll interval (seconds) for sending OSPF
>                     hello packets to discover the neighbor on NBMA
>                     networks. This interval dictates the granularity for
>                     discovery of new neighbors. A sample would be 2 minutes
>                     for a legacy Packet Data Network (PDN) X.25 network.";
>     
>     Maybe "2 minutes (120 seconds)" since the units are seconds?
> 
> Fixed.
>     
>            container preference {
>              description
>                "Route preference configuration In many
>                 implementations, preference is referred to as
>                 administrative distance.";
>     
>     nit: missing sentence break?
> 
> Fixed.
>     
>     For the spf- and lsa-logs, do we require that the 'id' is assigned in
>     any particular order, or do we just rely on the included timestamp(s)
>     for any time-ordering required by the consumer?
> 
> I added ordering to the description of the spf-log and lsa-log. However, the id is a purely internal value to provide a uniqueness key for the YANG list. 

Understood, and thanks.

>          grouping notification-neighbor {
>            [...]
>            leaf neighbor-ip-addr {
>              type yang:dotted-quad;
>              description "Neighbor address.";
>     
>     neighbors can only be identified by IPv4 addresses?
> 
> Changed to IP address type.
>     
>            leaf packet-source {
>              type yang:dotted-quad;
>     
>     packet sources, too? (multiple times)
>     
> Changed to IP address type. 
> 
>            description
>              "This notification is sent when aa neighbor
>               state change is detected.";
>     
>     nit: s/aa/a/
> 
> Fixed. 
>     
>     Section 4
>     
>        Additionally, local specificationn of OSPF authentication keys and
>        the associated authentication algorithm is supported for legacy
>        implementations that do not support key-chains [RFC8177] for legacy
>        implementations that do not support key-chains.  It is RECOMMENDED
>        that implementations migrate to key-chains due the seamless support
>        of key and algorithm rollover, as well as, the encryption of key
>        using the Advanced Encryption Standard (AES) Key Wrap Padding
>        Algorithm [RFC5649].
>     
>     (Roman caught the nits, so I won't duplicate that.)
>     I expected to see something about keeping the actual key material
>     secret, as well.
> 
> Can you suggest some text?

How's this?

The actual authentication key data (whether locally specified or part of a
key-chain) is sensitive and needs to be kept secret from unauthorized
parties; compromise of the key data would allow an attacker to forge OSPF
traffic that would be accepted as authentic, potentially compromising the
entirey OSPF domain.

Thanks,

Ben