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

Kent Watsen <kwatsen@juniper.net> Thu, 28 June 2018 22:07 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 291DE1310CC for <netconf@ietfa.amsl.com>; Thu, 28 Jun 2018 15:07:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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, URIBL_BLOCKED=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 LbCgZoheBjbH for <netconf@ietfa.amsl.com>; Thu, 28 Jun 2018 15:07:10 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (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 315121310C6 for <netconf@ietf.org>; Thu, 28 Jun 2018 15:07:10 -0700 (PDT)
Received: from pps.filterd (m0108157.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5SM4Awn005492 for <netconf@ietf.org>; Thu, 28 Jun 2018 15:07:10 -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=I6Lfuu3b20OskSPEjVvaNoCB72j7eiWynezL93GewBQ=; b=kbdOhHcoQ3sqp9Yf5DINwW3b1UqOAV/CNv0KCvNAMxB16lodbOQY6zY3DjYsDDYYlst6 J1G154i3kFPuXedrxeMb5Unov5tjVAFVb0PR28afKRyeukh6VJP3Jfp8Mnb3rUGpNARG HDlPmZSTJdEQGpeo0UMdu8n++uVS2q1gqaRFaemxQv6tNqLqdmyNk8U9JCNwIbJb8h4t KEfHrAgpgkY0wE/I86SxCEs9eMrXkWbVrxJQuZnUzJT4rIklJiEy70WUSXfLZVMk7r0a ZIm/y7kr3Utg7eKbvCt4xfh0QuwnAZYeKKxxM3PvgXRkrxICYqt0GKc5tBdrmJojOYLc Qw==
Received: from nam02-cy1-obe.outbound.protection.outlook.com (mail-cys01nam02lp0050.outbound.protection.outlook.com [207.46.163.50]) by mx0a-00273201.pphosted.com with ESMTP id 2jw65br62j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <netconf@ietf.org>; Thu, 28 Jun 2018 15:07:09 -0700
Received: from BYAPR05MB4230.namprd05.prod.outlook.com (52.135.200.153) by BYAPR05MB4856.namprd05.prod.outlook.com (52.135.235.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.10; Thu, 28 Jun 2018 22:07:08 +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 22:07:08 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] ietf-restconf-server: how to configure/express what encodings a server supports
Thread-Index: AQHUDyxbY+BJlbjr9kOBoypUjhrvdQ==
Date: Thu, 28 Jun 2018 22:07:08 +0000
Message-ID: <867BC897-E495-475F-A3E5-F88340069766@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; BYAPR05MB4856; 7:NReQTmCSVd/1ZPxijLxMTYj6Ciz/pPMHE9sES7KgyOszJAuV8E/CMaO2xtqakY0jGvSbllwWhqPdNtjddlPUwpOgzu2ez7XJN0/MMq3f6kIWxqQWM/a3BYnC4vjDQx65RIOMCchYd3wMCSZtgRBnAqzkw/4SEH8nFOBB5YZc3ECbZNh7XYTFHWTJp4dYvYCYZI0OCMdU60AKLD3LYYQ36G8lNJY9xnv0fRgHC1Ilj7tPphplqrdUF0tDF5PVisVi
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 36632980-f69c-495d-9a93-08d5dd437d9e
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:BYAPR05MB4856;
x-ms-traffictypediagnostic: BYAPR05MB4856:
x-microsoft-antispam-prvs: <BYAPR05MB48563DEDB299711FE9CC6A03A54F0@BYAPR05MB4856.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(10436049006162);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BYAPR05MB4856; BCL:0; PCL:0; RULEID:; SRVR:BYAPR05MB4856;
x-forefront-prvs: 0717E25089
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(396003)(39860400002)(136003)(199004)(189003)(2906002)(478600001)(102836004)(99286004)(82746002)(53936002)(6346003)(66066001)(5250100002)(2501003)(486006)(26005)(6506007)(186003)(6916009)(5660300001)(256004)(2351001)(14444005)(6306002)(5640700003)(6436002)(68736007)(6486002)(6246003)(229853002)(575784001)(8676002)(36756003)(83716003)(105586002)(6512007)(33656002)(106356001)(2900100001)(81156014)(86362001)(305945005)(7736002)(8936002)(1730700003)(14454004)(25786009)(97736004)(476003)(966005)(316002)(6116002)(81166006)(58126008)(2616005)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR05MB4856; 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: 0CvlO90mC6xpoQJgQilxFsSZD6a1VeT/jNHHMotvST1ufS4EJt09i6hWftD1o3TIGtXa7qI+zhvSqwK9jrgy7pQ9r5RmYAK2uk4NAq3fNqSxtao71EdfW/GX0RFddF1/6O8OcDv4XUgnJJ146Zgy2Y/yh+c2NdiX49UrWanFT57FZVvpzyTsagGXLF9Np/qlXtL1olCbxw1OrueY2qfJouKJCHnnDM+YujB+gLV9oV4mvg9Nyrju/i22n10v/5RyRj9pFo1asILIppkvva7DX1C0AMZHLaUCxZy95Tx3ToTGzTEA8vhv1LNDgEeiomxoQ9ak4LIqca8GhuUSlaI+2EL3ksL3NXyuSj2vuXAH96o=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <FF40869941D4F44290006A1FBB8A93DE@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 36632980-f69c-495d-9a93-08d5dd437d9e
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2018 22:07:08.1765 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB4856
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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806280243
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/F0jAuxqwwKV89LD4JOXGGAAh05w>
Subject: Re: [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 22:07:12 -0000

Update: there is an almost parallel question regarding what HTTP transports
the server supports.  RFC 8040 says:

   RESTCONF does not require a specific version of HTTP.  However, it is
   RECOMMENDED that at least HTTP/1.1 [RFC7230] be supported by all
   implementations.

Kent // contributor


===== original message =====

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


_______________________________________________
Netconf mailing list
Netconf@ietf.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netconf&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=t2etVmuuKei1dy-lar2Fx2ITSTnYHX-oR3Or8aQbcuM&s=te_SwYuXn385qUEqictsdsN_KS-ncEVlHomzYbW4tg4&e=