Re: [babel] [netmod] NULL value for uint16

Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> Tue, 14 September 2021 23:53 UTC

Return-Path: <J.Schoenwaelder@jacobs-university.de>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 123DF3A37B8; Tue, 14 Sep 2021 16:53:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham 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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9aKYsC-wx6ug; Tue, 14 Sep 2021 16:53:25 -0700 (PDT)
Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40087.outbound.protection.outlook.com [40.107.4.87]) (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 3B58F3A37B5; Tue, 14 Sep 2021 16:53:24 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cIIqjCjn4FehgqB4aVzSoeef/iFTgFQwe94SRzaTY+jfaVOPd1poLl0ZAsFQpo7L/LYk91Q6NloAR4Ljxx/16DlM8zPNFfLGQOecpEbXpTLkSxbl3zPJ56Id//cQAZsMk9l6WPWCjjQYEDPFhpN6xVkkvez+OLnYRvAGAPkWvGYHjNehYqdEUPORwgMMRQF01805yyMMqEM+sQDLBuhaoR/XoS9N6cNcUp7sTTrWPsAbSuAykyVOSxlRn5TtvUHHG7BuBlW5871NFyxyyURbEH2+rvVsKeEDHJHTXVANMXm+2bcN1yeJRnkEn6Z8/PjxftCMT+w4WC0lazaexXpOHQ==
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; bh=6P9XIcPKByzN0tOVWbWhYdrx6hD7rKubDHAG6qMe4Ws=; b=Q02jZ//upKeoheZnH2FZC9lZ/pJ/KXpjwPvQMNYVO5HEFWkX5WRorHe5NlK0BYaonjBxbwp2n9c1zkhTTeaoW2s9vbi9x0vMptXSVImcRQ5diFoU7r8wIAcfPew8q/4ufXooBlq223SqhFN7yOptGoCHEi8CYJ03npBSud7W/EqO4+z1ilkfAKJmyJjGVYOfN+YjJMnDA/58CF6ny/CRxiJv+QOmCgFfSOt1w9hUdR7iNwJqkzWDCVLhkLLUgPvwDq3IsQmQo7XsdIfUhuYwqNKiJ8UroRq+WAs8igvjBiKOh2if8skinPMPh5vJLp9gq5GTEWR30pv3iJ3AVTWoGA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; 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=6P9XIcPKByzN0tOVWbWhYdrx6hD7rKubDHAG6qMe4Ws=; b=ruQ5w7FUj7qpa1D1I0rE0/o/8nPDOy4xugQqmY3Wra2u7iRgsxjxU/kCbvEw0+HZetT7iAtUva7SgRi8+kQem7d4CKOyfc0SyLf6UXqldC+/e4+Uv8IYQdOfZMdbLSa+1TE9GISMzKEQXQulNXX7B7wxfXcGo3ySYh6xstla7LM=
Authentication-Results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=jacobs-university.de;
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23) by AM9P190MB1267.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:264::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 14 Sep 2021 23:53:20 +0000
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::6539:572:25dd:e6ab]) by AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::6539:572:25dd:e6ab%7]) with mapi id 15.20.4500.019; Tue, 14 Sep 2021 23:53:20 +0000
Date: Wed, 15 Sep 2021 01:53:19 +0200
From: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
To: Carsten Bormann <cabo@tzi.org>
Cc: "netmod@ietf.org" <netmod@ietf.org>, "STARK, BARBARA H" <bs7652@att.com>, Babel at IETF <babel@ietf.org>
Message-ID: <20210914235319.is4x5nzuqdz26dv4@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Carsten Bormann <cabo@tzi.org>, "netmod@ietf.org" <netmod@ietf.org>, "STARK, BARBARA H" <bs7652@att.com>, Babel at IETF <babel@ietf.org>
References: <20210910200902.bic4rhyhp75bgsjz@anna.jacobs.jacobs-university.de> <BBC6AA9F-86C1-4A9C-86FD-AD77668CA9D9@gmail.com> <20210913200455.xot7lihpmqiemm5c@anna.jacobs.jacobs-university.de> <DM6PR02MB69248D2780D5C880CC647783C3D99@DM6PR02MB6924.namprd02.prod.outlook.com> <AM7PR07MB6248BBB558136D1E6F8C1549A0DA9@AM7PR07MB6248.eurprd07.prod.outlook.com> <DM6PR02MB692446F49506791E90B0D23EC3DA9@DM6PR02MB6924.namprd02.prod.outlook.com> <20210914171729.ph5q77zm46z3zvxi@anna.jacobs.jacobs-university.de> <FAE5986C-BE56-44A9-A6A5-1A37D9539F61@tzi.org> <20210914191618.khcicr6o4x5sdki3@anna.jacobs.jacobs-university.de> <21E40C00-5C1B-4C54-9CDB-B99AC14B1F3E@tzi.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <21E40C00-5C1B-4C54-9CDB-B99AC14B1F3E@tzi.org>
X-ClientProxiedBy: AM0PR02CA0144.eurprd02.prod.outlook.com (2603:10a6:20b:28d::11) To AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (212.201.44.244) by AM0PR02CA0144.eurprd02.prod.outlook.com (2603:10a6:20b:28d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Tue, 14 Sep 2021 23:53:20 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 2abdddce-c058-40e2-0a1a-08d977dad489
X-MS-TrafficTypeDiagnostic: AM9P190MB1267:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: <AM9P190MB1267049E126648BA40981F06DEDA9@AM9P190MB1267.EURP190.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:8882;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: /x1EW+7V8GwkcUGABgbnu7yhCDIqV5Z3KjqMVjl1fr8rc0bCuMUcQmRSk6r32Jsj3vkImeN/wTdIgvrKTXc9/kLe7dGaDwcv12oLxy4n4IPIBhAzQvV5rc/SL0BJm9/R53P6HOzcM4oxUWIgo0B8SnlL3dhHcs4j3eLE6HZILddD/J2UqU65/G5HL/xl8GD4p8cKUbk91OzDHBQJKLil1j0MgYYLjEqrzBlG9v6IpdoxipzLEn/mKXJ6x/usLYygVlg7EZA2PPNkAY/FbLPMlj/CZ9qiyKxkhIIh7czCcXQmgxSGt2VoqRuJBvx2o7iMFt0SoWdLwJExK0lCm/QFAcgCEFapcCaFYeUewJ+tZMSj0ZyCk5tuTfhBDmIHG4brZ9vkq2YuIxFTJFoDMlbGb35SJuuKWo6YP7xl7WbbkXyiGAnkbnTmgWxwOudm8MZ+9mupnpKLifwbxavEXPMzvjKp4pn4R6HQPKd09G1/8PnXPN7kDu2LeY+d6dEhdiMQdimDflD3l/pNRlqF9qZ5Z4m8mkB+C2cj+ZJ4P7CTeNMduVJ4VRZ/n6az647MCjMCjccKKvf7hTU1GmYGs3fvycR3gb2/EfuQxMLbAf5kmE9aPhuf1h0wvIFmEChvjUI2zih17DMXXlUqKyRcZC6llilS1WZnzqMXclACEGnEHAdNNoCPE17bVGIulyNvt2UtpZtnaQslGu8gqr9RtGnRd7IG20NDWJa4+wfvnp+Mxgmxmy9lMnSHVw+LodQGx5C7aERuIzR28xvwzxyVbuCs6wF1hKsMTqU7uJ+WZ2fVtBM=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0P190MB0641.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(5660300002)(54906003)(52116002)(6496006)(85202003)(508600001)(38350700002)(1076003)(8936002)(8676002)(956004)(6916009)(40140700001)(86362001)(2906002)(83380400001)(6486002)(186003)(316002)(85182001)(3450700001)(26005)(66476007)(66946007)(66556008)(38100700002)(4326008); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: ujhvX61S3/0Ogzq6IN5AMBsFy2REE59OaptOqDLhts+yc3oLP451S7frCW+/6+hsrBgbLCHg2NW3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Xr/+KAUsGIiA3naDpVQygMqjXbtc+npumBE2RHks/csFDBuxV+jnvbn53eRc80mK4c46FnHHFsVhEYIHYlIMkuLKK6u6PAwmdqIvQdJuT6yJnCkZvNSXRM5rLgnhfb8/5s3cgQ636PhX9wjgelguOcQrHFkkBZNd74NvO6/Z0K1qjF9B+6NcaX7vEvC4P68fsf+GB/uZQQE
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 2abdddce-c058-40e2-0a1a-08d977dad489
X-MS-Exchange-CrossTenant-AuthSource: AM0P190MB0641.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2021 23:53:20.3923 (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: vTN8c5kwa0+Y5RIQb0v8RNC3G5t14AnJ6KoCi2QdaOjcLktPfzRWpCujTIxhsDjOrCQpm4mIqdn5FsMDHNfCSnMSl/bYFYI1MxBNoW8dlOI=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1267
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/OZ29DBEXZbkITSvb4Zt4IxGsCSk>
Subject: Re: [babel] [netmod] NULL value for uint16
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Sep 2021 23:53:30 -0000

On Wed, Sep 15, 2021 at 01:01:11AM +0200, Carsten Bormann wrote:
> > If BBF already
> > defined to use -1, so be it.
> 
> That works for me and is consistent with the information model in 9046.
> 
> What I find not so great is the side effect of going from uint16 to int32.
> 
> I don’t see a big difference between
> Optional-uint16 = uint16 / -1
> and
> Optional-uint16 = uint16 / empty
> 
> I do not like
> 
> Optional-uint16 = int32

YANG leaves the bits business to the encodings. In YANG, you can of
course use

   type int32 { range -1 | 0..65535 }

and then its left to the encodings. Im XML/JSON, -1 is 16 bits and
65535 is 40 bits - and the name of the leaf is likely worse. I am too
lazy to lookup what the CBOR encoding would do with the range...

> > The alternative is to not instantiate the leaf if there is no value
> > and to accept that a client can't tell the difference between 'there
> > is no value' and 'the value has been suppressed by authorization'.
> 
> Interesting.  I wasn’t aware that this cannot be distinguished in YANG.

I have to correct what I wrote. Its the leaf that is suppressed, not
the value.

In XML, if <foo/> does not exist, the client gets nothing. If <foo/>
does exist (and it's value is empty in this example) and authorization
rules say 'don't tell the client', the client gets nothing. A client
not getting <foo/> can't decide whether there is no <foo/> because
<foo/> does not exist or authorization prevented access to <foo/>.

Authorization is not part of YANG. NACM started as an extension to
NETCONF in order to control access to data. Initially the acronym NACM
expanded to the 'NETCONF Access Control Model', RFC 6536.  The revised
NACM also works with RESTCONF (and likely other protocols) and hence
the acronym now expands to the 'Network Configuration Access Control
Model', RFC 8341.
 
> But an “empty” would be present if it is chosen, no?

You grant or restrict access to <foo/> and it does not matter what
type <foo/> has or which value <foo/> has (if it is a leaf) or whether
<foo/> is the root of a deeply nested tree (if it is a container).  If
a client has no permissions to read <foo/>, then <foo/> is silently
omitted.

Things are different if a client attempts to create/write/delete
<foo/>, in this case the client will get an explicit authorization
failure error. For the details, see RFC 8341.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>