[alto] Comment on typedef 'public-key-ref' of draft-ietf-netconf-trust-anchors-21

Jensen Zhang <jingxuan.n.zhang@gmail.com> Tue, 12 December 2023 12:47 UTC

Return-Path: <jingxuan.n.zhang@gmail.com>
X-Original-To: alto@ietfa.amsl.com
Delivered-To: alto@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 846CAC14F5E9; Tue, 12 Dec 2023 04:47:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RIChwU55kUN9; Tue, 12 Dec 2023 04:47:29 -0800 (PST)
Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E5412C14F61D; Tue, 12 Dec 2023 04:47:29 -0800 (PST)
Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1d0c4d84bf6so32075295ad.1; Tue, 12 Dec 2023 04:47:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702385249; x=1702990049; darn=ietf.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=24pezj2+oe5b/UyepFutakp02L1gGRI2yRDJUSHPV4k=; b=bx+IJGy8bsRlRLqEHBWFkeCfx+fgxxnLJW+Q7qxYS8akAG5i2v9PtzwkF5jqnZmft4 f677t52R1fzfj9hKP3ryUQPfTmlAGYoDENc+xWlwk8PQ9chJQdXmL+FYBV/dDh6AET3m jUoSs5JLjlLpRjfpFNR8OcFB2zPt0WtATokd/3+EHYybQUZsPtHd/TjfN6d0HsN95CeU GPc42XSlZfF31FkwAtOJrpVnNBu9Ux2MPw3tlSEINIb48MFp2yD23XS6A23L8PMEBZux U7nrjQlTDx+CnF9hLk+UGNyYaI8ignODAediYXdc33bn/+gScsNXbEhk42o8Nkg4qpJX ZqCw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702385249; x=1702990049; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=24pezj2+oe5b/UyepFutakp02L1gGRI2yRDJUSHPV4k=; b=f7Ox+DmIl3m4GtIPQH8WeFx/T0LAIy22tNjddri7f92u2aoekCLnRAAzj4CDaB/j7o zxPo1Yf1etLGMyixtesAcUZ//gZWilj2yklAuL8A8lom5en7P8rXmZjaaYuvF/1zD2+y jRmsFQiVWmBjgWqO+BebKlN3G+TTs4YypSE7SOAtsMmRR1uhtTDcqEVofmtyMsS1abat s8H2NCWpVlzPEhBFyB/Gm0ePhiacQytFbrZeBNt4joJJ2qUGsXXYECi/APPHzJmxHRmt 65ApmDVINicOSIyq3G2kU3eAbmPt1nHooMPg5MiMwyN+vnV6IDXxRritPDgOHtigF7Ag GS/A==
X-Gm-Message-State: AOJu0YwcY2UJ1t079j6tD3xIjPBpUE5DbTBblLc+dh3eVZqGsfr8JowQ vODSKrNRvQRNkgCU5C8SOH79NTPRzwTPGpWs7eJAPxGRBtc=
X-Google-Smtp-Source: AGHT+IGn9xMNDPslDqmR2ajPqFaUazr79IbXsXUdDOWsW9RXnxML3KqAUEcIi3kwQ1Dnes7VMw035AEB0A1xqMUsDR8=
X-Received: by 2002:a17:90a:cb05:b0:288:966b:9f48 with SMTP id z5-20020a17090acb0500b00288966b9f48mr2907926pjt.8.1702385248738; Tue, 12 Dec 2023 04:47:28 -0800 (PST)
MIME-Version: 1.0
From: Jensen Zhang <jingxuan.n.zhang@gmail.com>
Date: Tue, 12 Dec 2023 20:47:16 +0800
Message-ID: <CAAbpuypYpm863NC3ka6LvEJMBEarpSguQKdHNs7EiooSWNsXcA@mail.gmail.com>
To: draft-ietf-netconf-trust-anchors@ietf.org
Cc: netconf@ietf.org, IETF ALTO <alto@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000005a056060c4f747c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/alto/ehN47icmw83008hneamR25IdX3I>
Subject: [alto] Comment on typedef 'public-key-ref' of draft-ietf-netconf-trust-anchors-21
X-BeenThere: alto@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Application-Layer Traffic Optimization \(alto\) WG mailing list" <alto.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/alto>, <mailto:alto-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/alto/>
List-Post: <mailto:alto@ietf.org>
List-Help: <mailto:alto-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/alto>, <mailto:alto-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Dec 2023 12:47:30 -0000

Hi authors,

I am one of the authors of the draft-ietf-alto-oam-yang draft. Our draft is
trying to reuse some groupings and typedefs in this document to support
some TLS authentication features. But we find the current typedef
'public-key-ref' cannot be used by another module.

To be more concrete, in the current document, the path of the typedef
'public-key-ref' enforces a prefix of the relative path to the sibling
'public-key-bag' leaf:

   typedef public-key-ref {
     type leafref {
       path "/ts:truststore/ts:public-key-bags/ts:public-key-bag"
         + "[ts:name = current()/../ts:public-key-bag]/"
         + "ts:public-key/ts:name";
     }
     ...
   }

>From my understanding, this typedef is for other modules to reference a
public key in the trust store. The sibling 'public-key-bag' leaf should be
in the same module of the leaf using this typedef, instead of the module
'ts'.

To make this typedef usable, I believe it should look like the following:

   typedef public-key-ref {
     type leafref {
       path "/ts:truststore/ts:public-key-bags/ts:public-key-bag"
         + "[ts:name = current()/../public-key-bag]/"
         + "ts:public-key/ts:name";
     }
     ...
   }

Otherwise, we have to define another typedef in our own module like this:
https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/blob/284d2e630cec00f752ea94f586469797786c6f57/yang/ietf-alto.yang#L612-L628

Thanks,
Jensen