Re: [netmod] Use of unrestricted string in YANG (was RE: naming scope of a grouping which uses a grouping)

Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> Thu, 12 January 2023 15:46 UTC

Return-Path: <jschoenwaelder@constructor.university>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 50499C1522A4 for <netmod@ietfa.amsl.com>; Thu, 12 Jan 2023 07:46:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.648
X-Spam-Level:
X-Spam-Status: No, score=-6.648 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.onmicrosoft.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 8B5xCNYWdIyk for <netmod@ietfa.amsl.com>; Thu, 12 Jan 2023 07:46:07 -0800 (PST)
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2053.outbound.protection.outlook.com [40.107.13.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6A90FC1522BE for <netmod@ietf.org>; Thu, 12 Jan 2023 07:46:05 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XU64eO0I/eW6utb7tSIbZ5XJbCb1FbGnfSXq1s04rl7zQPzaFIHEIKoTBtWhSnCbCdbPHdqsaMF8e+mNUJKljQbxwn/zq11wPh3jF7HNGsdFK5MG7L7hK+yCoFxum9HdhuorpaNPa5yBP8hRZUAUMKbg1BaP199bHz8IBHywBCQk0o5axSnFdKwIN2yhjYE8UI/4S9rChH1yu4zwlrfU4//olRqsCSTq2/tDXJMTyEKzkDfPT7i0e95O04lcUyLM9Ptn008kLSqtxTqnP/YPt0LpYlPHrlC7qgPBqUvr/yxufVYuB9EfcwLMNhMxv2j+EHNf9fPOfI7Yph/2eqZq4g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gfnGz2gYcCYAFMYrVIA5qvkqxKRZIiDUQnjmCFX3V/U=; b=aHf3ks7WeM9T73NG4Wnik+Tj27Eb6e9NU+ip8+gzEGpUH60pxyPOF2sClwk5me3qG0MjhJpVxdpEFnDOKPKH5QHCGNcAZ+BFtSsVWoleq3PLPlXKbnodzH5vwiC0oaVkch9+BcMJZrMfkGICt61RYaDfzP8855siMqctm/auB0gKZzTOzbVN/tMljB9QCmDr8kqCfq7tlKb5kG2N00ogDY2p8B/m35nEKwiB1l96gzbc/2TkdVeimrhB0NPSrUqDa9UhSksayhOg/l9Yaoq6SyiSyk/ISqFDTjVuDcS1ssNKubNK+YgDKqAk86LxgocBJKqLROkrQOp2GOzTQLHy4Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=constructor.university; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gfnGz2gYcCYAFMYrVIA5qvkqxKRZIiDUQnjmCFX3V/U=; b=Yln1R1NRb9NX09Jh1/JRBxcGbCVHQ7q5g4Go3hjQe9+yGdxe54rXS+psQOvb/n/TH3Om3lcvzeIYswCqwlUq5qwGhZFIR0qg1UqqtOIDvCy9QIcodnxkJP+kackmy7eOFECsymFVPt2PcX8MBGqw38JjDkU6SctWrDVjY0iZQLs=
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jacobs-university.de;
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6) by AM9P190MB1042.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:271::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Thu, 12 Jan 2023 15:46:00 +0000
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::9c2e:527:d0b2:f570]) by GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::9c2e:527:d0b2:f570%7]) with mapi id 15.20.5986.018; Thu, 12 Jan 2023 15:46:00 +0000
Date: Thu, 12 Jan 2023 16:45:57 +0100
From: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
To: Italo Busi <Italo.Busi=40huawei.com@dmarc.ietf.org>
Cc: Andy Bierman <andy@yumaworks.com>, Martin Björklund <mbj+ietf@4668.se>, "netmod@ietf.org" <netmod@ietf.org>
Message-ID: <20230112154557.p2oiqjeke77jl7y7@anna>
Reply-To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Italo Busi <Italo.Busi=40huawei.com@dmarc.ietf.org>, Andy Bierman <andy@yumaworks.com>, Martin Björklund <mbj+ietf@4668.se>, "netmod@ietf.org" <netmod@ietf.org>
References: <cb2ab59f5e0f4142b7d7f2c23d8accba@huawei.com>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <cb2ab59f5e0f4142b7d7f2c23d8accba@huawei.com>
X-ClientProxiedBy: AM0PR01CA0078.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::19) To GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: GVXP190MB1991:EE_|AM9P190MB1042:EE_
X-MS-Office365-Filtering-Correlation-Id: 5a4476ef-3d6d-474e-a1a6-08daf4b41a3b
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: m37uOq2boyYRX2kcA0JuCf5AfJB0vcZXrPVEqxHMLs9qEs2u1BsFOZYKdSeGeRYlRn6iEZYlRZgPL9hsNiYRHsEX4QuSQG/2+ZCqa85HGQRoLjWmR89UhlFMuhPEVI9HQDqZJwiS9x6oUenWTvvta0CkvReLQsfVu2Tir+xw+dDu++3Wqgk9IZTBJV56IqZnkLGJs4aZmUmFoTRwIBhjlVf+t3K6k0tq121qHsXC/d9IMrrwledzfqrtjJzuNZzFZpF3L+q6Ar6r4CWahSRB6CEOIQhmizDBI3m52E5i/ixz4bbW2OQpGslOPVd7IYulU94/eXqgOhdEHDrOqzY+UN3R9+dD370hPmHu4cjAMa2XAUeAMcDAvc1eAz7kXOsTNdyAeL/yTOzIDlbeG8S14fIrIt0xy7uHbSMiDTaIaW99HOEa8+JEKg3KF1KGPRauABSqEvDBVXX9U7BWxElYY+5DMXVQ6ImQ98OERbCknquSoaRoU5qj9fnvKA39neQK0C6/ctyg3tTQtx4+0SC4Szktt6OH6qDoD71PFot04V7K1sT/3rZEGVmPJMrv9MjTbFWTimvQ4Fj2H7WMNCTvl/aR8EoozNmTXCwTdWSALbuMyuYW73yMKr5X2Pff1e4cAGfSl6cbO9+OW6FVPS+iCPpZb3jkV/RrohIIlQ947xOysKxTlTE641GThNLMegpTDyheoL62F//Nw/8Ii9DXT4LKwQJQIYlwpO5HwLTtqbo=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GVXP190MB1991.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230022)(7916004)(136003)(366004)(376002)(39850400004)(346002)(396003)(451199015)(26005)(966005)(52116002)(6486002)(478600001)(1076003)(53546011)(54906003)(186003)(6512007)(316002)(786003)(9686003)(8676002)(66574015)(66556008)(66476007)(66946007)(6506007)(41300700001)(4326008)(6666004)(42882007)(83380400001)(2906002)(3450700001)(8936002)(5660300002)(40140700001)(85182001)(38100700002)(38350700002)(33716001)(85202003)(41320700001)(83170400001); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: tDPYWuAbiD9Uzuuy0DPNoYwTL2XI7ULP1zEoM7gOWi7is1F04seFVrqQ2J3XxxyfdLesbJ5I9A0EGveuwOu9XkJXDYS3MuRT52o0HI8H/JOaMEir2tJipm/pxn/LRZ6GrF7VxwJIMA7sHmRzy47ZnV5CqyHi/PaDkLU97POqj13ke8wAArDz8K6/5lwMOW/p5GnVTJpgiqedAHIAiTfDcJsWhAf0LM5AKPee3iHHMXR+5ALbmj18cnTBBiXumKQhvIA2Qnm4ft1so+pbl+8JGDQUTuh0ikAXvVU6xqdmCeTz/Ncfe3vLVjeNn/YaNxWCuVh8Pn5bcjffYyrVm7w7wiG7SdQWW0CIuMYlBJMCg8trnfSYUGtntJQ9FAxjuh4DdRS4RlZiNCP0qN9k1QirALemNqwlHKtjYDM8jO88LJO3FELpJsHIVFhNDzPweXlfwIl3EJWT+10R6PNrnb2jQb0p8XfvGonSx3TbzydX19ICPVZVvGsNHFXn5Ep/aSAgNmxU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qoaCjET8OJ5CV1J7ZRbjX/dBRutqxKGnfzq7Hjj6aU04fPVYAW1VaM0ek=
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 5a4476ef-3d6d-474e-a1a6-08daf4b41a3b
X-MS-Exchange-CrossTenant-AuthSource: GVXP190MB1991.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 15:45:59.9314 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: qwemIWt5xFdgIMCVKG6gBAIj1g/uY+MbDUf8ybLk740nV6IennwHY8zC61wsWEaYSx9SU5Q+oMss0ycnTRthtxL7IldjcCd2PFbgQ9kVlNY=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1042
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/CDnHUb5EYTNjU6Lea1ghOwobCaQ>
Subject: Re: [netmod] Use of unrestricted string in YANG (was RE: naming scope of a grouping which uses a grouping)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Jan 2023 16:29:18 -0000

My take is that arbitrary limites are worse than no limits.
Robust implementations will reject values that go beyond certain
implementation and platform specific limits.

If anything makes sense to standardize, then it is the minimum lengths
that must be supported, for which we do not really have formal syntax.

/js

On Thu, Jan 12, 2023 at 12:38:13PM +0000, Italo Busi wrote:
> I have seen the comment from Tom about the unrestricted string in YANG on other drafts in WG LC or WG adoption poll and I would like to understand what is the position of the Netmod WG on this issue
> 
> 
> Using unrestricted string is quite common practice in existing IETF standard YANG models, also as in key attributes (e.g., see RFC8343). However, the comments looks valid and it is worthwhile investigating it further
> From the previous discussion I have understood that Martin does not think this is an issue while Andy agrees with Tom …
> 
> I have a mixed feeling about the resolution but I think this is something to be documented either in RFC7950 (update) or in RFC8407 (update)
> 
> For integers, RFC7950 defines different built-in types for 8-bit, 16-bit and 64-bit integers, while for string there is only one type and the length sub-statement is optional
> 
> While it is true that unrestricted strings can cause an implementation to run out of memory, it is also true that in some cases it is not trivial to define the maximum length for a string attribute
> 
> Moreover, I am not sure whether restricting the strings would solve the out of memory: what happens if a huge YANG list is configured?
> 
> What is your view/opinion about using the string type in IETF standard YANG models?
> 
> Thanks, Italo
> 
> From: Andy Bierman <andy@yumaworks.com>
> Sent: mercoledì 21 dicembre 2022 00:30
> To: Martin Björklund <mbj+ietf@4668.se>
> Cc: ietfc@btconnect.com; netmod@ietf.org
> Subject: Re: [netmod] naming scope of a grouping which uses a grouping
> 
> 
> 
> On Mon, Dec 19, 2022 at 5:15 AM Martin Björklund <mbj+ietf@4668.se<mailto:mbj%2Bietf@4668.se>> wrote:
> tom petch <ietfc@btconnect.com<mailto:ietfc@btconnect.com>> wrote:
> > From: Martin Björklund <mbj+ietf@4668.se<mailto:mbj%2Bietf@4668.se>>
> > Sent: 19 December 2022 12:18
> > To: tom petch
> >
> > tom petch <ietfc@btconnect.com<mailto:ietfc@btconnect.com>> wrote:
> > > draft-ietf-opsawg-sap-12
> > > defines a grouping sap-list which uses grouping sap-entry.  The groupings are intended for import by service specific modules.  The uses does not include a prefix; should it?
> >
> > From a YANG perspective this is correct.  Since it references a
> > grouping in the local module, the prefix is optional.
> >
> > <tp>
> > But it will not be the local module when it is used in other modules which is the only reason it is a grou[ing
> 
> It doesn't matter how sap-list is used; it is well-defined in the
> module ietf-sap-ntw.  See section 5.4 in RFC 7950.
> 
> 
> /martin
> 
> 
> >
> > module ietf-sap-vpn
> >  prefix sap-vpn
> > import ietf-sap-ntw
> >  prefix sap
> > container sap-l2vpn
> >
> > list l2vpn-service
> >  uses sap:sap-list
> > .....
> >
> > Does it need to know where to find sap-entry which sap-list 'uses' without a prefix?
> >
> > Tom Petch
> >
> > > The module also has my favourite YANG construct, an unrestricted string as a YANG key.
> >
> > I don't think that this is a problem.  Or rather, if the theory is
> > that we need to have restricted length on strings b/c otherwise an
> > implementation may run out memory, then I don't think this solves that
> > problem.  But perhaps there is some other reason?
> >
> 
> There is an argument to be made that it is better to pick a reasonable length
> and a reasonable character set for an administrative string (going back to SnmpAdminString)
> That way, every implementation MUST support the same set of strings (modulo resource errors).
> 
> I have the same reaction as Tom when I see 'string' as a key.
> Really? The server accepts zero-length identifiers, all-whitespace identifiers, and much worse...
> Probably not.
> 
> 
> >
> > /martin
> 
> 
> Andy
> 
> >
> > >
> > > Copying Martin as he performed a YANG Doctor review earlier in 2022.
> > >
> > > Tom Petch
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org<mailto:netmod@ietf.org>
> https://www.ietf.org/mailman/listinfo/netmod

> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod


-- 
Jürgen Schönwälder              Constructor University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>