Re: [netmod] Client validation text [was RE: YANG Versioning Weekly Call Minutes - 2021-04-06]

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Thu, 08 April 2021 17:59 UTC

Return-Path: <jason.sterne@nokia.com>
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 15DDA3A14B6 for <netmod@ietfa.amsl.com>; Thu, 8 Apr 2021 10:59:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=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=nokia.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 rOdbooaxJFao for <netmod@ietfa.amsl.com>; Thu, 8 Apr 2021 10:59:00 -0700 (PDT)
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2130.outbound.protection.outlook.com [40.107.93.130]) (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 6934B3A14BB for <netmod@ietf.org>; Thu, 8 Apr 2021 10:59:00 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RdSWlh1mT5+Yr95vD0rxBU37AVTT90vwysKELxdyfvZ07fQvP7MQ7EErAB7hPOP0W5GVT7TkiJXPfFNvNXNOAP5FLM+qcRpolIQ/4WKUnIB86RxvDfXh5rVK/rTyIHaHow98xg5mZywrrdbSjGbkUqTBCw5zWG7NMthw+dGq2saz08fOxayXTAldlK4lGOfhM+rahc1Dla1mZl6WLYhLd8LI7sI24GOCXwynyvKjJhcUC6FAMZFA+23GvGkaaJhZ5pC6u2R5nytP6TEN4MJ9fQYNEW7V46yO5KAaipW2KT9A/WGbaTZOKamLsWKslzrr2kRwwpBxgCqU3iPc0k+mWQ==
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-SenderADCheck; bh=4x3suUSj9TP/rDrgUVVZ+wBuwq/4XyOacj0ziS1SR6g=; b=lkRh16PCfCXnkIK2hArHIj8CseNnOC4du24o/0W/PJ34IYU1ZlZj2HpS9S1toChNLWuYeX4z4e+paiNoOIuzqbpw7mFiFDxauQZb6xxoaSLKBZDqFDW9QCLVTifhU/YsrYmEKWXbGja2CBYFkung7s3A7mIXzhBXm/6bbOHCogZGGkQxJtvbcrl58acPeip4ziy9DFj1nLxvdMWNmnUbNJOi+RItHf1xoER/YwbOLhz6XlNl7t4Bl6GkIqQFTmIw7y2A6OywE4poGE1i9MZlDcSiO4fhqOqGVqRHQmUaxfV7w6HixvysIZ4uBKbqL2US4XGfyA2iLT+a6LALuUEMsA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4x3suUSj9TP/rDrgUVVZ+wBuwq/4XyOacj0ziS1SR6g=; b=IFmLx4KfK5dcLQg9SkPzGV+B+/p2Th1Pz//mpk1F+zNEZK3zfkoCerqU3WOEqw/R/5IO+/qx6wPLyhLs68XdTxBDqc+6aYf6mXUdIdRKwoKx0wM4LC3Vw+0FHG2qPvAkw1ACpY6cd8hWS58EkaA3tHE9xCwlnI8jQTwuXZBfLWk=
Received: from DM6PR08MB5084.namprd08.prod.outlook.com (2603:10b6:5:41::29) by DM6PR08MB5803.namprd08.prod.outlook.com (2603:10b6:5:17e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Thu, 8 Apr 2021 17:58:58 +0000
Received: from DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::4c19:5c12:5ed6:96df]) by DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::4c19:5c12:5ed6:96df%4]) with mapi id 15.20.3999.032; Thu, 8 Apr 2021 17:58:58 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Client validation text [was RE: YANG Versioning Weekly Call Minutes - 2021-04-06]
Thread-Index: Adcrjvs0u1Y2kX7cTWaMCLlk2EmADgBEca5w
Date: Thu, 08 Apr 2021 17:58:58 +0000
Message-ID: <DM6PR08MB5084935EDB6AB7718B695BAA9B749@DM6PR08MB5084.namprd08.prod.outlook.com>
References: <MN2PR11MB4366255A77C76D9004360169B5759@MN2PR11MB4366.namprd11.prod.outlook.com>
In-Reply-To: <MN2PR11MB4366255A77C76D9004360169B5759@MN2PR11MB4366.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: cisco.com; dkim=none (message not signed) header.d=none;cisco.com; dmarc=none action=none header.from=nokia.com;
x-originating-ip: [23.233.24.194]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 49a4272f-61ab-4e96-93c4-08d8fab7fbda
x-ms-traffictypediagnostic: DM6PR08MB5803:
x-microsoft-antispam-prvs: <DM6PR08MB5803BEC805C5D70CA16F31F19B749@DM6PR08MB5803.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: DbQRIx+2855Kpsfzy08wMrYcbd9KTbY1VyV61vssfDZhlpMlweEafcskWqTow4FdKNYamfCoBlABklETiTK1gAPM+jMXqf/l8T/SkEQVWvdxcfSowhl4esiaLxJxGY6t1qeD8DPnhbLYPVO2rP7UBpZuUP9nwe4iaBIDhPKBGITkZUNWe4frsv8oeF1UVkw/n/JOO+/DJgkzkpLxPj8fAO+EFS7UkzwZBSfaMt5xtNjLEIQYsv1exmxwysoTRX3jKdMHWtFFqlQBIQoyQGl0xzomGeD0FiBHol/xG1KXVwr3+dqRar9pz4IlRBRySnzzhT3o5IXcF42CVxzmEtE/APJhDbtkeIaqRIQVVHXI2CPLhKrr6vHfT/5Nf21BjpONlZTMe5DH+FwnoLopB8UHg9je+7GFSQXDqao+oJ7EdzJEnPDSwh/IuDoO9Wq0/nqqntzEctS2Tua/JFwF3NqecsrYhbIM8uJ/S1Md3D3VOnRfXPmw/dUj1im0PLL1K45XjyayYD2burNqUfYyfG/kN/Af2MQoDb6h1GzUmtxQIiwezM2XLpy72eLYBGVylHfQ/EVb25bE0DXB1tbU7k/b7Ldqdigr442oTeoW3ZhY/8vE2reCdVZVgd7DxHbV9Mp6aiZgS/1eTPlc0SjHfygDHbinqzaxrAGwgaBCIdYx53u1uzwjAbDFq83oQ7NPuIuyzzKE+thhE3A4VxA6dDWkGdTRNrlkV62rESPp+5M88fo=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR08MB5084.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(376002)(346002)(39860400002)(9686003)(16799955002)(9326002)(86362001)(52536014)(64756008)(38100700001)(8936002)(8676002)(2906002)(55016002)(83380400001)(66446008)(71200400001)(186003)(166002)(66556008)(316002)(66946007)(5660300002)(478600001)(7696005)(966005)(76116006)(110136005)(53546011)(26005)(6506007)(33656002)(66476007); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: emfpQqNfj6GbimBSacH+6LGIph2W6bU1/VFkvx8EyxNVbivcznXidb9TAJVpC1oZEgpfmRb1ahszM5JXjEflSgHdb3+tRP072o3x342WecCa3WoF2Mk+b8iW889SG7NMHiR6EtSkI3kNJEIUmlMTJTNuwjsYQqXj7iCoa4vSJhZLoj5QlFVblKBZepfZGi7iGR/JKy25NiVKmOouCr3g3fvrqRJhAfqzTdSBSG84GtnIG9wZ2jjAkUUwN8knxYaqB1+p7di364VHRi02KwMHVJKf5oimZAkJp/ktsFIqL12kXuoVal6vTWzgmUn0RQcuc9diZ70peXHFpaEO1fnPAzReixhY5gJ0R/OgNGINN/QeU7jAdJ07e4+XKC7BJsGDPBIDeiNBXtoeE6jOTFpSn+hsmsBoAkvJ+3YX/WN4oMpFnl//veZTvCTvJnWZmLj80LLwhd0YWspnf7t/4fzG3ymuqrjNXB8xDEl9FMCahZ0/T29DdsLV4u9Hk8BJblWB1U3q8h9/SX2r9X/9oy5lZPlZAROC2AdemrOV0y6AXF5kDTCmBR6rb7LWTOHDuC1MqhYo7LYNro5Ox6iSfI7zt7afyE36rEVjk9rX5PqpGLY2SA9+dfNRe9RqFqwacWdYdXytEMjwzyxgFoT5bUSPSCo4o1xgKyHkrOqMg3eGjtGPvdSFpVNJ7VOfmBvOUCX5/Jq92uUNaeHkEHRAII/1DEJlM7S3rHr8VWN7q8/UfDlgHfSSpwnRWUDAOSTtlE84Henjopk/2K5XK5wwh/krDtvO0b1V95w2SQQE5V96C3JqyfY2EAZWO5BmKS1Q+ziC4LbpxuWHOGuAkIyuvCpFhTt3Yf7cAhNCxkF/xnQ3SDRWq3cSJACq+ERcXilgEXn7QAhFrlbYPwOvnz1xFXRBsYP7g0iOGPIXx6g1j2TUUlT8J+LImhPxEL5PAYVaS6OXGLTRzAwfjcv7T8LK5Qvtb2MTRYAqlSP/u2d6nQmBoN9Amqda3bCW2U8Z6BAKeyFbnVAsNgXtPQMnvID3VagcdhAM+eEjMrCoEadNFUnIJXwcLTGdib96DlRvyq7FNfhb9KXDctbjGMv/cOu9+WGAYxHk+fdZMn5/j9OMcIol3KN40lHspb2On1MJMz/FRGqU2Y2XA7D+NpgcSTIR0xy7HDDtwebQODsPokXnMuk2Ev2Jhb7+NlRZDoXZYjEpQ6quxIkCS+X+H3tG73DxYAZuQkb/5f9/EiisNwAT7gMCsF1zjOm2XZqvidq/eNlQx9jZWNcMMUY2xS3ZFnyy4v2uzpLHXk0iIVAWsKGgnEe0L754vZc4OMTUCkbaCQ8VtTl8
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DM6PR08MB5084935EDB6AB7718B695BAA9B749DM6PR08MB5084namp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR08MB5084.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 49a4272f-61ab-4e96-93c4-08d8fab7fbda
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 17:58:58.2801 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: /qcODRAtEiVrm2dJL9C9AbMCqqX/WRQ3en3R/0YomNOn6pquWBAz0ni4Vw73JDR+BdYxQ0vAXShDQQeov9LwSw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR08MB5803
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/BYLjBWLtobc0jHV2PX66w3bDzPM>
Subject: Re: [netmod] Client validation text [was RE: YANG Versioning Weekly Call Minutes - 2021-04-06]
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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, 08 Apr 2021 17:59:06 -0000

Hi Rob,
I like the reformulation of this.
Jason

From: Rob Wilton (rwilton) <rwilton@cisco.com>
Sent: Wednesday, April 7, 2021 5:19 AM
To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>; netmod@ietf.org
Subject: Client validation text [was RE: YANG Versioning Weekly Call Minutes - 2021-04-06]

// As a contributor

Hi Jason, all,

In yesterday's meeting there was a discussion on this text, and Joe pointed out that any sensible client must validate its input.

   While incoming configuration data is checked according to YANG
   constraints, constraints on state data sent by the server MAY or MAY
   NOT be enforced.  The following guidelines are provided for client
   application designers to allow a smooth interworking with servers.

   o  A client MUST tolerate any data received (or not received) without
      crashing.

   o  A client MUST be able to discard any data that is not part of the
      model but is sent by the server additionally (e.g.  XML elements
      or attributes, JSON properties).

   o  A client SHOULD be able to handle valid parts of a received data
      set even if it discards other parts as invalid.

   o  A client SHOULD be able to handle data that is outside the
      valuespace defined, as long as it is of the same basic type.

   o  A client SHOULD be prepared to handle more items for a list or
      leaf-list than what is defined by the model.

Based on Joe's comments, I suggest that this text could potentially be written as something like:




   Client applications are expected to perform sanity checking of data

   received from a server and to handle unexpected or missing data

   gracefully, e.g., this could include ignoring unexpected data, or

   logging unexpected values for further analysis.  Clients SHOULD NOT

   discard an entire response from a server because some data contained

   within the response is not expected.  Examples of well-encoded but

   unexpected data received from a server may include:



   o  Values that are outside the value space of a data node defined

      in the YANG schema, but that are within the value space of the

      underlying base type, e.g., if the value represents an unexpected

      error condition on the server.



   o  Additional data nodes, e.g., if the server implements a

      different, but compatible, version of a YANG module.



   o  A greater or lesser number of list or leaf-list items than the

      permitted range defined in the YANG module.



   o  Non mandatory data nodes that are sometimes missing from the

      response.  Noting that the server is expected to deviate any data

      nodes for which it will never return values for.



   o  Values that do not conform to the semantic constraints of the schema.



   o  Additional YANG meta data in the encoding (e.g., XML elements or

      attributes, JSON properties).



   NMDA [RFC 8342], section 5.3, provides additional constraints on the

   data that a server can return from the operational state datastore.


Thanks,
Rob



From: netmod <netmod-bounces@ietf.org<mailto:netmod-bounces@ietf.org>> On Behalf Of Sterne, Jason (Nokia - CA/Ottawa)
Sent: 06 April 2021 15:10
To: netmod@ietf.org<mailto:netmod@ietf.org>
Subject: [netmod] YANG Versioning Weekly Call Minutes - 2021-04-06

YANG Versioning Weekly Call Minutes - 2021-04-06

Focus for this meeting was going through Jason's review comments for section "3.1.2 Backwards-compatibility rules for config false and output data" of https://tools.ietf.org/html/draft-ietf-netmod-yang-module-versioning-02.

(A)
Valuespace:
- value space (with a space between the words): use 7950 meaning/definition (remove the definition in our draft)
- make "must" its own bullet
- don't particularly address "description"
- Balazs propose updated text

(B)
replace this:

"an additional state leaf can easily be discarded"

with this:

"the presence of an unexpected state leaf is not typically a problem and may be ignored by the client"

(C)
replace "config=false data" in the 1st paragraph with the following (and keep the quotes - that is how RFC8342 presents it):
                "config false" data

(D)
Lots of debate about the "client" bullets in 3.1.2.  Didn't conclude.  Perhaps just summarize and say clients need to sanitize data (give examples of data they might get, values outside range)

ACTION: focus on reviewing section 3.1.2

----------------------------------------------
Weekly webex call details:
Meeting number (access code): 171 069 0374
Meeting password: semver?
Occurs every Tuesday effective Tuesday, September 1, 2020 until Tuesday, August 24, 2021 from 9:00 AM to 10:00 AM, (UTC-04:00) Eastern Time (US & Canada)
9:00 am  |  (UTC-04:00) Eastern Time (US & Canada)  |  1 hr
https://ietf.webex.com/ietf/j.php?MTID=ma7627a2ae7b770537cff5f5b89293c70
Tap to join from a mobile device (attendees only)
+1-650-479-3208,,1710690374## Call-in toll number (US/Canada)