<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-netmod-immutable-flag-14" number="10099" category="std" consensus="true" submissionType="IETF" updates="8040, 8526" tocInclude="true" sortRefs="true" symRefs="true" version="3" xml:lang="en">
  <front>

    <title abbrev="Immutable Flag">YANG Metadata Annotation for the Immutable Flag</title>
    <seriesInfo name="RFC" value="10099"/>
    <author fullname="Qiufang Ma" surname="Ma" initials="Q." role="editor">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        <email>maqiufang1@huawei.com</email>
      </address>
    </author>
    <author fullname="Qin Wu" surname="Wu" initials="Q.">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        <email>bill.wu@huawei.com</email>
      </address>
    </author>
    <author fullname="Balázs Lengyel" asciiFullname="Balazs Lengyel" surname="Lengyel" initials="B." role="editor">
      <organization>Ericsson</organization>
      <address>
        <email>balazs.lengyel@ericsson.com</email>
      </address>
    </author>
    <author fullname="Hongwei Li" surname="Li" initials="H.">
      <organization>HPE</organization>
      <address>
        <email>flycoolman@gmail.com</email>
      </address>
    </author>
    <date month="December" year="2026"/>
    <area>OPS</area>
    <workgroup>netmod</workgroup>
    <keyword>immutable flag</keyword>
    <keyword>system configuration</keyword>
    <abstract>
<t>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-provided nodes, using a YANG metadata annotation called
   "immutable" to flag which nodes are immutable.</t>
      <t>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.</t>
      <t>The immutable flag is descriptive, documenting an existing behavior, not
   prescriptive, dictating server behaviors.</t>
      <t>This document updates RFCs 8040 and 8526.</t>
    </abstract>
  </front>
  <middle>
<section anchor="introduction">
      <name>Introduction</name>
      <t>This document defines a YANG metadata annotation <xref target="RFC7952"/> to formally document
   an existing model handling behavior that has been used by
   multiple standards organizations (e.g., 3GPP TS 32.156 <xref target="TS32.156"/>, 3GPP TS 28.623 <xref target="TS28.623"/>, and ONF TR-531 <xref target="TR-531"/>) and vendors.</t>
      <t>YANG <xref target="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:</t>
      <ul spacing="normal">
        <li>
          <t>allow configuration of data nodes under immutable lists or containers;</t>
        </li>
        <li>
          <t>place "when", "must", and "leafref" constraints between configuration
   and immutable nodes;</t>
        </li>
        <li>
          <t>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.</t>
        </li>
      </ul>
      <t>If a server always rejects a client's attempt to override some
   system-provided data because it internally thinks the data is immutable, it should document
   it toward the clients in a machine-readable way rather than writing as
   plain text in the "description" statement.</t>
      <t>This document defines an approach to formally document an existing behavior,
   implemented by servers in production, on the immutability of some
   system-provided data, using a YANG metadata annotation <xref target="RFC7952"/>
   called "immutable" to flag which nodes are immutable. A server <bcp14>MUST NOT</bcp14> set the immutable flag to "true" for configuration data that is not system-provided. This document does not
   regulate server behaviors. That said, it is expected that a server will return
   an error with an error-tag value "invalid-value" if a client attempts to
   modify an immutable node.</t>
      <t>A nonexhaustive list of already implemented and potential use cases is provided below:</t>
      <ul spacing="normal">
        <li>
          <t>UC1: Modeling of server capabilities (<xref target="sec-uc1"/>)</t>
        </li>
        <li>
          <t>UC2: Hardware-based autoconfiguration (<xref target="sec-uc2"/>)</t>
        </li>
        <li>
          <t>UC3: Predefined administrator roles (<xref target="sec-uc3"/>)</t>
        </li>
        <li>
          <t>UC4: Declaring immutable system configuration from the perspective of a Logical Network Element (LNE) (<xref target="sec-uc4"/>)</t>
        </li>
      </ul>
      <section anchor="updates-to-rfc-8040">
        <name>Updates to RFC 8040</name>
        <t>This document updates Sections <xref target="RFC8040" section="4.8" sectionFormat="bare"/> and <xref target="RFC8040" section="9.1.1" sectionFormat="bare"/> of <xref target="RFC8040"/> to add an
  additional query parameter named "with-immutability", as specified in <xref target="RESTCONF-ext"/>.</t>
      </section>
      <section anchor="updates-to-rfc-8526">
        <name>Updates to RFC 8526</name>
        <t>This document updates <xref section="3.1.1" sectionFormat="of" target="RFC8526"/> to add an additional input parameter
   named "with-immutability" for the &lt;get-data&gt; operation, as specified in <xref target="NETCONF-ext"/>.</t>
      </section>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
<t>This document uses the following term defined in <xref target="RFC6241"/>:</t>
      <ul spacing="compact">
        <li>
          <t>configuration data</t>
        </li>
      </ul>
      <t>This document uses the following terms defined in <xref target="RFC7950"/>:</t>
      <ul spacing="compact">
        <li>
          <t>data node</t>
        </li>
        <li>
          <t>leaf</t>
        </li>
        <li>
          <t>leaf-list</t>
        </li>
        <li>
          <t>container</t>
        </li>
        <li>
          <t>list</t>
        </li>
        <li>
          <t>anydata</t>
        </li>
        <li>
          <t>anyxml</t>
        </li>
        <li>
          <t>interior node</t>
        </li>
        <li>
          <t>data tree</t>
        </li>
      </ul>
      <t>This document uses the following term defined in <xref target="RFC8341"/>:</t>
      <ul spacing="compact">
        <li>
          <t>access operation</t>
        </li>
      </ul>
      <t>This document uses the following terms defined in <xref target="RFC8342"/>:</t>
      <ul spacing="compact">
        <li>
          <t>client</t>
        </li>
        <li>
          <t>server</t>
        </li>
      </ul>
      <t>This document uses the following term defined in <xref target="RFC10016"/>:</t>
      <ul spacing="compact">
        <li>
          <t>system configuration</t>
        </li>
      </ul>
      <t>This document defines the following term:</t>
      <dl>
        <dt>immutable flag:</dt>
        <dd>
          <t>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.</t>
        </dd>
      </dl>
    </section>
    <section anchor="applicability">
      <name>Applicability</name>
      <t>While the immutable flag applies to all configuration nodes, its value <bcp14>MUST NOT</bcp14> be set to "true" for configuration data that is not system configuration.</t>
      <t>The immutable flag is only visible in read-only datastores (i.e., &lt;system&gt;
   <xref target="RFC10016"/>, &lt;intended&gt;, and &lt;operational&gt;)
   when a "with-immutability" parameter is carried (<xref target="with-immutability"/>).
   However, this only serves as descriptive information about the
   instance node itself; it has no effect on the handling of the read-only
   datastore. If the immutable flag is requested to be returned for an invalid
   datastore (i.e., any datastore other than &lt;system&gt;, &lt;intended&gt;, or &lt;operational&gt;), then the server <bcp14>MUST</bcp14> return an error response with the error-tag value
   "unknown-element".</t>
      <t>Configuration data has the same immutability if it appears in different datastores.
   The immutability of configuration data is protocol and
   user independent.</t>
    </section>
    <section anchor="immutable-metadata-annotation">
      <name>"Immutable" Metadata Annotation</name>
      <section anchor="immutable-def">
        <name>Definition</name>
        <t>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-immutability"
   parameter (<xref target="with-immutability"/>). If the "immutable" metadata annotation for
   a configuration node is not specified, the default "immutable" value is the
   same as the value of its parent node in the data tree (<xref target="interior"/>).
   The "immutable" metadata annotation value for a top-level instance
   node is "false" if not specified.</t>
        <t>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., &lt;running&gt;),
   or deleted from the intended datastore, which is the merged result of &lt;running&gt; and &lt;system&gt; as defined in <xref section="4" sectionFormat="of" target="RFC10016"/>. The node <bcp14>MAY</bcp14> be explicitly configured by a client in &lt;running&gt; with the
   same value, and that configuration in &lt;running&gt; may subsequently be removed.  However, neither of these edits will change the configuration in &lt;intended&gt; (if implemented) on the device.</t>
        <t>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.</t>
        <t>Servers <bcp14>MUST</bcp14> ignore any "immutable" annotations sent from the client.</t>
      </section>
      <section anchor="with-immutability">
        <name>"with-immutability" Parameter</name>
        <t>This section specifies the Network Configuration Protocol (NETCONF) <xref target="RFC6241"/> <xref target="RFC8526"/> and RESTCONF <xref target="RFC8040"/>
   protocol extensions to support the "with-immutability" parameter.
   The "immutable" metadata annotations are not returned in a response unless
   explicitly requested by the client using this parameter.</t>
        <section anchor="NETCONF-ext">
          <name>NETCONF Extensions to Support "with-immutability"</name>
          <t>This document updates <xref target="RFC8526"/> to augment the &lt;get-data&gt;
   operation with an additional parameter named "with-immutability" when interacting with read-only datastores.
   If present, this parameter requests that the server include
   the "immutable" metadata annotations in its response.</t>
          <t><xref target="tree"/> provides the tree structure <xref target="RFC8340"/> of augmentations to NETCONF
	  operations, as defined in the "ietf-immutable-annotation" module (<xref target="module"/>).</t>

          <figure anchor="tree">
            <name>Augmentations to NETCONF Operations</name>
            <sourcecode type="yangtree"><![CDATA[
module: ietf-immutable-annotation
  augment /ncds:get-data/ncds:input:
    +---w with-immutability?   empty
]]></sourcecode>
          </figure>
          <t>To discover if the "with-immutability" parameter is supported by a server,
a NETCONF client can query if the server implements the "ietf-immutable-annotation" module (<xref target="module"/>) by reading the YANG library information from the operational state datastore, as per <xref target="RFC8526"/>.</t>
          <t>Refer to <xref target="NETCONF-example"/> for an example of a NETCONF operation with the "with-immutability" input parameter.</t>
        </section>
        <section anchor="RESTCONF-ext">
          <name>RESTCONF Extensions to Support
          "with-immutability"</name>
          <t>This document extends Sections <xref target="RFC8040" section="4.8" sectionFormat="bare"/> and <xref target="RFC8040" section="9.1.1" sectionFormat="bare"/> of <xref target="RFC8040"/> to add a query
   parameter named "with-immutability" to the GET operation. If present, this parameter
   requests that the server include the "immutable" metadata annotations in its
   response. This parameter is only allowed with no values carried when interacting with read-only datastores.
   If it has any unexpected value, then a "400 Bad Request" status-line <bcp14>MUST</bcp14> be returned. The error-tag value "invalid-value" is used in this case.
   RESTCONF protocol operations for the datastore resources are defined in <xref target="RFC8527"/>.</t>
          <t>To enable a RESTCONF client to discover if the "with-immutability" query parameter
   is supported by a server, the following capability URI is defined:</t>

          <artwork><![CDATA[
    urn:ietf:params:restconf:capability:with-immutability:1.0
]]></artwork>
          <t>If the "with-immutability" query parameter URI is listed in the "capability"
leaf-list defined in <xref section="9.3" sectionFormat="of" target="RFC8040"/>, then the server supports the
"with-immutability" query parameter.</t>
          <t>Refer to <xref target="RESTCONF-example"/> for an example of a RESTCONF operation with the "with-immutability" query parameter.</t>
        </section>
      </section>
    </section>
    <section anchor="use-of-immutable-flag-for-different-statements">
      <name>Use of the Immutable Flag for Different Statements</name>
      <t>This section defines what the immutable flag means to the client for
   each instance of YANG data node statements.</t>
      <section anchor="the-leaf-statement">
        <name>The "leaf" Statement</name>
        <t>When a leaf node instance is immutable, it cannot be configured with a
   different value in read-write configuration datastores (e.g., &lt;running&gt;) or
   removed from &lt;intended&gt; (if implemented), though it can be created/deleted
   in read-write configuration datastores (see Sections <xref format="counter" target="immutable-def"/> and <xref format="counter" target="system-interact"/>).</t>
      </section>
      <section anchor="the-leaf-list-statement">
        <name>The "leaf-list" Statement</name>
        <t>When a leaf-list entry is immutable, it cannot be
  removed from &lt;intended&gt; (if implemented), though it can be created/deleted
  in read-write configuration datastores (see Sections <xref format="counter" target="immutable-def"/> and <xref format="counter" target="system-interact"/>).</t>
        <t>The "immutable" annotation attached to an individual leaf-list entry
   provides immutability with respect to the entry itself. As per the restrictions in <xref target="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).</t>
        <t>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).</t>
        <t>Refer to <xref target="imm-leaf-list"/> for an example of immutability of leaf-lists.</t>
      </section>
      <section anchor="the-container-statement">
        <name>The "container" Statement</name>
        <t>When a container node instance is immutable, it cannot be removed from &lt;intended&gt; (if implemented),
   though it can be created/deleted in read-write configuration datastores
   (see Sections <xref format="counter" target="immutable-def"/> and <xref format="counter" target="system-interact"/>).</t>
        <t>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 (<xref target="interior"/>).</t>
      </section>
      <section anchor="the-list-statement">
        <name>The "list" Statement</name>
        <t>When a list entry is immutable, it cannot be removed from &lt;intended&gt; (if implemented),
  though it can be created/deleted in read-write configuration datastores
  (see Sections <xref format="counter" target="immutable-def"/> and <xref format="counter" target="system-interact"/>).</t>
        <t>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 (<xref target="interior"/>).</t>
        <t>The "immutable" annotation attached to an individual list entry provides
   immutability with respect to the entry itself. As per the restrictions in <xref target="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).</t>
        <t>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.</t>
        <t>Refer to <xref target="imm-list"/> for an example of immutability of lists.</t>
      </section>
      <section anchor="the-anydata-statement">
        <name>The "anydata" Statement</name>
        <t>When an "anydata" node instance is immutable, it cannot be removed from &lt;intended&gt; (if implemented),
   though it can be created/deleted in read-write configuration datastores
   (see Sections <xref format="counter" target="immutable-def"/> and <xref format="counter" target="system-interact"/>).</t>
        <t>Additionally, as with all interior nodes, immutability is recursively applied to
   descendants (<xref target="interior"/>).</t>
      </section>
      <section anchor="the-anyxml-statement">
        <name>The "anyxml" Statement</name>
        <t>When an "anyxml" node instance is immutable, it cannot be removed from &lt;intended&gt; (if implemented),
   though it can be created/deleted in read-write configuration datastores
   (see Sections <xref format="counter" target="immutable-def"/> and <xref format="counter" target="system-interact"/>).</t>
        <t>Additionally, as with all interior nodes, immutability is recursively applied to
   descendants (<xref target="interior"/>).</t>
      </section>
    </section>
    <section anchor="interior">
      <name>Immutability of Interior Nodes</name>
      <t>Immutability is a property of a configuration data node instance, conveyed as metadata <xref target="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.</t>
      <t>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.</t>
      <t>Refer to <xref target="inheritance"/> for an example of how immutability is recursively
   inherited or explicitly reset by descendants.</t>
    </section>
    <section anchor="system-interact">
      <name>System Configuration Datastore Interactions</name>
      <t>Immutable configuration can only be created, updated, and deleted by the server; it is present in &lt;system&gt;, if implemented. That said, the existence of
   immutable configuration is independent of whether or not &lt;system&gt; is implemented. For example, a server that does not support &lt;system&gt; may have predefined hardware-specific configuration in use that cannot be overridden or removed by clients.
   Not all system configuration data is immutable. Immutable configuration
   does not appear in &lt;running&gt; unless it is explicitly configured.</t>
      <t>As specified in <xref target="immutable-def"/>, a client <bcp14>MAY</bcp14> create/delete immutable nodes
   with the same values as defined by the server in read-write configuration datastores (e.g.,
   &lt;candidate&gt;, &lt;running&gt;), which merely makes immutable nodes
   visible/invisible in the datastore.</t>
    </section>
    <section anchor="nacm-interactions">
      <name>NACM Interactions</name>
      <t>The server rejects an operation request due to immutability when it
   tries to perform the operation on the request data. Any immutability checking
   <bcp14>MUST</bcp14> be performed after
   access control decisions, if the Network Configuration Access
   Control Model (NACM) <xref target="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-denied" error.</t>
    </section>
    <section anchor="module">
      <name>&quot;ietf-immutable-annotation&quot; YANG Module</name>
      <t>This module imports definitions from <xref target="RFC7952"/>, <xref target="RFC8342"/>, <xref target="RFC8526"/>, and <xref target="RFC10016"/>.</t>
      
      <sourcecode type="yang" markers="true" name="ietf-immutable-annotation@2026-12-03.yang"><![CDATA[
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.";
    }
  }
}
]]></sourcecode>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      

<section anchor="the-ietf-xml-registry">
        <name>The IETF XML Registry</name>
        <t>IANA has registered the following URI in the "ns"
registry within the "IETF XML Registry" group <xref target="RFC3688"/>:</t>
        <dl spacing="compact" newline="false">
          <dt>URI:</dt>
          <dd>urn:ietf:params:xml:ns:yang:ietf-immutable-annotation</dd>
          <dt>Registrant Contact:</dt>
          <dd>The IESG</dd>
          <dt>XML:</dt>
          <dd>N/A; the requested URI is an XML namespace.</dd>
        </dl>
      </section>
      <section anchor="the-yang-module-names-registry">
        <name>The YANG Module Names Registry</name>
        <t>IANA has registered the following YANG module in the "YANG
Module Names" registry <xref target="RFC6020"/> within the "YANG Parameters"
registry group.</t>
        <dl spacing="compact" newline="false">
          <dt>Name:</dt>
          <dd>ietf-immutable-annotation</dd>
          <dt>Maintained by IANA?</dt>
          <dd>N</dd>
          <dt>Namespace:</dt>
          <dd>urn:ietf:params:xml:ns:yang:ietf-immutable-annotation</dd>
          <dt>Prefix:</dt>
          <dd>imma</dd>
          <dt>Reference:</dt>
          <dd>RFC 10099</dd>
        </dl>
      </section>
      <section anchor="restconf-capability-urn-registry">
        <name>The RESTCONF Capability URNs Registry</name>
        <t>IANA has registered the following capability identifier URN in the
"RESTCONF Capability URNs" registry defined in <xref target="RFC8040"/>:</t>
        <dl spacing="compact" newline="false">
          <dt>Index:</dt>
          <dd>:with-immutability</dd>
          <dt>Capability Identifier:</dt>
          <dd>urn:ietf:params:restconf:capability:with-immutability:1.0</dd>
        </dl>
      </section>
    </section>
    <section anchor="operational-considerations">
      <name>Operational Considerations</name>
      <t>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.</t>
      <t>The mechanism defined in this document is backward compatible with existing implementations. A legacy client unaware of this mechanism will not include the "with-immutability" parameter in its retrieval requests. Consequently, servers will process the request normally without returning any "immutable" metadata annotations. Conversely, a client explicitly requesting the immutable flag from a legacy server may either receive an error response for an unsupported parameter or have the parameter ignored, depending on the server's implementation.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This section is modeled after the template described in <xref section="3.7.1" sectionFormat="of" target="RFC9907"/>.</t>
      <t>The "ietf-immutable-annotation" YANG module defines a data model that is
   designed to be accessed via YANG-based management protocols, such as the Network Configuration Protocol (NETCONF) <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>. These YANG-based management protocols (1) have to
   use a secure transport layer (e.g., SSH <xref target="RFC4253"/>, TLS <xref target="RFC9846"/>, and QUIC <xref target="RFC9000"/>) and (2) have to use mutual authentication (e.g., for SSH, the SSH Authentication Protocol <xref target="RFC4252"/>).</t>
      <t>The Network Configuration Access Control Model (NACM) <xref target="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.</t>
      <t>The YANG module specified in this document defines a metadata annotation;
   it also extends the RPC operations of the NETCONF protocol in <xref target="RFC6241"/>
   and <xref target="RFC8526"/>.</t>
      <t>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.</t>
      <t>The security considerations for the NETCONF protocol operations (see
   <xref section="9" sectionFormat="of" target="RFC6241"/> and <xref section="6" sectionFormat="of" target="RFC8526"/>) also apply to
   the operations extended in this document.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7952.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8526.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.10016.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8527.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
	
        <reference anchor="TR-531" target="https://opennetworking.org/wp-content/uploads/2018/08/TR-531_UML-YANG_Mapping_Gdls_v1.1-1-1.pdf">
          <front>
            <title>UML to YANG Mapping Guidelines</title>
            <author>
              <organization>ONF</organization>
            </author>
            <date year="2018" month="July"/>
          </front>
          <seriesInfo name="ONF" value="TR-531"/>
          <refcontent>Version 1.1</refcontent>
        </reference>
        <reference anchor="TS28.623" target="https://www.3gpp.org/ftp/Specs/archive/28_series/28.623/28623-i02.zip">
          <front>
            <title>Telecommunication management; Generic Network Resource Model (NRM) Integration Reference Point (IRP); Solution Set (SS) definitions</title>
            <author>
              <organization>3GPP</organization>
            </author>
            <date month="September" year="2022"/>
          </front>
          <seriesInfo name="3GPP TS" value="28.623"/>
          <refcontent>Version 18.0.2</refcontent>
        </reference>
        <reference anchor="TS32.156" target="https://www.3gpp.org/ftp/Specs/archive/32_series/32.156/32156-h10.zip">
          <front>
            <title>Telecommunication management; Fixed Mobile Convergence (FMC) Model repertoire</title>
            <author>
              <organization>3GPP</organization>
            </author>
            <date month="June" year="2022"/>
          </front>
          <seriesInfo name="3GPP TS" value="32.156"/>
          <refcontent>Version 17.1.0</refcontent>
        </reference>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8792.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9907.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4253.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9846.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8343.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8530.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7317.xml"/>
        <reference anchor="W3C.XML1.0" target="https://www.w3.org/TR/2008/REC-xml-20081126/">
          <front>
            <title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
            <author initials="T." surname="Bray" fullname="Tim Bray" role="editor"/>
            <author initials="J." surname="Paoli" fullname="Jean Paoli" role="editor"/>
            <author initials="C.M." surname="Sperberg-McQueen" fullname="C. M. Sperberg McQueen" role="editor"/>
            <author initials="E." surname="Maler" fullname="Eve Maler" role="editor"/>
            <author initials="F." surname="Yergeau" fullname="Francois Yergeau" role="editor"/>
            <date day="26" month="November" year="2008"/>
          </front>
          <refcontent>W3C Recommendation</refcontent>
          <annotation>Latest version available at <eref brackets="angle" target="https://www.w3.org/TR/xml/"/>.</annotation>
        </reference>
      </references>
    </references>
<section anchor="use-cases">
      <name>Sample Use Cases</name>
      <section anchor="sec-uc1">
        <name>UC1: Modeling of Server Capabilities</name>
        <t>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-timer" or a "bfd-interval-timer") values are dependent on the underlying system timer resource limits.</t>
        <ul spacing="normal">
          <li>
            <t>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".</t>
          </li>
          <li>
            <t>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".</t>
          </li>
        </ul>
        <t>However, this is not possible as "supported-timer" must be
   read-only (thus "config false"), while "interface-timer" must be writable
	(thus "config true").  According to the rules of YANG, putting a constraint between "config true" and "config false" data nodes is not allowed (<xref section="9.9" sectionFormat="of" target="RFC7950"/>).</t>
        <t>A solution is that the "supported-timer" data node in the YANG
   data model shall be defined as "config true" and shall also be marked with
   the "immutable" annotation making it unchangeable. After this, the
   "interface-timer" shall be defined as a leafref pointing at the
   "supported-timer".</t>
      </section>
      <section anchor="sec-uc2">
        <name>UC2: Hardware-Based Autoconfiguration - Interface Example</name>
        <t><xref target="RFC8343"/> defines a YANG data model for the management of network
   interfaces.  When a system-controlled interface is physically present,
   the system creates an interface entry with valid name and type
   values in &lt;system&gt; (if it exists; see <xref target="RFC10016"/>).</t>
        <t>The system-generated type value is dependent on, and represents, the hardware
   present; consequently, it cannot be changed by clients.  If a
   client tries to set the type of an interface to a value that can
   never be used by the system, the request will be rejected by the
   server.  The data is modeled as "config true"; thus, it should be annotated
   as immutable.</t>
        <t>An alternative would be to model the list and these leafs
   as "config false", but that does not work because:</t>
        <ul spacing="normal">
          <li>
            <t>The list cannot be marked as "config false" because it needs to contain
  configurable child nodes, e.g., IP address or enabled;</t>
          </li>
          <li>
            <t>The key leaf (name) cannot be marked as "config false" as the list
  itself is "config true";</t>
          </li>
          <li>
            <t>The type cannot be marked "config false" because the type may need to be referenced  to make different configuration nodes
  conditionally available.</t>
          </li>
        </ul>
      </section>
      <section anchor="sec-uc3">
        <name>UC3: Predefined Administrator Roles</name>
        <t>User and group management is fundamental for setting up access
   control rules (see <xref section="2.5" sectionFormat="of" target="RFC8341"/>).</t>
        <t>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.</t>
      </section>
      <section anchor="sec-uc4">
        <name>UC4: Declaring Immutable System Configuration from the Perspective of an LNE</name>
        <t>An LNE, as described in <xref target="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.</t>
        <t>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.</t>
      </section>
    </section>
    <section anchor="examples-of-servers-immutable-behavior">
      <name>Examples of a Server's Immutable Behavior</name>
      <t>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 <xref target="RFC8792"/>.</t>
      <t>The following fictional module, which imports the "iana-crypt-hash" module <xref target="RFC7317"/>, is used throughout this section:</t>
      <sourcecode type="yang"><![CDATA[
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.";
      }
    }
  }
}
]]></sourcecode>
      <section anchor="NETCONF-example">
        <name>NETCONF Example to Retrieve the Immutable Configuration</name>
        <t><xref target="NETCONF-with-immutability"/> illustrates a NETCONF request example (using the Extensible Markup Language (XML) <xref target="W3C.XML1.0"/> encoding) to retrieve the "user-groups"
   configuration in &lt;system&gt; with the "with-immutability" parameter and the response that a server might return if it supports this parameter. For illustrative clarity, some annotations that could otherwise be omitted are shown explicitly in the response.</t>
        <figure anchor="NETCONF-with-immutability">
          <name>A NETCONF Example to Retrieve the Immutable Configuration</name>
          <sourcecode type="xml"><![CDATA[
=============== 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>
]]></sourcecode>
        </figure>
      </section>
      <section anchor="RESTCONF-example">
        <name>RESTCONF Example to Retrieve the Immutable Configuration</name>
        <t><xref target="RESTCONF-with-immutability"/> illustrates a RESTCONF request example to retrieve the "user-groups"
  configuration in &lt;system&gt; with the "with-immutability" query parameter and the response a server might return if it supports this query parameter. The JSON representation of the metadata annotations in the response follows the encoding specified in <xref section="5.2" sectionFormat="of" target="RFC7952"/>. For illustrative clarity, some annotations that could otherwise be omitted are shown explicitly in the response.</t>
        <figure anchor="RESTCONF-with-immutability">
          <name>A RESTCONF Example to Retrieve the Immutable Configuration</name>
          <sourcecode type="http-message"><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

GET /restconf/ds/ietf-system-datastore:system/example-user-group:\
                               user-groups?with-immutability HTTP/1.1
Host: example.com
Accept: application/yang-data+json


HTTP/1.1 200 OK
Date: Fri, 9 Jan 2026 15:56:30 GMT
Server: example-server
Content-Type: application/yang-data+json
Cache-Control: no-cache
ETag: "a74eefc993a2b"
Last-Modified: Mon, 5 Jan 2026 14:02:14 GMT

{
  "example-user-group:user-groups": {
    "@": {
      "ietf-immutable-annotation:immutable": false
    },
    "group": [
      {
        "@": {
          "ietf-immutable-annotation:immutable": true
        },
        "name": "administrator",
        "description": "administrator group",
        "@description": {
          "ietf-immutable-annotation:immutable": false
        },
        "access-level": "admin",
        "user": [
          {
            "name": "ex-username-1",
            "password": "$5$rounds=10000$mysalt123456789$l4BjA1p/8q.\
                                    qCYJ.2pLqjR5mCJf2bP7cLpYWmnC7Hq8"
          },
          {
            "@": {
              "ietf-immutable-annotation:immutable": false
            },
            "name": "ex-username-2",
            "password": "$1$/h1234q$abcdef1234567890abcdef"
          }
        ],
        "tag": ["system", "non-editable"]
      },
      {
        "@": {
          "ietf-immutable-annotation:immutable": false
        },
        "name": "power-users",
        "description": "Power user group",
        "access-level": "power",
        "user": [
          {
            "name": "ex-username-3",
            "password": "$1$/h4567q$abcdef2345678901abcdef"
          }
        ],
        "tag": ["system", "editable"]
      }
    ]
  }
}
]]></sourcecode>
        </figure>
      </section>
      <section anchor="inheritance">
        <name>The Inheritance of Immutability</name>
        <t>In the examples in Figures <xref target="NETCONF-with-immutability" format="counter"/> and <xref target="RESTCONF-with-immutability" format="counter"/>, 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-username-2" being explicitly toggled.
Other descendant nodes (e.g., "access-level", "ex-username-1" user list entry, and "tag" leaf-list) inside the "administrator" list entry inherit the immutability of the list entry; thus, they are also immutable.</t>
        <t>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-level", "user" list, and "tag" leaf-list) inside the "power-users" group inherit the immutability of the list entry; thus, they are also mutable.</t>
      </section>
      <section anchor="imm-list">
        <name>Immutability of the "list"</name>
        <t>In the examples in Figures <xref target="NETCONF-with-immutability" format="counter"/> and <xref target="RESTCONF-with-immutability" format="counter"/>, 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 &lt;running&gt;, 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-username-2" user list entry nodes, which are explicitly reset to be mutable.
 The client may also subsequently delete any copied "group" entries or the entire
 "user-groups" container, which will not prevent the deleted data from being present in &lt;intended&gt; (if implemented) assuming it
	is still contained in &lt;system&gt;.</t>
        <t>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-username-1", is immutable through inheritance,
 and the other user entry, named "ex-username-2", is explicitly set to be mutable. The client cannot
 modify the "password" parameter or add a "full-name" value for user "ex-username-1"
 but is allowed to update (e.g., modify the "password" value or add a "full-name" value)
 the list entry for user "ex-username-2". The client may copy or subsequently delete either of the two list entries in &lt;running&gt;,
 but there is no way to delete the nodes from &lt;intended&gt; (if implemented).</t>
      </section>
      <section anchor="imm-leaf-list">
        <name>Immutability of the "leaf-list"</name>
        <t>In the examples in Figures <xref target="NETCONF-with-immutability" format="counter"/> and <xref target="RESTCONF-with-immutability" format="counter"/>, 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 &lt;running&gt;,
but there is no way to delete the nodes from &lt;intended&gt; if those entries appear in &lt;system&gt;.</t>
        <t>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 &lt;running&gt;,
but there is no way to delete the nodes from &lt;intended&gt; if those entries appear in &lt;system&gt;.</t>
      </section>
      <section anchor="error-responses-to-clients-overriding-immutable-configuration">
        <name>Error Responses to Clients Overriding the Immutable Configuration</name>
        <t>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 <xref target="NETCONF-error" format="counter"/> and <xref target="RESTCONF-error" format="counter"/>, respectively.</t>
        <figure anchor="NETCONF-error">
          <name>A NETCONF Example to Override the Immutable Configuration with an Error Response</name>
          <sourcecode type="xml"><![CDATA[
=============== 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>
]]></sourcecode>
        </figure>
        <figure anchor="RESTCONF-error">
          <name>A RESTCONF Example to Override the Immutable Configuration with an Error Response</name>
          <sourcecode type="http-message"><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

PATCH /restconf/ds/ietf-datastores:running/example-user-group:user-\
                     groups/group=administrator/access-level HTTP/1.1
Host: example.com
Content-Type: application/yang-data+json

{
  "example-user-group:access-level": "guest"
}

HTTP/1.1 400 Bad Request
Content-Type: application/yang-data+json

{
  "ietf-restconf:errors": {
    "error": [
      {
        "error-type": "application",
        "error-tag": "invalid-value",
        "error-severity": "error",
        "error-path": "/example-user-group:user-groups/group[name='\
                                       administrator']/access-level",
        "error-message": "Invalid access-level value because the \
                                  target node is marked as immutable"
      }
    ]
  }
}
]]></sourcecode>
        </figure>
      </section>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Thanks to <contact fullname="Kent Watsen"/>, <contact fullname="Jan Lindblad"/>,
   <contact fullname="Jason Sterne"/>, <contact fullname="Robert Wilton"/>,
   <contact fullname="Andy Bierman"/>, <contact fullname="Juergen Schoenwaelder"/>,
   <contact fullname="Reshad Rahman"/>, <contact fullname="Anthony Somerset"/>,
   <contact fullname="Lou Berger"/>, <contact fullname="Joe Clarke"/>, and
   <contact fullname="Scott Mansfield"/> for reviewing and providing important
   inputs to this document.</t>
      <t>Thanks to <contact fullname="Per Andersson"/> for the YANGDOCTORS review.</t>
      <t>Thanks to <contact fullname="Mahesh Jethanandani"/> for the AD review.</t>
    </section>
  </back>

</rfc>
