[Netconf] ietf-restconf-server: how to configure/express what encodings a server supports

Kent Watsen <kwatsen@juniper.net> Thu, 28 June 2018 20:53 UTC

Return-Path: <kwatsen@juniper.net>
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 6EA77130EA7 for <netconf@ietfa.amsl.com>; Thu, 28 Jun 2018 13:53:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
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 YsBCCPpSziWs for <netconf@ietfa.amsl.com>; Thu, 28 Jun 2018 13:53:14 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (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 9534F130E5E for <netconf@ietf.org>; Thu, 28 Jun 2018 13:53:14 -0700 (PDT)
Received: from pps.filterd (m0108161.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5SJEl7O016734 for <netconf@ietf.org>; Thu, 28 Jun 2018 12:16:29 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : subject : date : message-id : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=WQgn9x2av90BKKa2FO0wxJ62Y6qVn/D15r5x3O2kquI=; b=o1/4/mfksTKXlUJr/3UZEJ3OrEHDB6J6l6IlTOlCsEVIGqx7AMJdb1JRrEc8giIUWPFF Cuzrikny5Q6vmwTJnEs7a/72ZXr1tdkyrZP/3D3bTUoJBMNDLraGwkBvOIpB8/XyJNkV eCj9heyQYZGqYC7PV+Wp3qfWTVGmyT1+aMf4Xa8KJ4PqS76iBq7i2OJ2Ew7LVHZeznqW WRWpqR3OgSldORttMw6xt4o+h9o3uWUoP5pTH7KFIZRa+NQ9wQfPkDZcbgLfOJfmIFv8 KsXGe0eiCqVBlZQ2k8l8o5+SoZa+FtjAG2sVDTDYES5IhIf0NwcNxbzWKAnfJ6A/tTjn iw==
Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp0119.outbound.protection.outlook.com [216.32.180.119]) by mx0b-00273201.pphosted.com with ESMTP id 2jw3278ee0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <netconf@ietf.org>; Thu, 28 Jun 2018 12:16:29 -0700
Received: from BYAPR05MB4230.namprd05.prod.outlook.com (52.135.200.153) by BYAPR05MB4423.namprd05.prod.outlook.com (52.135.202.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.13; Thu, 28 Jun 2018 19:16:27 +0000
Received: from BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::959d:9fbe:90e4:3cc]) by BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::959d:9fbe:90e4:3cc%4]) with mapi id 15.20.0906.018; Thu, 28 Jun 2018 19:16:27 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: ietf-restconf-server: how to configure/express what encodings a server supports
Thread-Index: AQHUDxSDn+8pH13bCEWR+m2ZVe6G9A==
Date: Thu, 28 Jun 2018 19:16:27 +0000
Message-ID: <79247043-3CDA-46F8-B889-2C861A7AE2C4@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.10]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BYAPR05MB4423; 7:A8VtKdAFNrn+tQiAM4P4L8NDRXjWpXK2/J0TiX+lPvBBpC16h9vFq2Tm6QfOiUHs3wC9WSSUHkIMc5ela69kdc1gpoYniUnBXC0zSXTfTiHxk0De8F3pOpXAWBiWb+s8ul0Esv1mApz4QjlFoHTp9Ptwqp2wTJ6B1CcCbGHOjqkgiFPSc+Eg2FI7RzpWO5SqIMaGKg5r6umajClkWVIl/AF3E/yGVYAlYnXkPS6IBA+3OwJ65VJdsGENLc8OswXq
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: bed912a3-b93f-41df-0586-08d5dd2ba5b0
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652034)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:BYAPR05MB4423;
x-ms-traffictypediagnostic: BYAPR05MB4423:
x-microsoft-antispam-prvs: <BYAPR05MB44233482477A189275725C70A54F0@BYAPR05MB4423.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231270)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:BYAPR05MB4423; BCL:0; PCL:0; RULEID:; SRVR:BYAPR05MB4423;
x-forefront-prvs: 0717E25089
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(136003)(396003)(346002)(376002)(199004)(189003)(86362001)(102836004)(33656002)(6512007)(6346003)(106356001)(105586002)(36756003)(6436002)(6916009)(25786009)(26005)(68736007)(99286004)(6116002)(486006)(6506007)(2906002)(476003)(2351001)(2616005)(3846002)(8676002)(53936002)(6486002)(316002)(14444005)(8936002)(66066001)(256004)(97736004)(81156014)(1730700003)(81166006)(82746002)(478600001)(5250100002)(5660300001)(7736002)(14454004)(186003)(2501003)(2900100001)(5640700003)(83716003)(305945005)(58126008); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR05MB4423; H:BYAPR05MB4230.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: VxMrSH8bqfgVhCeCduVZrwqqWouQxkZsnXI0ehAqzUYw2z/7OTdx90bHvgKSSZ0HuScAPmU+hYrV0o4Zhmzx4UsCRN3Y36TlVMNbIPrkeBC2pIp85HDnMqBytkGgkCNflZnRxnQPsbJiEGlod8ciyKgv/bECIXRNlSBLspkgk80uAiuEfa5pnZDOj+gVhvwnzwvgzjFHgYTgFhAI6TqYOvWHcCb60XyylLujHIDvg7SaYgAdLbMBKsg8b4Fgjg1Kvno9W/DLqiE4G8DZ2JYfdmYP/rnflxlUyi6t1s9M/vfUxZTqqEnc4/CLdhXRoEDMORqW8LlM8JnfsAHaLqa9ISIumW/8t+M10bxM3cld+NA=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <6EC57FC3FA8E9B4B9A093206BC4A413F@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: bed912a3-b93f-41df-0586-08d5dd2ba5b0
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2018 19:16:27.5581 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB4423
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-28_08:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=885 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806280214
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/eL7FMzUpYaCrnPKSsNRYP-2-lyU>
Subject: [Netconf] ietf-restconf-server: how to configure/express what encodings a server supports
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Network Configuration WG mailing 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: Thu, 28 Jun 2018 20:53:19 -0000

Questions:

  Should ietf-restconf-server be extended to enable an administrator to 
  configure which of possible encodings to support?

  Should ietf-restconf-server be extended to have features like "encode-xml"
  and "encode-json", to express which encodings it supports that way (i.e.,
  in yang-library)?


Background:

In draft-ietf-netconf-restconf-client-server, there is currently:

- no ability to configure the server for which encodings it should support.
  E.g., for the case where the implementation supports more than one, but
  the operator only wants to a subset to be supported.  [is this a valid?]

- no ability for the server to express what encodings it supports (json, 
  xml, etc.).  This one is a catch-22, since the client has to send a 
  request to the server to get yang-library, where it could learn about
  features, but that request already has to be sent in an encoding.
  RFC 8040 Section 5.2 says:

    Content is encoded in either JSON or XML format.  A server MUST
    support one of either XML or JSON encoding.  A server MAY support
    both XML and JSON encoding.  A client will need to support both XML
    and JSON to interoperate with all RESTCONF servers.

    A client can determine if the RESTCONF server supports an encoding
    format by sending a request using a specific format in the
    "Content-Type" and/or "Accept" header field.  If the server does not
    support the requested input encoding for a request, then it MUST
    return an error response with a "415 Unsupported Media Type"
    status-line.  If the server does not support any of the requested
    output encodings for a request, then it MUST return an error response
    with a "406 Not Acceptable" status-line.


Kent // contributor