NETMOD Working Group | Q. Wu |
Internet-Draft | Huawei |
Intended status: Standards Track | B. Lengyel |
Expires: November 18, 2019 | Ericsson Hungary |
Y. Niu | |
Huawei | |
May 17, 2019 |
Factory Default Setting
draft-ietf-netmod-factory-default-01
This document defines a method to reset a server to its factory-default content. The reset operation may be used e.g. during initial zero-touch configuration or when the existing configuration has major errors, so re-starting the configuration process from scratch is the best option.
A new factory-reset RPC is defined. Several methods of documenting the factory-default content are specified.
Optionally a new "factory-default" read-only datastore is defined, that contains the data that will be copied over to the running datastore at reset.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on November 18, 2019.
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document defines a method to reset a server to its factory-default content. The reset operation may be used e.g. during initial zero-touch configuration or when the existing configuration has major errors, so re-starting the configuration process from scratch is the best option. When resetting a datastore all previous configuration settings will be lost and replaced by the factory-default content.
A new factory-reset RPC is defined. Several methods of documenting the factory-default content are specified.
Optionally a new "factory-default" read-only datastore is defined, that contains the data that will be copied over to all read-write configuration datastores at reset. This datastore can also be used in <get-data> or <copy-config> operations.
NETCONF defines the <delete> operation that allows resetting the <startup> datastore and the <discard-changes> operation that copies the content of the <running> datastore into the <candidate> datastore. However it is not possible to reset the running datastore, to reset the candidate datastore without changing the running datastore or to reset any dynamic datastore.
A RESTCONF server MAY implement the above NETCONF operations, but that would still not allow it to reset the running configuration.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
The following terms are defined in [RFC8342] and are not redefined here:
The following terms are defined in this document as follows:
A new "factory-reset" RPC is introduced. Upon receiveing the RPC the server resets the content of all read-write configuration datastores (e.g.,<running> and <startup>) to its factory-default content. Read-only datastores receive their content from other datastores (e.g. <intended> gets its content from <running>).
Factory-default content SHALL be specified by one of the following means in order of precedence
In addition to set the content of the read-write configuration datastores, the "factory-reset" RPC might also be used to clean up files, restart the node or some of the SW processes, or it might set some security data/passwords to the default value, remove logs, remove any temporary data (from datastore or elsewhere) etc.
This document introduces a new datastore resource named 'Factory-Default' that represents a preconfigured minimal initial configuration that can be used to initialize the configuration of a server.
The datastore content is usually defined by the device vendor. It is usually static, but MAY change e.g., depending on external factors like HW available or during device upgrade.
On devices that support non-volatile storage, the contents of <factory > MUST persist across restarts.
<CODE BEGINS> file "ietf-factory-default.yang" module ietf-factory-default { yang-version 1.1; namespace urn:ietf:params:xml:ns:yang:ietf-factory-default; prefix fd; import ietf-netconf { prefix nc ; } import ietf-datastores { prefix ds; } organization "IETF NETMOD (Network Modeling) Working Group"; contact "WG Web: <https://tools.ietf.org/wg/netconf/> WG List: <mailto:netconf@ietf.org> WG Chair: Lou Berger <mailto:lberger@labn.net> WG Chair: Joel Jaeggli <mailto:joelja@bogus.com> WG Chair: Kent Watsen <mailto:kwatsen@juniper.net> Editor: Balazs Lengyel <mailto:balazs.lengyel@ericsson.com> Editor: Qin Wu <mailto:bill.wu@huawei.com> Editor: Ye Niu <mailto:niuye@huawei.com>"; description "This module defines the - factory-reset RPC - factory-default datastore - an extension to the NETCONF <copy-config> operation to allow it to operate on the factory-default datastore. It provides functionality to reset a server to its factory-default content. 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 (https://trustee.ietf.org/license-info). The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in the module text are to be interpreted as described in RFC 2119 (https://tools.ietf.org/html/rfc2119). This version of this YANG module is part of RFC XXXX (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for full legal notices."; revision 2019-05-03 { description "Initial revision."; reference "RFC XXXX: Factory default Setting"; } feature factory-default-as-datastore { description "Indicates that the factory default configuration is also available as a separate datastore"; } rpc factory-reset { description "The server resets the content of all read-write configuration datastores (e.g.,<running> and <startup>) to its factory default content."; } identity factory-default { base ds:datastore; if-feature factory-default-as-datastore; description "The read-only datastore contains the configuration that will be copied into e.g., the running datastore by the factory-reset operation if the target is the running datastore."; } augment /nc:copy-config/nc:input/nc:source/nc:config-source { if-feature factory-default-as-datastore; description "Allows the copy-config operation to use the factory-default datastore as a source"; leaf factory-default { type empty ; description "The factory-default datastore is the source."; } } } <CODE ENDS>
This document registers one URI in the IETF XML Registry [RFC3688]. The following registration has been made:
This document registers one YANG module in the YANG Module Names Registry [RFC6020]. The following registration has been made:
The <factory-reset> RPC can overwrite important and security sensitive information in one of the other datastores e.g. running, therefore it is important to restrict access to this RPC using the standard access control methods.
The content of the factory-default datastore is usually not security sensitive as it is the same on any device of a certain type.
Thanks to Juergen Schoenwaelder, Ladislav Lhotka, Alex Campbell,Joe Clark,Robert Wilton, Kent Watsen, Joel Jaeggli,Andy Berman,Susan Hares to review this draft and provide important input to this document.
Rohit R Ranade Huawei Email: rohitrranade@huawei.com
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC7950] | Bjorklund, M., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016. |
[RFC8174] | Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017. |
[RFC8341] | Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, March 2018. |
[RFC8342] | Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K. and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018. |
[I-D.ietf-netconf-zerotouch] | Watsen, K., Abrahamsson, M. and I. Farrer, "Secure Zero Touch Provisioning (SZTP)", Internet-Draft draft-ietf-netconf-zerotouch-29, January 2019. |
[I-D.ietf-netmod-yang-instance-file-format] | Lengyel, B. and B. Claise, "YANG Instance Data File Format", Internet-Draft draft-ietf-netmod-yang-instance-file-format-02, February 2019. |
When the device first boots up, the content of the <startup> and <factory-default> will be identical. The content of <startup> can be subsequently changed by using <startup> as a target in a <copy-config> operation. The <factory-default> is a read-only datastore and it is usually static as described in earlier sections.
v00 - v01
v03 - v00
v02 - v03
v01 - v02
v03 - v00 - v01
v02 - v03
v01 - v02
v00 - v01