]>
Constrained YANG Module LibraryTrilliant Networks Inc.610 Rue du LuxembourgGranbyQuebecJ2J 2V2Canada+14503750556michel.veillette@trilliantinc.comApplications and Real-Time Area (art)
Internet Engineering Task ForceYANGThis document describes a constrained version of the YANG library that provides information about the YANG modules, datastores, and datastore schemas used by a constrained network management server (e.g., a CoMI server).There is a need for a standard mechanism to expose which YANG modules, datastores and datastore schemas are in use by a constrained network management server. This document defines the YANG module ‘ietf-constrained-yang-library’ that provides this information.YANG module ‘ietf-constrained-yang-library’ shares the same data model and objectives as ‘ietf-yang-library’, only datatypes and mandatory requirements have been updated to minimize its size to allow its implementation by Constrained Nodes and/or Constrained Networks as defined by . To review the list of objectives and proposed data model, please refer to section 2 and 3.The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to
be interpreted as described in .The following terms are defined in : client, deviation, feature, module, submodule and server.The following term is defined in : YANG Schema Item iDentifier (SID).The following terms are defined in : YANG library and YANG library checksum.The conceptual model of the YANG library is depicted in .| set |--------------->| submodules |
+-----------+ +--------+ +------------+
]]>It’s expected that most constrained network management servers have one datastore (e.g. a unified datastore). However, some servers may have multiples datastore as described by NMDA . The YANG library data model supports both cases.In this model, every datastore has an associated datastore schema, which is the union of module sets, which is a collection of modules. Multiple datastores may refer to the same datastore schema and individual datastore schemas may share module sets.For each module, the YANG library provide:the YANG module identifier (i.e. SID)its revisionits list of submodulesits list of imported modulesits set of features and deviationsYANG module namespace and location are also supported, but their implementation is not recommended for constrained servers.The tree diagram of YANG module ietf-constrained-yang-library is provided below. This graphical representation of a YANG module is defined in . ../../module/identifier
| +--ro import-only-module* [identifier revision]
| +--ro identifier comi:sid
| +--ro revision union
| +--ro namespace inet:uri
| +--ro location* inet:uri
| +--ro submodule* [identifier]
| +--ro identifier comi:sid
| +--ro revision? revision-identifier
| +--ro location* inet:uri
+--ro schema* [index]
| +--ro index uint8
| +--ro module-set* -> ../../module-set/index
+--ro datastore* [identifier]
| +--ro identifier ds:datastore-ref
| +--ro schema -> ../../schema/index
+--ro checksum binary
notifications:
+---n yang-library-update
+--ro checksum -> /yang-library/checksum
]]>The list of changes between the reference data model ‘ietf-yang-library’ and its constrained version ‘ietf-constrained-yang-library’ are listed below:module-set ‘name’ and schema ‘name’ are implemented using an 8 bits unsigned integer and renamed ‘index’.module ‘name’, submodule ‘name’ and datastore ‘name’ are implemented using a SID (i.e. an unsigned integer) and renamed ‘identifier’.‘feature’ and ‘deviation’ are implemented using a SID (i.e. an unsigned integer).‘revision’ fields are implemented using a 4 bytes binary string.the mandatory requirement of the ‘namespace’ fields is removed, and implementation is not recommended. SIDs used by constrained devices and protocols doesn’t require namespaces.the implementation of the ‘location’ fields are not recommended, the use of the module SID as the handle to retrieve the associated YANG module is proposed instead.RFC Ed.: update the date below with the date of RFC publication
and remove this note. file "ietf-constrained-yang-library@2018-01-20.yang"
module ietf-constrained-yang-library {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-constrained-yang-library";
prefix "yanglib";
// RFC Ed.: update CoMI reference.
import ietf-comi {
prefix comi;
reference "I-D.ietf-core-comi";
}
import ietf-inet-types {
prefix inet;
reference "RFC 6991: Common YANG Data Types.";
}
import ietf-datastores {
prefix ds;
reference "RFC 8342: Network Management Datastore Architecture (NMDA).";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
WG Chair: Carsten Bormann
WG Chair: Jaime Jimenez
Editor: Michel Veillette
";
description
"This module provides information about the YANG modules,
datastores, and datastore schemas implemented by a constrained
network management server.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
// RFC Ed.: update reference.
revision 2018-09-21 {
description
"Initial revision.";
reference
"I-D.veillette-core-yang-library";
}
/*
* Typedefs
*/
typedef revision-identifier {
type binary {
length "4";
}
description
"Revision date encoded as a binary string, each nibble representing
a digit of the of revision date. For example, revision 2018-09-21
is encoded as 0x20 0x18 0x09 0x21.";
}
/*
* Groupings
*/
grouping module-identification-leafs {
description
"Parameters for identifying YANG modules and submodules.";
leaf identifier {
type comi:sid;
mandatory true;
description
"SID assigned to this module or submodule.";
}
leaf revision {
type revision-identifier;
description
"The YANG module or submodule revision date. If no revision
statement is present in the YANG module or submodule, this
leaf is not instantiated.";
}
}
grouping location-leaf-list {
description
"Common location leaf list parameter for modules and
submodules.";
leaf-list location {
type inet:uri;
description
"Contains a URL that represents the YANG schema resource
for this module or submodule.
This leaf is present in the model to keep the alignment with
'ietf-yang-library'. Support of this leaf in constrained
devices is not necessarily required, nor expected. It is
recommended that clients used the module or sub-module SID
as the handle used to retrieve the corresponding YANG module";
}
}
grouping implementation-parameters {
description
"Parameters for describing the implementation of a module.";
leaf-list feature {
type comi:sid;
description
"List of all YANG feature names from this module that are
supported by the server, regardless whether they are defined
in the module or any included submodule.";
}
leaf-list deviation {
type leafref {
path "../../module/identifier";
}
description
"List of all YANG deviation modules used by this server to
modify the conformance of the module associated with this
entry. Note that the same module can be used for deviations
for multiple modules, so the same entry MAY appear within
multiple 'module' entries.
This reference MUST NOT (directly or indirectly)
refer to the module being deviated.
Robust clients may want to make sure that they handle a
situation where a module deviates itself (directly or
indirectly) gracefully.";
}
}
grouping module-set-parameters {
description
"A set of parameters that describe a module set.";
leaf index {
type uint8;
description
"An arbitrary number assigned of the module set.";
}
list module {
key "identifier";
description
"An entry in this list represents a module implemented by the
server, as per RFC 7950 section 5.6.5, with a particular set
of supported features and deviations.";
reference
"RFC 7950: The YANG 1.1 Data Modeling Language.";
uses module-identification-leafs;
leaf namespace {
type inet:uri;
description
"The XML namespace identifier for this module.
This leaf is present in the model to keep the alignment
with 'ietf-yang-library'. Support of this leaf in
constrained devices is not required, nor expected.";
}
uses location-leaf-list;
list submodule {
key "identifier";
description
"Each entry represents one submodule within the parent
module.";
uses module-identification-leafs;
uses location-leaf-list;
}
uses implementation-parameters;
}
list import-only-module {
key "identifier revision";
description
"An entry in this list indicates that the server imports
reusable definitions from the specified revision of the
module, but does not implement any protocol accessible
objects from this revision.
Multiple entries for the same module name MAY exist. This
can occur if multiple modules import the same module, but
specify different revision-dates in the import statements.";
leaf identifier {
type comi:sid;
description
"The YANG module name.";
}
leaf revision {
type union {
type revision-identifier;
type string {
length 0;
}
}
description
"The YANG module revision date.";
}
leaf namespace {
type inet:uri;
mandatory true;
description
"The XML namespace identifier for this module.
This leaf is present in the model to keep the alignment
with 'ietf-yang-library'. Support of this leaf in
constrained devices is not required, nor expected.";
}
uses location-leaf-list;
list submodule {
key "identifier";
description
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs;
uses location-leaf-list;
}
}
}
grouping yang-library-parameters {
description
"The YANG library data structure is represented as a grouping
so it can be reused in configuration or another monitoring
data structure.";
list module-set {
key index;
description
"A set of modules that may be used by one or more schemas.
A module set does not have to be referentially complete,
i.e., it may define modules that contain import statements
for other modules not included in the module set.";
uses module-set-parameters;
}
list schema {
key "index";
description
"A datastore schema that may be used by one or more
datastores.
The schema must be valid and referentially complete, i.e.,
it must contain modules to satisfy all used import
statements for all modules specified in the schema.";
leaf index {
type uint8;
description
"An arbitrary reference number assigned to the schema.";
}
leaf-list module-set {
type leafref {
path "../../module-set/index";
}
description
"A set of module-sets that are included in this schema.
If a non import-only module appears in multiple module
sets, then the module revision and the associated features
and deviations must be identical.";
}
}
list datastore {
key "identifier";
description
"A datastore supported by this server.
Each datastore indicates which schema it supports.
The server MUST instantiate one entry in this list per
specific datastore it supports.
Each datstore entry with the same datastore schema SHOULD
reference the same schema.";
leaf identifier {
type ds:datastore-ref;
description
"The identity of the datastore.";
}
leaf schema {
type leafref {
path "../../schema/index";
}
mandatory true;
description
"A reference to the schema supported by this datastore.
All non import-only modules of the schema are implemented
with their associated features and deviations.";
}
}
}
/*
* Top-level container
*/
container yang-library {
config false;
description
"Container holding the entire YANG library of this server.";
uses yang-library-parameters;
leaf checksum {
type binary;
mandatory true;
description
"A server-generated checksum or digest of the contents of the
'yang-library' tree. The server MUST change the value of
this leaf if the information represented by the
'yang-library' tree, except 'yang-library/checksum', has
changed.";
}
}
/*
* Notifications
*/
notification yang-library-update {
description
"Generated when any YANG library information on the
server has changed.";
leaf checksum {
type leafref {
path "/yanglib:yang-library/yanglib:checksum";
}
mandatory true;
description
"Contains the YANG library checksum or digest for the updated
YANG library at the time the notification is generated.";
}
}
}
]]>This document registers one YANG module in the YANG Module Names registry .name: ietf-constrained-yang-librarynamespace: urn:ietf:params:xml:ns:yang:ietf-constrained-yang-libraryprefix: libreference: RFC XXXX// RFC Ed.: replace XXXX with RFC number and remove this noteThis YANG module is designed to be accessed via the CoMI protocol . Some of the readable data nodes in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control read access to these data nodes.Specifically, the ‘module’ list may help an attacker to identify the server capabilities and server implementations with known bugs. Server vulnerabilities may be specific to particular modules, module revisions, module features, or even module deviations. This information is included in each module entry. For example, if a particular operation on a particular data node is known to cause a server to crash or significantly degrade device performance, then the module list information will help an attacker identify server implementations with such a defect, in order to launch a denial of service attack on the device.The YANG module defined by this memo have been derived from an already existing YANG module, ietf-yang-library , we will like to thanks to the authors of this YANG module. A special thank also to Andy Bierman for his initial recommendations for the creation of this YANG module.Key words for use in RFCs to Indicate Requirement LevelsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Terminology for Constrained-Node NetworksThe Internet Protocol Suite is increasingly used on small devices with severe constraints on power, memory, and processing resources, creating constrained-node networks. This document provides a number of basic terms that have been useful in the standardization work for constrained-node networks.The YANG 1.1 Data Modeling LanguageYANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols. This document describes the syntax and semantics of version 1.1 of the YANG language. YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification. There are a small number of backward incompatibilities from YANG version 1. This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).YANG Tree DiagramsThis document captures the current syntax used in YANG module tree diagrams. The purpose of this document is to provide a single location for this definition. This syntax may be updated from time to time based on the evolution of the YANG language.Network Management Datastore Architecture (NMDA)Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model. This document updates RFC 7950.CBOR Encoding of Data Modeled with YANGThis document defines encoding rules for serializing configuration data, state data, RPC input and RPC output, Action input, Action output and notifications defined within YANG modules using the Concise Binary Object Representation (CBOR) [RFC7049].YANG LibraryThis document describes a YANG library that provides information about the YANG modules, datastores, and datastore schemas used by a network management server. Simple caching mechanisms are provided to allow clients to minimize retrieval of this information. This version of the YANG library supports the Network Management Datastore Architecture by listing all datastores supported by a network management server and the schema that is used by each of these datastores. This document obsoletes RFC 7895.CoAP Management InterfaceThis document describes a network management interface for constrained devices and networks, called CoAP Management Interface (CoMI). The Constrained Application Protocol (CoAP) is used to access datastore and data node resources specified in YANG, or SMIv2 converted to YANG. CoMI uses the YANG to CBOR mapping and converts YANG identifier strings to numeric identifiers for payload size reduction. CoMI extends the set of YANG based protocols, NETCONF and RESTCONF, with the capability to manage constrained devices and networks.