draft-ietf-netmod-factory-default-09.txt   draft-ietf-netmod-factory-default-10.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: June 8, 2020 Ericsson Hungary Expires: August 12, 2020 Ericsson Hungary
Y. Niu Y. Niu
Huawei Huawei
December 6, 2019 February 9, 2020
Factory Default Setting Factory Default Setting
draft-ietf-netmod-factory-default-09 draft-ietf-netmod-factory-default-10
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., when the default content. The reset operation may be used, e.g., when the
existing configuration has major errors so re-starting the existing configuration has major errors so re-starting the
configuration process from scratch is the best option. configuration process from scratch is the best option.
A new factory-reset RPC is defined. When resetting a datastore, all A new factory-reset RPC is defined. When resetting a device, all
previous configuration settings will be lost and replaced by the previous configuration settings will be lost and replaced by the
factory-default content. factory-default content.
A new optional "factory-default" read-only datastore is defined, that A new optional "factory-default" read-only datastore is defined, that
contains the data that will be copied over to the running datastore contains the factory default configuration for the device.
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 June 8, 2020. This Internet-Draft will expire on August 12, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 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
skipping to change at page 2, line 29 skipping to change at page 2, line 24
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Factory-Reset RPC . . . . . . . . . . . . . . . . . . . . . . 3 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 . . . . . . . . . . . . . . . . . . . 7 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7
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 . . . . . . . . . . . . . . . . . 8
Appendix A. Changes between revisions . . . . . . . . . . . . . 9 Appendix A. Changes between revisions . . . . . . . . . . . . . 8
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., when the default content. The reset operation may be used, e.g., when the
existing configuration has major errors so re-starting the existing configuration has major errors so re-starting the
configuration process from scratch is the best option. configuration process from scratch is the best option.
A factory-reset RPC is defined. When resetting a datastore, all A factory-reset RPC is defined. When resetting a device, all
previous configuration settings will be lost and replaced by the previous configuration settings will be lost and replaced by the
factory-default content. factory-default content.
A "factory-default" read-only datastore is defined, that contains the A "factory-default" read-only datastore is defined, that contains the
data to replace the contents of implemented read-write conventional 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> operation. in the <get-data> operation.
NETCONF defines the <delete-config> RPC operation, but that only acts
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
skipping to change at page 3, line 42 skipping to change at page 3, line 34
o intended configuration datastore o intended configuration datastore
o operational state datastore o operational state datastore
o conventional configuration datastore o conventional configuration datastore
o RPC operation 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: a preconfigured initial configuration that is
used to initialize the configuration of a server.
o factory-default datastore: A read-only configuration datastore o factory-default datastore: A read-only configuration datastore
holding a preconfigured minimal initial configuration that can be holding a preconfigured initial configuration that is used to
used to initialize the configuration of a server. The content of initialize the configuration of a server.
the datastore is usually static, but MAY depend on external
factors like available HW.
2. Factory-Reset RPC 2. Factory-Reset RPC
A new "factory-reset" RPC is introduced. Upon receiving the RPC A new "factory-reset" RPC is introduced. Upon receiving the RPC
o All supported conventional read-write configuration datastores o All supported conventional read-write configuration datastores
(i.e. <running>, <startup>, and <candidate>) are all reset to the (i.e. <running>, <startup>, and <candidate>) are all reset to the
contents of <factory-default>. contents of <factory-default>.
o Read-only datastores receive their content from other o Read-only datastores receive their content from other
datastores(e.g. <intended> gets its content from <running>). datastores(e.g. <intended> gets its content from <running>).
o All data in any ephemeral datastores MUST be discarded. o All data in any ephemeral datastores MUST be discarded.
o The contents of the <operational> datastore MUST be reset back to o The contents of the <operational> datastore MUST reflect the
an appropriate factory-default state. operational state of the device after applying the factory default
configuration.
In addition, the "factory-reset" RPC MUST restore storage to factory In addition, the "factory-reset" RPC MUST restore non-volatile
condition, including remove log files, remove temporary files (from storage to factory condition. Depending on the system, this may
datastore or elsewhere). It MUST also remove security credentials entail deleting dynamically generated files, such as those containing
and restoring default security settings including remove keys (e.g., /etc/ssl/private), certificates (e.g., /etc/ssl), and
certificates, keys, zero passwords, etc. The process invoked by the logs (e.g., /var/log), temporary files (e.g., /tmp/*). All security
"factory-reset" RPC SHOULD zero/pattern-write than remove sensitive sensitive data (i.e., private keys, passwords, etc.) SHOULD be
files such as the TLS keys, configuration stores, etc. The "factory- overwritten with zeros or a pattern before deletion. The "factory-
reset" RPC MAY also be used to trigger some other resetting tasks reset" RPC MAY also be used to trigger some other resetting tasks
such as restarting the node or some of the software processes. such as restarting the node or some of the software processes.
Note that operators should be aware that since all read-write Note that operators should be aware that since all read-write
datastores are immediately reset to factory default, the device may datastores are immediately reset to factory-default, the device may
become unreachable on the network. It is important to understand how become unreachable on the network. It is important to understand how
a given vendor's device will behave after the RPC is executed. a given vendor's device will behave after the RPC is executed.
Implementors SHOULD reboot the device or otherwise restart processes Implementors SHOULD reboot the device or otherwise restart processes
needed to bootstrap it. needed to bootstrap it.
3. Factory-Default Datastore 3. Factory-Default Datastore
Following guidelines for defining Datastores in the appendix A of Following the guidelines for defining Datastores in the appendix A of
[RFC8342], this document introduces a new optional datastore resource [RFC8342], this document introduces a new optional datastore resource
named 'factory-default' that represents a preconfigured minimal named "factory-default" that represents a preconfigured minimal
initial configuration that can be used to initialize the initial configuration that can be used to initialize the
configuration of a server. A device MAY only implement the <factory- configuration of a server. A device MAY implement the <factory-
reset> RPC without implementing the 'factory-default' datastore, reset> RPC without implementing the "factory-default" datastore,
which make it lose the ability to see what configuration the device which would only eliminate the ability to programmatically determine
would be reset back to. the factory-default configuration.
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
etcunless specialized, dedicated operations are provided. The etc. unless specialized, dedicated operations are provided. The
datastore can be read using the standard NETCONF/RESTCONF protocol datastore can be read using the standard NETCONF/RESTCONF protocol
operations. The <factory- reset> operation copies the factory operations. The <factory-reset> operation copies the factory
default content to <running> and, if present, <startup> and then default content to <running> and, if present, <startup>
the content of these datastores is propagated automatically to any <candidate> and then the content of these datastores is propagated
other read only datastores, e.g., <intended> and <operational>. automatically to any other read 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 contents of <factory-default> is defined by the device vendor and
usually static, but MAY change e.g., depending on external factors MUST persist across device restarts.
like HW available or during device upgrade.
The contents of <factory-default> MUST persist across device
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@2019-11-27.yang" <CODE BEGINS> file "ietf-factory-default@2019-11-27.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-datastores {
prefix ds;
}
import ietf-netconf-acm {
prefix nacm;
}
organization import ietf-datastores {
"IETF NETMOD (Network Modeling) Working Group"; prefix ds;
contact reference
"WG Web: <https://tools.ietf.org/wg/netconf/> "RFC 8342: Network Management Datastore Architecture (NMDA)";
WG List: <mailto:netconf@ietf.org> }
import ietf-netconf-acm {
prefix nacm;
reference
"RFC8341: Network Configuration Access Control Model";
}
Editor: Qin Wu organization
<mailto:bill.wu@huawei.com> "IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web: <https://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Editor: Balazs Lengyel Editor: Qin Wu
<mailto:balazs.lengyel@ericsson.com> <mailto:bill.wu@huawei.com>
Editor: Ye Niu Editor: Balazs Lengyel
<mailto:niuye@huawei.com>"; <mailto:balazs.lengyel@ericsson.com>
description Editor: Ye Niu
"This module defines the <mailto:niuye@huawei.com>";
- factory-reset RPC description
- factory-default datastore "This module defines an RPC called 'factory-reset', a
datastore identity called 'factory-default-datastore'.
It provides functionality to reset a server to its It provides functionality to reset a server to its
factory-default content. factory-default content.
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-11-27 { revision 2019-11-27 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: Factory default Setting"; "RFC XXXX: Factory default Setting";
} }
feature factory-default-datastore { feature factory-default-datastore {
description description
"Indicates that the factory default configuration is "Indicates that the factory-default configuration is
available as a datastore."; available as a datastore.";
} }
rpc factory-reset { rpc factory-reset {
nacm:default-deny-all; nacm:default-deny-all;
description description
"The server resets the content of all read-write "The server resets the content of all read-write
configuration datastores (i.e.,<running> , <startup>,and configuration datastores (i.e.,<running> , <startup> ,
<candidate>) to their factory default content."; and <candidate>) to their factory-default content.";
} }
identity factory-default { identity factory-default {
if-feature "factory-default-datastore"; if-feature "factory-default-datastore";
base ds:datastore; base ds:datastore;
description description
"This read-only datastore contains the configuration data used to "This read-only datastore contains the factory-default
replace the contents ofthe read-write conventional configuration configuration for the device used to replace the contents
datastores during a factory-reset RPC operation."; of the read-write conventional configuration datastores
during a factory-reset RPC operation.";
}
} }
} <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.
This document registers one YANG module in the YANG Module Names This document registers one YANG module in the YANG Module Names
Registry [RFC6020]. The following registration has been made: Registry [RFC6020]. The following registration has been made:
name: ietf-factory-default name: ietf-factory-default
namespace: urn:ietf:params:xml:ns:yang:ietf-factory-default
namespace: urn:ietf:params:xml:ns:yang:ietf-factory-default prefix: fd
RFC: xxxx
prefix: fd
RFC: xxxx
6. Security Considerations 6. Security Considerations
The YANG module defined in this document extends the base operations The YANG module defined in this document extends the base operations
for NETCONF [RFC6241] and RESTCONF [RFC8040]. The lowest NETCONF for NETCONF [RFC6241] and RESTCONF [RFC8040]. The lowest NETCONF
layer is the secure transport layer, and the mandatory-to-implement layer is the secure transport layer, and the mandatory-to-implement
secure transport is Secure Shell (SSH) [RFC6242]. The lowest secure transport is Secure Shell (SSH) [RFC6242]. The lowest
RESTCONF layer is HTTPS, and the mandatory-to-implement secure RESTCONF layer is HTTPS, and the mandatory-to-implement secure
transport is TLS [RFC8446]. transport is TLS [RFC8446].
The <factory-reset> RPC operation may be considered sensitive in some Access to the <factory-reset> RPC operation is considered sensitive
network enviroments,e.g., remote access to reset the device or in and therefore has been restricted using the "default- deny-all"
overwrite security sensitive information in one of the other access control defined in . [RFC8341]
datastores, e.g. running, therefore it is important to restrict
access to this RPC using the standard access control methods.
[RFC8341]
The 'factory-reset' RPC can prevent any further management of the The "factory-reset" RPC can prevent any further management of the
device if the session and client config is included in the factory- device if the session and client config is included in the factory-
reset contents. reset contents.
The operational disruption caused by setting the config to factory- The operational disruption caused by setting the config to factory-
reset contents varies greatly depending on the implementation and reset contents varies greatly depending on the implementation and
current config. current config.
7. Acknowledgements 7. Acknowledgements
Thanks to Juergen Schoenwaelder, Ladislav Lhotka, Alex Campbell, Joe Thanks to Juergen Schoenwaelder, Ladislav Lhotka, Alex Campbell, Joe
skipping to change at page 9, line 21 skipping to change at page 8, line 49
[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-06 Format", draft-ietf-netmod-yang-instance-file-format-06
(work in progress), December 2019. (work in progress), December 2019.
Appendix A. Changes between revisions Appendix A. Changes between revisions
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
v09 - 10
o Incorporate Shepherd review's comments.
v08 - 09 v08 - 09
o Provide some guideline for operators and implementor who implement o Provide some guideline for operators and implementor who implement
factory defaut method. factory defaut method.
v07 - 08 v07 - 08
o Provide clarification and recommendation on the relationship o Provide clarification and recommendation on the relationship
between factory-reset RPC and reboot. between factory-reset RPC and reboot.
 End of changes. 41 change blocks. 
136 lines changed or deleted 128 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/