- Home
- RFC 10099
RFC 10099: YANG Metadata Annotation for the Immutable Flag
- Q. Ma, Ed.,
- Q. Wu,
- B. Lengyel, Ed.,
- H. Li
3 subscribed
Added to 4 Sets
Abstract
This document defines a mechanism to formally document an existing behavior,
implemented by servers of YANG-driven network management protocols (e.g., the Network Configuration Protocol (NETCONF) and RESTCONF), on the immutability of some
system-
Clients may use "immutable" annotations provided by the server to know beforehand why certain otherwise valid configuration requests will cause the server to return an error.¶
The immutable flag is descriptive, documenting an existing behavior, not prescriptive, dictating server behaviors.¶
This document updates RFCs 8040 and 8526.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2026 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://
1. Introduction Skip to TOC
This document defines a YANG metadata annotation [RFC7952] to formally document an existing model handling behavior that has been used by multiple standards organizations (e.g., 3GPP TS 32.156 [TS32.156], 3GPP TS 28.623 [TS28.623], and ONF TR-531 [TR-531]) and vendors.¶
YANG [RFC7950] is a data modeling language used to model both state and configuration data, based on the "config" statement. However, there exists some system configuration data that cannot be modified by clients (that is, it is immutable) but that still needs to be declared as "config true" to:¶
-
allow configuration of data nodes under immutable lists or containers;¶
-
place "when", "must", and "leafref" constraints between configuration and immutable nodes;¶
-
ensure the existence of specific list entries that are provided and needed by the system, while additional list entries can be created, modified, or deleted.¶
If a server always rejects a client's attempt to override some
system-
This document defines an approach to formally document an existing behavior,
implemented by servers in production, on the immutability of some
system-
A nonexhaustive list of already implemented and potential use cases is provided below:¶
-
UC1: Modeling of server capabilities (Appendix A.1)¶
-
UC2: Hardware-based autoconfiguration (Appendix A.2)¶
-
UC3: Predefined administrator roles (Appendix A.3)¶
-
UC4: Declaring immutable system configuration from the perspective of a Logical Network Element (LNE) (Appendix A.4)¶
1.1. Updates to RFC 8040 Skip to TOC
This document updates Sections 4.8 and 9.1.1 of [RFC8040] to add an
additional query parameter named "with-
1.2. Updates to RFC 8526 Skip to TOC
This document updates Section 3.1.1 of [RFC8526] to add an additional input parameter
named "with-
2. Conventions and Definitions Skip to TOC
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.¶
This document uses the following term defined in [RFC6241]:¶
-
configuration data¶
This document uses the following terms defined in [RFC7950]:¶
This document uses the following term defined in [RFC8341]:¶
-
access operation¶
This document uses the following terms defined in [RFC8342]:¶
This document uses the following term defined in [RFC10016]:¶
-
system configuration¶
This document defines the following term:¶
- immutable flag:
-
A read-only server-
provided metadata value that describes the immutability of the configuration, which is conveyed via a YANG metadata annotation called "immutable" with a boolean value.¶
3. Applicability Skip to TOC
While the immutable flag applies to all configuration nodes, its value MUST NOT be set to "true" for configuration data that is not system configuration.¶
The immutable flag is only visible in read-only datastores (i.e., <system>
[RFC10016], <intended>, and <operational>)
when a "with-
Configuration data has the same immutability if it appears in different datastores. The immutability of configuration data is protocol and user independent.¶
4. "Immutable" Metadata Annotation Skip to TOC
4.1. Definition Skip to TOC
The immutable flag, which is defined as the metadata annotation, takes a boolean
value, and it is returned as requested by the client using a "with-
A node annotated as immutable indicates that the server does not allow it to be changed by configuring a different value in read-write configuration datastores (e.g., <running>), or deleted from the intended datastore, which is the merged result of <running> and <system> as defined in Section 4 of [RFC10016]. The node MAY be explicitly configured by a client in <running> with the same value, and that configuration in <running> may subsequently be removed. However, neither of these edits will change the configuration in <intended> (if implemented) on the device.¶
Note that "immutable" metadata annotations are used to annotate data node instances. A list may have multiple instances in the data tree; servers may annotate some of the instances as immutable and others as mutable.¶
Servers MUST ignore any "immutable" annotations sent from the client.¶
4.2. "with-immutability" Parameter
Skip to TOC
This section specifies the Network Configuration Protocol (NETCONF) [RFC6241] [RFC8526] and RESTCONF [RFC8040]
protocol extensions to support the "with-
4.2.1. NETCONF Extensions to Support "with-immutability"
Skip to TOC
This document updates [RFC8526] to augment the <get-data>
operation with an additional parameter named "with-
Figure 1 provides the tree structure [RFC8340] of augmentations to NETCONF
operations, as defined in the "ietf-
module: ietf-immutable-annotation
augment /ncds:get-data/ncds:input:
+---w with-immutability? empty
To discover if the "with-
Refer to Appendix B.1 for an example of a NETCONF operation with the "with-
4.2.2. RESTCONF Extensions to Support
"with-immutability"
Skip to TOC
This document extends Sections 4.8 and 9.1.1 of [RFC8040] to add a query
parameter named "with-
To enable a RESTCONF client to discover if the "with-
urn:ietf:params:restconf:capability:with-immutability:1.0
If the "with-
Refer to Appendix B.2 for an example of a RESTCONF operation with the "with-
5. Use of the Immutable Flag for Different Statements Skip to TOC
This section defines what the immutable flag means to the client for each instance of YANG data node statements.¶
5.1. The "leaf" Statement Skip to TOC
When a leaf node instance is immutable, it cannot be configured with a different value in read-write configuration datastores (e.g., <running>) or removed from <intended> (if implemented), though it can be created/deleted in read-write configuration datastores (see Sections 4.1 and 7).¶
5.2. The "leaf-list" Statement Skip to TOC
When a leaf-list entry is immutable, it cannot be removed from <intended> (if implemented), though it can be created/deleted in read-write configuration datastores (see Sections 4.1 and 7).¶
The "immutable" annotation attached to an individual leaf-list entry provides immutability with respect to the entry itself. As per the restrictions in [RFC7952], annotations cannot be attached to an entire leaf-list instance: only to individual leaf-list entries, which implies a leaf-list as a whole can only inherit immutability from a parent node (e.g., container).¶
If a leaf-list as a whole is immutable via inheritance from a parent node, any leaf-list entries cannot be added, modified, removed, or reordered (if it is ordered-by user).¶
Refer to Appendix B.5 for an example of immutability of leaf-lists.¶
5.3. The "container" Statement Skip to TOC
When a container node instance is immutable, it cannot be removed from <intended> (if implemented), though it can be created/deleted in read-write configuration datastores (see Sections 4.1 and 7).¶
Descendant nodes of a container recursively inherit the immutability of the container, unless the immutability is overridden by an "immutable" annotation on a descendant node (Section 6).¶
5.4. The "list" Statement Skip to TOC
When a list entry is immutable, it cannot be removed from <intended> (if implemented), though it can be created/deleted in read-write configuration datastores (see Sections 4.1 and 7).¶
Descendant nodes of a list entry recursively inherit the immutability of the list entry, unless the immutability is overridden by an "immutable" annotation on a descendant node (Section 6).¶
The "immutable" annotation attached to an individual list entry provides immutability with respect to the entry itself. As per the restrictions in [RFC7952], annotations cannot be attached to an entire list instance: only to individual list entries, which implies a list as a whole can only inherit immutability from a parent node (e.g., container).¶
If a list as a whole is immutable via inheritance from a parent node, any list entries cannot be added, removed, or reordered (if it is ordered-by user). Each list entry inherits the immutability of the list by default, unless the immutability is overridden by an "immutable" annotation on a list entry.¶
Refer to Appendix B.4 for an example of immutability of lists.¶
5.5. The "anydata" Statement Skip to TOC
When an "anydata" node instance is immutable, it cannot be removed from <intended> (if implemented), though it can be created/deleted in read-write configuration datastores (see Sections 4.1 and 7).¶
Additionally, as with all interior nodes, immutability is recursively applied to descendants (Section 6).¶
5.6. The "anyxml" Statement Skip to TOC
When an "anyxml" node instance is immutable, it cannot be removed from <intended> (if implemented), though it can be created/deleted in read-write configuration datastores (see Sections 4.1 and 7).¶
Additionally, as with all interior nodes, immutability is recursively applied to descendants (Section 6).¶
6. Immutability of Interior Nodes Skip to TOC
Immutability is a property of a configuration data node instance, conveyed as metadata [RFC7952]. It is recursively applied to descendants, which may reset the immutability state as needed, thereby affecting their descendants. There is no limit to the number of times the immutability state may change in a data tree.¶
If the "immutable" metadata annotation for a returned child node is omitted, it has the same immutability as its parent node. For each top-level returned node, the default "immutable" annotation value is "false" unless explicitly annotated. Servers may suppress the annotation if it is inherited from its parent node or uses the default value as the top-level node, but they are not precluded from returning the annotation on every single element.¶
Refer to Appendix B.3 for an example of how immutability is recursively inherited or explicitly reset by descendants.¶
7. System Configuration Datastore Interactions Skip to TOC
Immutable configuration can only be created, updated, and deleted by the server; it is present in <system>, if implemented. That said, the existence of
immutable configuration is independent of whether or not <system> is implemented. For example, a server that does not support <system> may have predefined hardware-
As specified in Section 4.1, a client MAY create/delete immutable nodes with the same values as defined by the server in read-write configuration datastores (e.g., <candidate>, <running>), which merely makes immutable nodes visible/invisible in the datastore.¶
8. NACM Interactions Skip to TOC
The server rejects an operation request due to immutability when it
tries to perform the operation on the request data. Any immutability checking
MUST be performed after
access control decisions, if the Network Configuration Access
Control Model (NACM) [RFC8341] is implemented on a server. For
example, if an operation requests to override an immutable
configuration node, but the server determines that the user is not authorized
to perform the requested access operation on the request data, the
request is rejected with an "access-
9. "ietf-immutable-annotation" YANG Module
Skip to TOC
This module imports definitions from [RFC7952], [RFC8342], [RFC8526], and [RFC10016].¶
<CODE BEGINS> file "ietf-immutable-annotation@2026-12-03.yang"
module ietf-immutable-annotation {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-immutable-annotation";
prefix imma;
import ietf-yang-metadata {
prefix md;
reference
"RFC 7952: Defining and Using Metadata with YANG";
}
import ietf-netconf-nmda {
prefix ncds;
reference
"RFC 8526: NETCONF Extensions to Support the Network
Management Datastore Architecture";
}
import ietf-system-datastore {
prefix sysds;
reference
"RFC 10016: System-Defined Configuration";
}
import ietf-datastores {
prefix ds;
reference
"RFC 8342: Network Management Datastore Architecture
(NMDA)";
}
organization
"IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web: https://datatracker.ietf.org/wg/netmod/
WG List: NETMOD <mailto:netmod@ietf.org>
Editor: Qiufang Ma
<mailto:maqiufang1@huawei.com>
Editor: Qin Wu
<mailto:bill.wu@huawei.com>
Editor: Balázs Lengyel
<mailto:balazs.lengyel@ericsson.com>
Editor: Hongwei Li
<mailto:flycoolman@gmail.com>";
description
"This module defines a metadata annotation called 'immutable'
to allow the server to formally document existing behavior on
the mutability of some system configuration. Clients may use
the 'immutable' metadata annotation provided by the server to
know beforehand why certain otherwise valid configuration
requests will cause the server to return an error.
Copyright (c) 2026 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 Revised
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).
All revisions of IETF and IANA published modules can be found
at the YANG Parameters registry group
(https://www.iana.org/assignments/yang-parameters).
This version of this YANG module is part of RFC 10099; see
the RFC itself for full legal notices.";
revision 2026-12-03 {
description
"Initial revision.";
reference
"RFC 10099: YANG Metadata Annotation for the Immutable Flag";
}
md:annotation immutable {
type boolean;
description
"The 'immutable' metadata annotation indicates the
immutability of an instantiated data node. It takes as a
value 'true' or 'false'. An immutable node cannot be
changed via configuring a different value in read-write
configuration datastores (e.g., <running>), though it can be
created/deleted in read-write configuration datastores. If
not specified for a given configuration data node, the
immutability is the same as the value of its parent node in
the data tree. The default value of the 'immutable'
annotation for a top-level instance node is 'false' if not
specified.";
}
augment "/ncds:get-data/ncds:input" {
description
"Allows the server to include 'immutable' metadata
annotations in its response to the get-data operation.";
leaf with-immutability {
when
"derived-from-or-self(../ncds:datastore,'sysds:system') or "
+ "derived-from-or-self(../ncds:datastore,'ds:intended') or "
+ "derived-from-or-self(../ncds:datastore,'ds:operational')";
type empty;
description
"Requests that 'immutable' metadata annotations be returned.
This parameter is only valid when the datastore is system,
intended, or operational. See Section 3 of RFC 10099 for
the required error behavior when used with other
datastores.";
}
}
}
<CODE ENDS>10. IANA Considerations Skip to TOC
10.1. The IETF XML Registry Skip to TOC
IANA has registered the following URI in the "ns" registry within the "IETF XML Registry" group [RFC3688]:¶
10.2. The YANG Module Names Registry Skip to TOC
IANA has registered the following YANG module in the "YANG Module Names" registry [RFC6020] within the "YANG Parameters" registry group.¶
10.3. The RESTCONF Capability URNs Registry Skip to TOC
IANA has registered the following capability identifier URN in the "RESTCONF Capability URNs" registry defined in [RFC8040]:¶
11. Operational Considerations Skip to TOC
This document specifies a mechanism for clients to discover immutable system configuration before attempting modifications. Clients can leverage this information to avoid sending edit requests that would otherwise fail due to immutable nodes.¶
The mechanism defined in this document is backward compatible with existing implementations. A legacy client unaware of this mechanism will not include the "with-
12. Security Considerations Skip to TOC
This section is modeled after the template described in Section 3.7.1 of [RFC9907].¶
The "ietf-
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.¶
The YANG module specified in this document defines a metadata annotation; it also extends the RPC operations of the NETCONF protocol in [RFC6241] and [RFC8526].¶
The "immutable" metadata annotation exposes the immutability of configuration data, which may provide hints for attackers to find vulnerabilities in the network, e.g., to leverage the immutability of some configuration to better craft an attack. Since "immutable" annotations are attached to the instances of configuration data nodes, they are only accessible to clients that have the permissions to read the annotated configuration nodes.¶
The security considerations for the NETCONF protocol operations (see Section 9 of [RFC6241] and Section 6 of [RFC8526]) also apply to the operations extended in this document.¶
13. References Skip to TOC
13.1. Normative References Skip to TOC
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487
/RFC2119 , , <https://www >..rfc- editor .org /info /rfc2119 - [RFC3688]
-
Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487
/RFC3688 , , <https://www >..rfc- editor .org /info /rfc3688 - [RFC6020]
-
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487
/RFC6020 , , <https://www >..rfc- editor .org /info /rfc6020 - [RFC6241]
-
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487
/RFC6241 , , <https://www >..rfc- editor .org /info /rfc6241 - [RFC7950]
-
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487
/RFC7950 , , <https://www >..rfc- editor .org /info /rfc7950 - [RFC7952]
-
Lhotka, L., "Defining and Using Metadata with YANG", RFC 7952, DOI 10.17487
/RFC7952 , , <https://www >..rfc- editor .org /info /rfc7952 - [RFC8040]
-
Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487
/RFC8040 , , <https://www >..rfc- editor .org /info /rfc8040 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487
/RFC8174 , , <https://www >..rfc- editor .org /info /rfc8174 - [RFC8341]
-
Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487
/RFC8341 , , <https://www >..rfc- editor .org /info /rfc8341 - [RFC8342]
-
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487
/RFC8342 , , <https://www >..rfc- editor .org /info /rfc8342 - [RFC8526]
-
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "NETCONF Extensions to Support the Network Management Datastore Architecture", RFC 8526, DOI 10.17487
/RFC8526 , , <https://www >..rfc- editor .org /info /rfc8526 - [RFC8527]
-
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "RESTCONF Extensions to Support the Network Management Datastore Architecture", RFC 8527, DOI 10.17487
/RFC8527 , , <https://www >..rfc- editor .org /info /rfc8527 - [RFC10016]
-
Ma, Q., Ed., Wu, Q., and C. Feng, "System-
Defined Configuration" , RFC 10016, DOI 10.17487/RFC10016 , , <https://www >..rfc- editor .org /info /rfc10016
13.2. Informative References Skip to TOC
- [RFC4252]
-
Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) Authentication Protocol", RFC 4252, DOI 10.17487
/RFC4252 , , <https://www >..rfc- editor .org /info /rfc4252 - [RFC4253]
-
Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) Transport Layer Protocol", RFC 4253, DOI 10.17487
/RFC4253 , , <https://www >..rfc- editor .org /info /rfc4253 - [RFC7317]
-
Bierman, A. and M. Bjorklund, "A YANG Data Model for System Management", RFC 7317, DOI 10.17487
/RFC7317 , , <https://www >..rfc- editor .org /info /rfc7317 - [RFC8340]
-
Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487
/RFC8340 , , <https://www >..rfc- editor .org /info /rfc8340 - [RFC8343]
-
Bjorklund, M., "A YANG Data Model for Interface Management", RFC 8343, DOI 10.17487
/RFC8343 , , <https://www >..rfc- editor .org /info /rfc8343 - [RFC8530]
-
Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. Liu, "YANG Model for Logical Network Elements", RFC 8530, DOI 10.17487
/RFC8530 , , <https://www >..rfc- editor .org /info /rfc8530 - [RFC8792]
-
Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, "Handling Long Lines in Content of Internet-
Drafts and RFCs" , RFC 8792, DOI 10.17487/RFC8792 , , <https://www >..rfc- editor .org /info /rfc8792 - [RFC9000]
-
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10.17487
/RFC9000 , , <https://www >..rfc- editor .org /info /rfc9000 - [RFC9846]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 9846, DOI 10.17487
/RFC9846 , , <https://www >..rfc- editor .org /info /rfc9846 - [RFC9907]
-
Bierman, A., Boucadair, M., Ed., and Q. Wu, "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 9907, DOI 10.17487
/RFC9907 , , <https://www >..rfc- editor .org /info /rfc9907 - [TR-531]
-
ONF, "UML to YANG Mapping Guidelines", Version 1.1, ONF TR-531, , <https://
opennetworking >..org /wp- content /uploads /2018 /08 /TR- 531_ UML- YANG_ Mapping_ Gdls_ v1.1-1-1 .pdf - [TS28.623]
-
3GPP, "Telecommunication management; Generic Network Resource Model (NRM) Integration Reference Point (IRP); Solution Set (SS) definitions", Version 18.0.2, 3GPP TS 28.623, , <https://
www >..3gpp .org /ftp /Specs /archive /28_ series /28 .623 /28623- i02 .zip - [TS32.156]
-
3GPP, "Telecommunication management; Fixed Mobile Convergence (FMC) Model repertoire", Version 17.1.0, 3GPP TS 32.156, , <https://
www >..3gpp .org /ftp /Specs /archive /32_ series /32 .156 /32156- h10 .zip - [W3C
.XML1 .0] -
Bray, T., Ed., Paoli, J., Ed., Sperberg-Mc
Queen, C.M., Ed. , Maler, E., Ed., and F. Yergeau, Ed., "Extensible Markup Language (XML) 1.0 (Fifth Edition)", W3C Recommendation, , <https://www >. Latest version available at <https://.w3 .org /TR /2008 /REC- xml- 20081126/ www >..w3 .org /TR /xml/
Appendix A. Sample Use Cases Skip to TOC
A.1. UC1: Modeling of Server Capabilities Skip to TOC
System capabilities might be represented as an immutable configuration.
Configurable data nodes might need constraints specified using
"when", "must", or "path" statements to ensure that configuration is set
according to the system's capabilities. For example, configurable timer (e.g., for an "interface-
-
A timer might only support the values 1, 5, and 8 seconds, determined by the system capabilities. This is defined in the leaf-list "supported-
timer".¶ -
When the configurable "interface-
timer" leaf is set by a client, it should be ensured that one of the supported values is used. The natural solution would be to make the "interface- timer" a leafref pointing at the "supported- timer".¶
However, this is not possible as "supported-
A solution is that the "supported-
A.2. UC2: Hardware-Based Autoconfiguration - Interface Example Skip to TOC
[RFC8343] defines a YANG data model for the management of network
interfaces. When a system-
The system-
An alternative would be to model the list and these leafs as "config false", but that does not work because:¶
-
The list cannot be marked as "config false" because it needs to contain configurable child nodes, e.g., IP address or enabled;¶
-
The key leaf (name) cannot be marked as "config false" as the list itself is "config true";¶
-
The type cannot be marked "config false" because the type may need to be referenced to make different configuration nodes conditionally available.¶
A.3. UC3: Predefined Administrator Roles Skip to TOC
User and group management is fundamental for setting up access control rules (see Section 2.5 of [RFC8341]).¶
A device may provide a predefined user account (e.g., a system administrator that is always available and has full privileges) for initial system setup and management of other users/groups. It is possible that a new user/group can be defined and granted particular privileges, but the predefined administrator account and its granted access are immutable.¶
A.4. UC4: Declaring Immutable System Configuration from the Perspective of an LNE Skip to TOC
An LNE, as described in [RFC8530], is an independently managed virtual network device made up of resources allocated to it from its host or parent network device. The host device may allocate some resources to an LNE, which, from an LNE's perspective, are provided by the system and may not be modifiable.¶
For example, a host may allocate an interface to an LNE with a valid MTU value as its management interface, so that the allocated interface should then be accessible as the LNE-specific instance of the interface model. The assigned MTU value is system-created and immutable from the context of the LNE.¶
Appendix B. Examples of a Server's Immutable Behavior Skip to TOC
This section provides some examples to illustrate the server's behavior with the immutable flag. These examples are not intended as recommendations for real-world deployments. Long lines within examples are handled in accordance with the line-wrapping specified in [RFC8792].¶
The following fictional module, which imports the "iana-
module example-user-group {
yang-version 1.1;
namespace "https://example.com/ns/example-user-group";
prefix ex-urp;
import iana-crypt-hash {
prefix ianach;
reference
"RFC 7317: A YANG Data Model for System Management,
Section 5";
}
organization
"Example, Inc.";
contact
"Support at example.com";
description
"An example module for basic user and group management.";
revision "2026-11-16" {
description
"Initial revision.";
reference
"RFC 10099: YANG Metadata Annotation for the Immutable Flag";
}
container user-groups {
description
"A container for user and group management.";
list group {
key "name";
description
"Specifies the list of access user-groups.";
leaf name {
type string;
description
"Indicates a unique name identifier for the user-group.";
}
leaf description {
type string;
description
"Provides a human-readable description of the group.";
}
leaf access-level {
type enumeration {
enum admin {
description
"Administrator access with full privileges.";
}
enum power {
description
"Power user access with elevated privileges.";
}
enum normal {
description
"Standard user access with normal privileges.";
}
enum guest {
description
"Guest access with restricted read-only privileges.";
}
}
description
"Indicates permission level assigned to the group.";
}
list user {
key "name";
description
"A list of users that belong to a group.";
leaf name {
type string;
description
"Specifies a unique name identifier for the user.";
}
leaf password {
type ianach:crypt-hash;
description
"Records a cryptographically hashed user password.";
}
leaf full-name {
type string;
description
"Indicates a human-readable full name of the user.";
}
}
leaf-list tag {
type string;
ordered-by user;
description
"Indicates user-ordered tags for categorizing the
user-group.";
}
}
}
}
B.1. NETCONF Example to Retrieve the Immutable Configuration Skip to TOC
Figure 2 illustrates a NETCONF request example (using the Extensible Markup Language (XML) [W3C
=============== NOTE: '\' line wrapping per RFC 8792 ================
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"
xmlns:sysds="urn:ietf:params:xml:ns:yang:ietf-system-\
datastore">
<datastore>sysds:system</datastore>
<subtree-filter>
<user-groups
xmlns="https://example.com/ns/example-user-group"/>
</subtree-filter>
<with-immutability/>
</get-data>
</rpc>
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda">
<user-groups xmlns="https://example.com/ns/example-user-group"
xmlns:imma="urn:ietf:params:xml:ns:yang:ietf-immutable-\
annotation"
imma:immutable="false">
<group imma:immutable="true">
<name>administrator</name>
<description imma:immutable="false">administrator group</\
description>
<access-level>admin</access-level>
<user>
<name>ex-username-1</name>
<password>$5$rounds=10000$mysalt123456789$l4BjA1p/8q.qCYJ.\
2pLqjR5mCJf2bP7cLpYWmnC7Hq8</password>
</user>
<user imma:immutable="false">
<name>ex-username-2</name>
<password>$1$/h1234q$abcdef1234567890abcdef</password>
</user>
<tag>system</tag>
<tag>non-editable</tag>
</group>
<group imma:immutable="false">
<name>power-users</name>
<description>Power user group</description>
<access-level>power</access-level>
<user>
<name>ex-username-3</name>
<password>$1$/h4567q$abcdef2345678901abcdef</password>
</user>
<tag>system</tag>
<tag>editable</tag>
</group>
</user-groups>
</data>
</rpc-reply>
B.2. RESTCONF Example to Retrieve the Immutable Configuration Skip to TOC
Figure 3 illustrates a RESTCONF request example to retrieve the "user-groups"
configuration in <system> with the "with-
B.3. The Inheritance of Immutability Skip to TOC
In the examples in Figures 2 and 3, there are two "group" list entries inside the "user-groups"
container node. The "immutable" metadata annotation for the "user-groups" container
instance is "false", which is also its default value as the top-level element; thus, it can be omitted. The "administrator" list entry is immutable
with the immutability of its descendant nodes "description" and "user" list entry of "ex-
The "immutable" metadata annotation
for the "power-users" list entry is "false", which is also the same
value as its parent node (i.e., the "user-groups" container); thus, it can be omitted.
Descendant nodes (e.g., "description", "access-
B.4. Immutability of the "list" Skip to TOC
In the examples in Figures 2 and 3, the "group" list as a whole inherits immutability from the
container "user-groups", which is mutable. One of the list entries, named "administrator", is immutable,
and the other entry, named "power-users", is mutable. The client is able to copy the entire "user-groups"
container in <running>, add new "group" entries, and modify the values of descendant nodes of the "power-users" list entry,
but the values of descendant nodes of the "administrator" list entry cannot be overridden with different values except
for the "description" and "ex-
The "user" list inside the "administrator" group list entry as a whole inherits immutability from the
list entry, which is immutable. Thus, the client cannot add new user entries inside the "administrator" group.
One of the user entries, named "ex-
B.5. Immutability of the "leaf-list" Skip to TOC
In the examples in Figures 2 and 3, the user-ordered "tag" leaf-list node inside the "administrator" group entry as a whole inherits immutability from the list entry, which is immutable. Thus, the client cannot add, modify, or reorder entries. The client may copy or subsequently delete either of the two leaf-list entries in <running>, but there is no way to delete the nodes from <intended> if those entries appear in <system>.¶
The leaf-list node instance inside the "power-users" group entry as a whole inherits immutability from the list entry, which is mutable. Thus, the client can add or reorder entries. The client may also copy or subsequently delete either of the two leaf-list entries in <running>, but there is no way to delete the nodes from <intended> if those entries appear in <system>.¶
B.6. Error Responses to Clients Overriding the Immutable Configuration Skip to TOC
This section provides examples of a client's attempts to override immutable configuration and error responses that the server might return. Separate examples are provided for the NETCONF and RESTCONF protocols in Figures 4 and 5, respectively.¶
=============== NOTE: '\' line wrapping per RFC 8792 ================
<rpc message-id="102"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<user-groups xmlns="https://example.com/ns/example-user-group">
<group>
<name>administrator</name>
<access-level>guest</access-level>
</group>
</user-groups>
</config>
</edit-config>
</rpc>
<rpc-reply message-id="102"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>invalid-value</error-tag>
<error-severity>error</error-severity>
<error-path
xmlns:ex-urp="https://example.com/ns/example-user-group">
/ex-urp:user-groups/ex-urp:group[ex-urp:name="administrator"]\
/ex-urp:access-level
</error-path>
<error-message xml:lang="en">
Invalid access-level value because the target node is marked \
as immutable
</error-message>
</rpc-error>
</rpc-reply>
Acknowledgments Skip to TOC
Thanks to Kent Watsen, Jan Lindblad, Jason Sterne, Robert Wilton, Andy Bierman, Juergen Schoenwaelder, Reshad Rahman, Anthony Somerset, Lou Berger, Joe Clarke, and Scott Mansfield for reviewing and providing important inputs to this document.¶
Thanks to Per Andersson for the YANGDOCTORS review.¶
Thanks to Mahesh Jethanandani for the AD review.¶