draft-ietf-netmod-factory-default-06.txt   draft-ietf-netmod-factory-default-07.txt 
NETMOD Working Group Q. Wu NETMOD Working Group Q. Wu
Internet-Draft Huawei Internet-Draft Huawei
Intended status: Standards Track B. Lengyel Intended status: Standards Track B. Lengyel
Expires: May 5, 2020 Ericsson Hungary Expires: May 20, 2020 Ericsson Hungary
Y. Niu Y. Niu
Huawei Huawei
November 2, 2019 November 17, 2019
Factory Default Setting Factory Default Setting
draft-ietf-netmod-factory-default-06 draft-ietf-netmod-factory-default-07
Abstract Abstract
This document defines a method to reset a server to its factory- This document defines a method to reset a server to its factory-
default content. The reset operation may be used e.g. during initial default content. The reset operation may be used, e.g., when the
zero-touch configuration or when the existing configuration has major existing configuration has major errors so re-starting the
errors, so re-starting the configuration process from scratch is the configuration process from scratch is the best option.
best option.
A new factory-reset RPC is defined. Several methods of documenting A new factory-reset RPC is defined. When resetting a datastore, all
the factory-default content are specified. previous configuration settings will be lost and replaced by the
factory-default content.
Optionally a new "factory-default" read-only datastore is defined, A new optional "factory-default" read-only datastore is defined, that
that contains the data that will be copied over to the running contains the data that will be copied over to the running datastore
datastore at reset. at reset.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 5, 2020. This Internet-Draft will expire on May 20, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Factory-Reset RPC . . . . . . . . . . . . . . . . . . . . . . 4 2. Factory-Reset RPC . . . . . . . . . . . . . . . . . . . . . . 3
3. Factory-Default Datastore . . . . . . . . . . . . . . . . . . 4 3. Factory-Default Datastore . . . . . . . . . . . . . . . . . . 4
4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 8 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 8
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
9.1. Normative References . . . . . . . . . . . . . . . . . . 8 9.1. Normative References . . . . . . . . . . . . . . . . . . 8
9.2. Informative References . . . . . . . . . . . . . . . . . 9 9.2. Informative References . . . . . . . . . . . . . . . . . 9
Appendix A. Difference between <startup> datastore and <factory- Appendix A. Changes between revisions . . . . . . . . . . . . . 9
default> datastore . . . . . . . . . . . . . . . . . 9
Appendix B. Changes between revisions . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
This document defines a method to reset a server to its factory- This document defines a method to reset a server to its factory-
default content. The reset operation may be used, e.g. during default content. The reset operation may be used, e.g., when the
initial zero-touch configuration [RFC8572] or when the existing existing configuration has major errors so re-starting the
configuration has major errors, so re-starting the configuration configuration process from scratch is the best option.
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 A factory-reset RPC is defined. When resetting a datastore, all
the factory-default content are specified. previous configuration settings will be lost and replaced by the
factory-default content.
Optionally a new "factory-default" read-only datastore is defined, A "factory-default" read-only datastore is defined, that contains the
that contains the data that will be copied over to all read-write data to replace the contents of implemented read-write conventional
configuration datastores at reset. This datastore can also be used configuration datastores at reset. This datastore can also be used
in <get-data> or <get-config> operations. in <get-data> operation.
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 NETCONF defines the <delete-config> RPC operation, but that only acts
that would still not allow it to reset the running configuration. on the <startup-datastore>, whereas the <factory-reset> RPC operation
can perform additional changes to the device to fully reset the
device back to a factory-default state
The YANG data model in this document conforms to the Network The YANG data model in this document conforms to the Network
Management Datastore Architecture defined in [RFC8342]. Management Datastore Architecture defined in [RFC8342].
1.1. Terminology 1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
The following terms are defined in [RFC8342] and are not redefined The following terms are defined in [RFC8342] [RFC7950] and are not
here: redefined here:
o server o server
o startup configuration datastore o startup configuration datastore
o candiate configuration datastore o candidate configuration datastore
o running configuration datastore o running configuration datastore
o intended configuration datastore o intended configuration datastore
o operational state datastore o operational state datastore
o conventional configuration datastore
o RPC operation
The following terms are defined in this document as follows: The following terms are defined in this document as follows:
o factory-default datastore: A read-only datastore holding a o factory-default datastore: A read-only configuration datastore
preconfigured minimal initial configuration that can be used to holding a preconfigured minimal initial configuration that can be
initialize the configuration of a server. The content of the used to initialize the configuration of a server. The content of
datastore is usually static, but MAY depend on external factors the datastore is usually static, but MAY depend on external
like available HW. factors like available HW.
2. Factory-Reset RPC 2. Factory-Reset RPC
A new "factory-reset" RPC is introduced. Upon receiveing the RPC the A new "factory-reset" RPC is introduced. Upon receiving the RPC
server resets the content of all read-write configuration datastores o All supported conventional read-write configuration datastores
(e.g.,<running> and <startup>) to their factory-default content. (i.e. <running>, <startup>, and <candidate>) are all reset to the
Read-only datastores receive their content from other datastores contents of <factory-default>.
(e.g. <intended> gets its content from <running>).
Factory-default content MAY be specified by one of the following
means in descending order of precedence
1. <factory-default> datastore, if it exists; o Read-only datastores receive their content from other
datastores(e.g. <intended> gets its content from <running>).
2. by vendors using a file in YANG Instance Data o All data in any ephemeral datastores MUST be discarded.
[I-D.ietf-netmod-yang-instance-file-format] format or some other
format in vendor's website or other places where similar off-line
documents are kept;
3. In some implementation specific manner; o The contents of the <operational> datastore MUST be reset back to
an appropriate factory-default state.
For the server supporting zero touch bootstrapping mechanisms, the In addition, the "factory-reset" RPC MUST restore storage to factory
factory default configuration causes the bootstrapping process to condition, including remove log files, remove temporary files (from
execute,e.g.,the server resets configuration to device's factory datastore or elsewhere). It MUST also remove security credentials
default configuration,for the version of operating system software it and restoring default security settings including remove
is running. In addition,the "factory-reset" RPC MAY also be used to certificates, keys, zero passwords, etc. The process invoked by the
trigger some other restoring and resetting tasks such as files "factory-reset" RPC SHOULD zero/pattern-write than remove sensitive
cleanup, restarting the node or some of the software processes, files such as the TLS keys, configuration stores, etc. The "factory-
setting some security data/passwords to the default value, removing reset" RPC MAY also be used to trigger some other resetting tasks
logs, or removing any temporary data (from datastore or elsewhere), such as restarting the node or some of the software processes.
etc. When and why these tasks are triggered is not the scope of this
document.
3. Factory-Default Datastore 3. Factory-Default Datastore
Following guidelines for defining Datastores in the appendix A of Following guidelines for defining Datastores in the appendix A of
[RFC8342], this document introduces a new datastore resource named [RFC8342], this document introduces a new optional datastore resource
'factory-default' that represents a preconfigured minimal initial named 'factory-default' that represents a preconfigured minimal
configuration that can be used to initialize the configuration of a initial configuration that can be used to initialize the
server. configuration of a server. A device MAY only implement the <factory-
reset> RPC without implementing the 'factory-default' datastore,
which make it lose the ability to see what configuration the device
would be reset back to.
o Name: "factory-default" o Name: "factory-default"
o YANG modules: all o YANG modules: all
o YANG nodes: all "config true" data nodes o YANG nodes: all "config true" data nodes
o Management operations: The content of the datastore is set by the o Management operations: The content of the datastore is set by the
server in an implementation dependent manner. The content can not server in an implementation dependent manner. The content can not
be changed by management operations via NETCONF, RESTCONF,the CLI be changed by management operations via NETCONF, RESTCONF,the CLI
etc. unless specialized, dedicated operations are provided. The etcunless specialized, dedicated operations are provided. The
contents of the datastore can be read using NETCONF <get-data> and datastore can be read using the standard NETCONF/RESTCONF protocol
<get-config> operations, and the RESTCONF protocol equivalents. operations. The <factory- reset> operation copies the factory
The operation <factory- reset> copies the factory default content default content to <running> and, if present, <startup> and then
to <running> and, if present, <startup> and then the content of the content of these datastores is propagated automatically to any
these datastores is propagated automatically to any other read other read only datastores, e.g., <intended> and <operational>.
only datastores, e.g., <intended> and <operational>.
o Origin: This document does not define a new origin identity as it o Origin: This document does not define a new origin identity as it
does not interact with <operational> datastore. does not interact with <operational> datastore.
o Protocols: RESTCONF, NETCONF and other management protocol. o Protocols: RESTCONF, NETCONF and other management protocol.
o Defining YANG module: "ietf-factory-default". o Defining YANG module: "ietf-factory-default".
The datastore content is usually defined by the device vendor. It is The datastore content is usually defined by the device vendor. It is
usually static, but MAY change e.g., depending on external factors usually static, but MAY change e.g., depending on external factors
like HW available or during device upgrade. like HW available or during device upgrade.
On devices that support non-volatile storage, the contents of The contents of <factory-default> MUST persist across device
<factory > MUST persist across restarts. restarts.
4. YANG Module 4. YANG Module
This module imports typedefs from [RFC8342], and it references This module imports typedefs from [RFC8342], and it references
[RFC6421],[RFC8341]. [RFC6421],[RFC8341].
<CODE BEGINS> file "ietf-factory-default.yang" <CODE BEGINS> file "ietf-factory-default.yang"
module ietf-factory-default { module ietf-factory-default {
yang-version 1.1; yang-version 1.1;
namespace urn:ietf:params:xml:ns:yang:ietf-factory-default; namespace "urn:ietf:params:xml:ns:yang:ietf-factory-default";
prefix fd; prefix fd;
import ietf-netconf { prefix nc ; } import ietf-datastores {
import ietf-datastores { prefix ds; } prefix ds;
import ietf-netconf-acm { prefix nacm;} }
import ietf-netconf-acm {
prefix nacm;
}
organization organization
"IETF NETMOD (Network Modeling) Working Group"; "IETF NETMOD (Network Modeling) Working Group";
contact contact
"WG Web: <https://tools.ietf.org/wg/netconf/> "WG Web: <https://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:netconf@ietf.org>
Editor: Qin Wu Editor: Qin Wu
<mailto:bill.wu@huawei.com> <mailto:bill.wu@huawei.com>
Editor: Balazs Lengyel Editor: Balazs Lengyel
skipping to change at page 6, line 4 skipping to change at page 5, line 47
organization organization
"IETF NETMOD (Network Modeling) Working Group"; "IETF NETMOD (Network Modeling) Working Group";
contact contact
"WG Web: <https://tools.ietf.org/wg/netconf/> "WG Web: <https://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:netconf@ietf.org>
Editor: Qin Wu Editor: Qin Wu
<mailto:bill.wu@huawei.com> <mailto:bill.wu@huawei.com>
Editor: Balazs Lengyel Editor: Balazs Lengyel
<mailto:balazs.lengyel@ericsson.com> <mailto:balazs.lengyel@ericsson.com>
Editor: Ye Niu Editor: Ye Niu
<mailto:niuye@huawei.com>"; <mailto:niuye@huawei.com>";
description description
"This module defines the "This module defines the
- factory-reset RPC - factory-reset RPC
- factory-default datastore - factory-default datastore
- an extension to the NETCONF <get-config> operation to It provides functionality to reset a server to its
allow it to operate on the factory-default datastore. factory-default content.
It provides functionality to reset a server to its
factory-default content.
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 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices."; see the RFC itself for full legal notices.";
revision 2019-05-03 { revision 2019-05-03 {
description description
"Initial revision."; "Initial revision.";
reference "RFC XXXX: Factory default Setting"; reference
"RFC XXXX: Factory default Setting";
} }
feature factory-default-as-datastore { feature factory-default-datastore {
description "Indicates that the factory default configuration is description
also available as a separate datastore"; "Indicates that the factory default configuration is
available as a datastore.";
} }
rpc factory-reset { rpc factory-reset {
nacm:default-deny-all; nacm:default-deny-all;
description "The server resets the content of all read-write description
configuration datastores (e.g.,<running> and <startup>) to "The server resets the content of all read-write
their factory default content."; configuration datastores (i.e.,<running> , <startup><candidate>) to
their factory default content.";
} }
identity factory-default { identity factory-default {
if-feature "factory-default-datastore";
base ds:datastore; base ds:datastore;
if-feature factory-default-as-datastore; description
description "The read-only datastore contains the configuration "This read-only datastore contains the configuration data used to
that will be copied into <running> and, if present, <startup> replace the contents ofthe read-write conventional configuration
."; datastores during a factory-reset RPC operation.";
} }
augment /nc:get-config/nc:input/nc:source/nc:config-source {
if-feature factory-default-as-datastore;
description "Allows the get-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>
<CODE ENDS>
5. IANA Considerations 5. IANA Considerations
This document registers one URI in the IETF XML Registry [RFC3688]. This document registers one URI in the IETF XML Registry [RFC3688].
The following registration has been made: The following registration has been made:
URI: urn:ietf:params:xml:ns:yang:ietf-factory-default URI: urn:ietf:params:xml:ns:yang:ietf-factory-default
Registrant Contact: The IESG. Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace. XML: N/A, the requested URI is an XML namespace.
skipping to change at page 9, line 35 skipping to change at page 9, line 17
[I-D.ietf-netmod-yang-instance-file-format] [I-D.ietf-netmod-yang-instance-file-format]
Lengyel, B. and B. Claise, "YANG Instance Data File Lengyel, B. and B. Claise, "YANG Instance Data File
Format", draft-ietf-netmod-yang-instance-file-format-04 Format", draft-ietf-netmod-yang-instance-file-format-04
(work in progress), August 2019. (work in progress), August 2019.
[RFC8572] Watsen, K., Farrer, I., and M. Abrahamsson, "Secure Zero [RFC8572] Watsen, K., Farrer, I., and M. Abrahamsson, "Secure Zero
Touch Provisioning (SZTP)", RFC 8572, Touch Provisioning (SZTP)", RFC 8572,
DOI 10.17487/RFC8572, April 2019, DOI 10.17487/RFC8572, April 2019,
<https://www.rfc-editor.org/info/rfc8572>. <https://www.rfc-editor.org/info/rfc8572>.
Appendix A. Difference between <startup> datastore and <factory- Appendix A. Changes between revisions
default> datastore
When the device first boots up, the content of the <startup> and Editorial Note (To be removed by RFC Editor)
<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.
Appendix B. Changes between revisions v06 - 07
Editorial Note (To be removed by RFC Editor) o Remove Factory-default content specification;
o Remove reference to YANG instance data file format and zero touch
provision [RFC8573];
o Remove copy-config operation extension on factory-default
datastore
v05 - 06 v05 - 06
o Additional text to enhance security section. o Additional text to enhance security section.
o Add nacm:default-deny-all on "factory-reset" RPC. o Add nacm:default-deny-all on "factory-reset" RPC.
o A few clarification on Factory-default content specification. o A few clarification on Factory-default content specification.
v03 - 04 v03 - 04
 End of changes. 45 change blocks. 
132 lines changed or deleted 113 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/