Re: [Netconf] Question on NACM usage

Per Hedeland <per@tail-f.com> Wed, 14 December 2016 11:40 UTC

Return-Path: <per@tail-f.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1EF9F129DCF for <netconf@ietfa.amsl.com>; Wed, 14 Dec 2016 03:40:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.797
X-Spam-Level:
X-Spam-Status: No, score=-4.797 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-2.896, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id trPa4EOwmowD for <netconf@ietfa.amsl.com>; Wed, 14 Dec 2016 03:39:59 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id B2C5D129DBF for <netconf@ietf.org>; Wed, 14 Dec 2016 03:39:59 -0800 (PST)
Received: from mars.tail-f.com (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id A2EC51AE03EE; Wed, 14 Dec 2016 12:39:57 +0100 (CET)
To: Martin Bjorklund <mbj@tail-f.com>
References: <D62E05768DBAFF42A72B9F4954476D65010EB15BAB@FR712WXCHMBA09.zeu.alcatel-lucent.com> <20161214.122205.1943287191256158009.mbj@tail-f.com>
From: Per Hedeland <per@tail-f.com>
Message-ID: <58512F8D.5000404@tail-f.com>
Date: Wed, 14 Dec 2016 12:39:57 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <20161214.122205.1943287191256158009.mbj@tail-f.com>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/trsA1Z2C10BoWlHAMb2tgTUa-AE>
Cc: netconf@ietf.org
Subject: Re: [Netconf] Question on NACM usage
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Dec 2016 11:40:01 -0000

On 2016-12-14 12:22, Martin Bjorklund wrote:
> 
> No this is not possible.  The reason is that if we allow any XPath
> expression here, the complexity of implementing this increases
> dramatically.  Also the complexity of using this and understanding how
> rules interact will increase, thus increasing the risk of
> mis-configuration (which would be security impacting).

...and of course, the spec says that it's not possible - RFC 6536:

  typedef node-instance-identifier {
    type yang:xpath1.0;
    description
      "Path expression used to represent a special
       data node instance identifier string.

       A node-instance-identifier value is an
       unrestricted YANG instance-identifier expression.
       All the same rules as an instance-identifier apply
       except predicates for keys are optional.  If a key
       predicate is missing, then the node-instance-identifier
       represents all possible server instances for that key.

RFC 6020, section 9.13:

   The syntax for an instance-identifier is a subset of the XPath
   abbreviated syntax, formally defined by the rule
   "instance-identifier" in Section 12.  It is used to uniquely identify
   a node in the data tree.  Predicates are used only for specifying the
   values for the key nodes for list entries, a value of a leaf-list
   entry, or a positional index for a list without keys.  For
   identifying list entries with keys, each predicate consists of one
   equality test per key, and each key MUST have a corresponding
   predicate.

--Per Hedeland