Re: [netconf] [Technical Errata Reported] RFC8040 (6342)

Muly Ilan <muly_i@rad.com> Mon, 23 November 2020 12:52 UTC

Return-Path: <muly_i@rad.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 80E503A0A3D for <netconf@ietfa.amsl.com>; Mon, 23 Nov 2020 04:52:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.001
X-Spam-Level:
X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=rad365.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 0k54goc4i75S for <netconf@ietfa.amsl.com>; Mon, 23 Nov 2020 04:52:36 -0800 (PST)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2058.outbound.protection.outlook.com [40.107.20.58]) (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 355B93A0A3B for <netconf@ietf.org>; Mon, 23 Nov 2020 04:52:36 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IU2nS0xcRD8EpvbROOnuPO90cc6usakZN6G0m5mcMP9gO71sl8h7U/4Rp8Vn8394RUpNaZ5sfpHZiehOKD/xsGbKRfiKqBUp2sHniSkyDYDnQkMHVVxqwPLvaXaZBiaX3axbSRJ0H/N7t1dwBcFle/aiv8Qf0bLAm/he0Kod7OQB3+/MxvUe2fyhEom7XfH7GU2S4ZANy5cbh5qzr820bcq0aKGt94QucaU8+035DDLyJmfknfIRhRU2erKQRk90ik/QRkXCFJ5XOmDv5tvufZgpAwAQAnTgZ04Lc4I2dPpbs1YN6/hfOtmem3Rc9S0W5rTgHpsKP7bjMBhZxKBsuA==
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=OLVbmbMG61Q2Xmg2XTeYJ3NMO+VjAxop4xJKMoJHBqY=; b=g2RwnzcHGs09BwbfmvxmUZ5P15dErEHW/p6AzdApCfAXgix3n7cpP+Q/VL5Ni+hTd7ngZVa9ZBIfAQt4NhrDzYFQiOMvQ0I7hSuEIG8eN7giM19OODdVpJCcit+Db0onD3K6FyrIj8uLx2fqLRwBukMLOnpesjdot9Zfz4qCUr3YxeWs7vPN/LAKFGko8DHQOUNBeQyRXqfCM9ujDsmxikDMAC5LFR2iZjqnpsHC5XeELuCxYokTDib9IWiw3ccCDugEw7qnur/z4kcTVRh/cFnHsGb5dRt6hOTF3G6NR1dQnwVffP5WDvs9+DLMGY8qfZka17u/tL43du1+EEqP0A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=rad.com; dmarc=pass action=none header.from=rad.com; dkim=pass header.d=rad.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rad365.onmicrosoft.com; s=selector1-rad365-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OLVbmbMG61Q2Xmg2XTeYJ3NMO+VjAxop4xJKMoJHBqY=; b=WPf1J2g/j+uRRUEMwQBTeJJhro57xJIkZBIP/H3G9Gl9EfC3HW3Xqlxue5qNTIpTXr6U/6OpDjVwxU/7reUjkVqaFo4s4mHFHlYt9GNyU8E60c0gBnc37xOtUyIdRup85eM+lw3j263xFJTY7ozIzYUomYvF06SjGnHqP1ajhvk=
Received: from AM0PR0302MB3348.eurprd03.prod.outlook.com (2603:10a6:208:b::19) by AM9PR03MB6835.eurprd03.prod.outlook.com (2603:10a6:20b:281::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22; Mon, 23 Nov 2020 12:52:31 +0000
Received: from AM0PR0302MB3348.eurprd03.prod.outlook.com ([fe80::eccb:ec09:89e2:cd70]) by AM0PR0302MB3348.eurprd03.prod.outlook.com ([fe80::eccb:ec09:89e2:cd70%5]) with mapi id 15.20.3589.025; Mon, 23 Nov 2020 12:52:31 +0000
From: Muly Ilan <muly_i@rad.com>
To: =?iso-8859-1?Q?Martin_Bj=F6rklund?= <mbj+ietf@4668.se>
CC: "rfc-editor@rfc-editor.org" <rfc-editor@rfc-editor.org>, "kent+ietf@watsen.net" <kent+ietf@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] [Technical Errata Reported] RFC8040 (6342)
Thread-Index: AQHWwRzkciHC9EbDXEyiRm/auJwoyqnVZYeAgAAuWgCAAA5jAIAAAXDwgAAF0AA=
Date: Mon, 23 Nov 2020 12:52:31 +0000
Message-ID: <AM0PR0302MB334833C570C323DA7E3AEE7AF9FC0@AM0PR0302MB3348.eurprd03.prod.outlook.com>
References: <20201122221445.1E11FF4071F@rfc-editor.org> <20201123.093729.325420538444196813.id@4668.se> <AM0PR0302MB3348EBB2C0F57E3B4FD8D7F7F9FC0@AM0PR0302MB3348.eurprd03.prod.outlook.com> <20201123.131452.2154616412508504559.id@4668.se> <AM0PR0302MB33480674E3CAB4D8AB4DCBB5F9FC0@AM0PR0302MB3348.eurprd03.prod.outlook.com>
In-Reply-To: <AM0PR0302MB33480674E3CAB4D8AB4DCBB5F9FC0@AM0PR0302MB3348.eurprd03.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: 4668.se; dkim=none (message not signed) header.d=none;4668.se; dmarc=none action=none header.from=rad.com;
x-originating-ip: [185.223.3.181]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: c616969b-fb13-4ec8-2c16-08d88faea479
x-ms-traffictypediagnostic: AM9PR03MB6835:
x-microsoft-antispam-prvs: <AM9PR03MB6835E29D59E2E1CF10D39C9AF9FC0@AM9PR03MB6835.eurprd03.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:5516;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: aXFgL5B2dH1AKFGd9E8vnBTxXR1fsTjrJsLJUVcpTkcAlzam1lSQR3sOWtp2xQ4QIwABQ7r+0VLij+QXj5Yn5Wl3aVVhrihEH78EdzfLMFQq0JOAMpCH9ZFgjRWqUC145+99BuejDxT0iExN8y5unASfvCGbVBcglS5aVPLN91g7hbEc8IA0Ly6FWrMofXOgbERPn8ybyuMC5wpCq6zLmQGPSb1CpBADvW4Yw8Hu5RX7Pdp8pjQRje5gbbRZFjaPqUrnRVWOcW2Wml7alrRo+p90YMVyYdpLejmhnvEFodClIWGy0R9hy2wGeZDR+gu9DktZKRirWsuF5hqlVQPbdTsTq+CDc4SrNtZ1Ebd5ThtUXU9VtHJjbeNsYX6fbvw/zWhovueFXXESZZtrofkpVA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0302MB3348.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(396003)(366004)(39850400004)(8936002)(966005)(71200400001)(66946007)(76116006)(4326008)(2940100002)(9686003)(55016002)(33656002)(478600001)(26005)(64756008)(66446008)(66556008)(316002)(2906002)(83380400001)(66574015)(54906003)(86362001)(8676002)(45080400002)(7696005)(6506007)(52536014)(66476007)(186003)(5660300002)(53546011); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: TbBMfR6LOPtSAX8nPinwrb/14p090K26e0mgjlC5/XiJnX6SXD59qp6Xds1UR9b+2VedSamYrPFiMvMVQIW8W2u8OIylc+leCOTaeQs1b0OPuxNnA+KdHoHlm//kt5ENHSjaxCVsj/nDqcJp6AKOaVx4QC5Mk9o/zHjrQriKPIbqnoFP1o0NBI5Rf9lleaoMJNGWuf56nDhJCbMcNpUcheFhr0pfsBzj+rYkAAY8OE/zd8Xr4NzbWFS8FvEHSt7AdecE0m6sc4WWi7EtQoQBrWaH28GRMYapj5slFhRcnK+aWCerbZLAsnvXL38TuY7Wv5/+0zLnK2pOJnbr9abwyB3sJWLsaKzyDtCYdLRZ6wQXRF93vsEQsYmFTzk+fqTTJmUv1OPqtqyR4fnYwVQGA9IIBf3EgxpxcnTFOgiwYDyhJAYCJ8BmRs18CTbk+CgCa+ApxnBBWVOptVBBMdUUSikmPpsEkvDsQpDB9/9jOWjwpjZ9hJvOA4+a2ITcyGSZEQaC5kaG4Q01SXcwggGecNnN7OG1I59OP++yqUiaRBweYwjf9LwzbJMo+2WlqxxMtMwiJ+7GQzxEwuq3jZIwj6RB6NZFjXuLrs9EAHGgSH3Ox1irw5TxyfhLX+4MvkUVPgEURyYeYyVW6LPsdGeGI4qmRSrrElQ2hDcSp0hbavxZa+LHtvqF1fnRgk4HxzWWFqDH522r0UEKQiofyzJ/7WoCnZcIvKlN+Lun/R2/oeSYktcwCUP0KcHdoIBGlKw3xL9Q5C/Y0S2i9O7dYxZQta0f2GygPZ9PS0pPgCZSAzmkYnhcNg/b0TsFdFDYAxQsaLWqfqRgC1Ct7WoOTMI4maPzEe04XcPAEhOImbfkaP7RkWMKBvXE3Xugw83qFV38t23ZVjzKryfDewIVuQDkQw==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: rad.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM0PR0302MB3348.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c616969b-fb13-4ec8-2c16-08d88faea479
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2020 12:52:31.8652 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f9047108-cc2c-4e48-97a3-43fad1b3bf9d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: c3aixk10bKAKjSm5H4D52Z3F/mfe/jk+Y7DruzapHcbGZR4sdndxr1LQ8o0XfMUQ
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB6835
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/I0lgiRg69wYGQJcIsSb1Wg6tqDU>
Subject: Re: [netconf] [Technical Errata Reported] RFC8040 (6342)
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG 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: Mon, 23 Nov 2020 12:52:39 -0000

Hi Martin,

Putting aside the similarity or not between plain PATCH and PUT, there's another example of inconsistency with plain PATCH in the RFC.

Please check the plain PATCH example in appendix B.2.5. " Edit a Data Resource".
This example has keys both in the message header and message body.

This means that either the example in 4.6.1 or the example in B.2.5 should be modified. 

Section 4.6.1 includes the following text:
"
If the target resource represents a YANG list instance, then the key
leaf values, in message-body representation, MUST be the same as the
key leaf values in the request URI.
"

If keys are not needed in the message body so this "warning text" is not needed either.

Moreover, since the above "warning text" is part of the RFC, it suggests to me that the RFC assumes that there are keys in both header URI and body.  


Best,

Muly

-----Original Message-----
From: Muly Ilan 
Sent: 23/11/2020 14:26
To: Martin Björklund <mbj+ietf@4668.se>
Cc: rfc-editor@rfc-editor.org; kent+ietf@watsen.net; netconf@ietf.org
Subject: RE: [netconf] [Technical Errata Reported] RFC8040 (6342)

Hi Martin,

Plain PATCH is defined as a merge operation i.e. it can create a resource.
It's not limited to editing of existing resources.

>From section 4.6.1:
" The plain patch mechanism merges the contents of the message-body with the target resource."

" Plain patch can be used to create or update, but not delete, a child resource within the target resource."

It's better to have consistent examples.
I suggest either to modify the plain PATCH example or the PUT example.


Best,

Muly


-----Original Message-----
From: Martin Björklund [mailto:mbj+ietf@4668.se]
Sent: 23/11/2020 14:15
To: Muly Ilan <muly_i@rad.com>
Cc: rfc-editor@rfc-editor.org; kent+ietf@watsen.net; netconf@ietf.org
Subject: Re: [netconf] [Technical Errata Reported] RFC8040 (6342)

Hi,

Muly Ilan <muly_i@rad.com> wrote:
> Hi,
> 
> If list keys are not required in message body for plain PATCH then 
> they are also not required for the PUT method.

You are right that the keys are redundant also in PUT.  However, PUT means completely replace or create the resource, but plain PATCH modifies only the given fields.


/martin


> But the example for PUT in section 4.5 is:
> 
> PUT /restconf/data/example-jukebox:jukebox/\
> library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1
> Host: example.com
> Content-Type: application/yang-data+json { "example-jukebox:album" : [ 
> { "name" : "Wasting Light", "genre" : "example-jukebox:alternative", 
> "year" : 2011 } ] }
> 
> So, do we want consistency between PUT and plain PATCH?
> 
> I believe consistency is important and currently the RFC contains two 
> inconsistent examples.
> 
> 
> Best,
> 
> Muly
> 
> 
> -----Original Message-----
> From: netconf [mailto:netconf-bounces@ietf.org] On Behalf Of Martin 
> Bj?rklund
> Sent: 23/11/2020 10:37
> To: rfc-editor@rfc-editor.org
> Cc: kwatsen@juniper.net; netconf@ietf.org
> Subject: Re: [netconf] [Technical Errata Reported] RFC8040 (6342)
> 
> Hi,
> 
> The issue boils down to if list keys are required in a plain patch.
> Unfortunately, the RFC doesn't specifucy this.  From a technical pow, 
> list keys are not necessary.  In fact, if they are present in the 
> payload, they are redundant (since they are part of the URL) (this is 
> actually mentioned in the RFC).
> 
> Since it isn't clearly specified, I think we must assume that the keys 
> are not required.  Hence I think that this errata should be rejected.
> 
> In a future version of this document, the behaviour should be 
> clarified.
> 
> 
> /martin
> 
> 
> RFC Errata System <rfc-editor@rfc-editor.org> wrote:
> > The following errata report has been submitted for RFC8040, 
> > "RESTCONF Protocol".
> > 
> > --------------------------------------
> > You may review the report below and at:
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> > rfc-editor.org%2Ferrata%2Feid6342&amp;data=04%7C01%7Cmuly_i%40rad.co
> > m%
> > 7Cf7ffd30dde054f875cc608d88f8b0eed%7Cf9047108cc2c4e4897a343fad1b3bf9
> > d%
> > 7C1%7C0%7C637417174712193376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > wM
> > DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2
> > nm
> > LthW5HkwRvJZi%2F2Pj6%2B9qkLV9gV55wiBpIoiC%2FD4%3D&amp;reserved=0
> > 
> > --------------------------------------
> > Type: Technical
> > Reported by: Muly Ilan <muly_i@rad.com>
> > 
> > Section: 4.6.1
> > 
> > Original Text
> > -------------
> > To replace just the "year" field in the "album" resource (instead of 
> > replacing the entire resource with the PUT method), the client might 
> > send a plain patch as follows:
> > PATCH /restconf/data/example-jukebox:jukebox/\
> > library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1
> > Host: example.com
> > If-Match: "b8389233a4c"
> > Content-Type: application/yang-data+xml <album
> > xmlns="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2
> > F%25
> > 2Fexample.com%2Fns%2Fexample-jukebox&amp;data=04%7C01%7Cmuly_i%40rad
> > .c
> > om%7Cf7ffd30dde054f875cc608d88f8b0eed%7Cf9047108cc2c4e4897a343fad1b3
> > bf
> > 9d%7C1%7C0%7C637417174712193376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > Lj
> > AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > a= hxW6LA8t%2BNRka2GGRqRNsTnK2itYH1rRLnOxU7JbNlc%3D&amp;reserved=0">
> > <year>2011</year>
> > </album>
> > 
> > Corrected Text
> > --------------
> > To replace just the "year" field in the "album" resource (instead of 
> > replacing the entire resource with the PUT method), the client might 
> > send a plain patch as follows:
> > PATCH /restconf/data/example-jukebox:jukebox/\
> > library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1
> > Host: example.com
> > If-Match: "b8389233a4c"
> > Content-Type: application/yang-data+xml <album
> > xmlns="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2
> > F%25
> > 2Fexample.com%2Fns%2Fexample-jukebox&amp;data=04%7C01%7Cmuly_i%40rad
> > .c
> > om%7Cf7ffd30dde054f875cc608d88f8b0eed%7Cf9047108cc2c4e4897a343fad1b3
> > bf
> > 9d%7C1%7C0%7C637417174712193376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > Lj
> > AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > a= hxW6LA8t%2BNRka2GGRqRNsTnK2itYH1rRLnOxU7JbNlc%3D&amp;reserved=0">
> > <name>Wasting Light</name>
> > <year>2011</year>
> > </album>
> > 
> > Notes
> > -----
> > Missing key leaf value in the message-body (<name>Wasting
> > Light</name>)
> > 
> > Instructions:
> > -------------
> > This erratum is currently posted as "Reported". If necessary, please 
> > use "Reply All" to discuss whether it should be verified or rejected.
> > When a decision is reached, the verifying party can log in to change 
> > the status and edit the report, if necessary.
> > 
> > --------------------------------------
> > RFC8040 (draft-ietf-netconf-restconf-18)
> > --------------------------------------
> > Title               : RESTCONF Protocol
> > Publication Date    : January 2017
> > Author(s)           : A. Bierman, M. Bjorklund, K. Watsen
> > Category            : PROPOSED STANDARD
> > Source              : Network Configuration
> > Area                : Operations and Management
> > Stream              : IETF
> > Verifying Party     : IESG
> > 
> > _______________________________________________
> > netconf mailing list
> > netconf@ietf.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> > ietf.org%2Fmailman%2Flistinfo%2Fnetconf&amp;data=04%7C01%7Cmuly_i%40
> > ra
> > d.com%7Cf7ffd30dde054f875cc608d88f8b0eed%7Cf9047108cc2c4e4897a343fad
> > 1b
> > 3bf9d%7C1%7C0%7C637417174712193376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM
> > C4
> > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> > da
> > ta=GOd8xUYLJ9C69r7aN6rujBhsYFJd05CxiHNXT9YXOZ0%3D&amp;reserved=0
> 
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> ietf.org%2Fmailman%2Flistinfo%2Fnetconf&amp;data=04%7C01%7Cmuly_i%40ra
> d.com%7Cf5c6b052c9fe4dd9c64308d88fa96449%7Cf9047108cc2c4e4897a343fad1b
> 3bf9d%7C1%7C0%7C637417304990448682%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4
> wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sda
> ta=SOPMijRWiUHA%2BpJnmxGJ4%2FLWqneTaFwfyIpdpuFl5yU%3D&amp;reserved=0