Re: [core] Adam Roach's Discuss on draft-ietf-core-links-json-07: (with DISCUSS and COMMENT)

Alexey Melnikov <aamelnikov@fastmail.fm> Mon, 24 April 2017 08:39 UTC

Return-Path: <aamelnikov@fastmail.fm>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A6F6A129B98; Mon, 24 Apr 2017 01:39:01 -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, FREEMAIL_FROM=0.001, 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=fastmail.fm header.b=gKwe+m5j; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=EVYMpd44
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 CU6Sesu-c-Pe; Mon, 24 Apr 2017 01:39:00 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 33FA1129B9D; Mon, 24 Apr 2017 01:38:55 -0700 (PDT)
Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 98A1F20D60; Mon, 24 Apr 2017 04:38:54 -0400 (EDT)
Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 24 Apr 2017 04:38:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=tGeaXlYWF146o9HqpV qqSevO3bVvvAWOBVj/U1JffAY=; b=gKwe+m5jY3K3mLUKmVHYGeqoxKMD92cN3x x3QyLRb/YOCGuL2bCiNSyNajPnJ4TmPikHj1l+M9As3AJdVANRONTOzB6sg54uLF sCQafMduiKU0M48TzVtwf8XoGbEJcvHSKo/+n3LnAaoZDN3Ip0hZJ9kkgaowxZ00 d90cLhR7NkMbI+fKdIgt9TkYxfIgL+DQ+fhSFpem3/wTZzcrT2dEogL/m/q2FyQs 9ArTu0x35VS3Kv+KDGukjFv4dkd8X2P9jze7+UvPkvZ9yOATEHgZdkco3Vj5D81B SqvZF4KUAAN8d+Gr67mqIk9pMb107h3UKOVmTvxQWpyaJfDPBlBg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=tGeaXlYWF146o9HqpVqqSevO3bVvvAWOBVj/U1JffAY=; b=EVYMpd44 EYzzLcp15WU1yiMbZJPzI1tWouqoVdHD6kvsF6XNbQeqavq7ta6aWVi/lJEyIoyI kssPJT+LU8MNyH4i2erMJjTXuSbFzMbb2MKF+CyiUNkgMYPqyevgWVv92EX3ojcK wlJ4XPiLKGTP/jGuX/o7uLwUrqJe4j5ZUes4+ghue3AaRh6v85CdGgw6NGBORDQU q/MsVdbnT3gnuHsIqN3jeY4D5W+T5OO73Hzz37Oa+k13XG3VwTK0OC7LY78LBP9i gCv3wqyW7cvgnffSkDKlZK637ynMV5CDauziHYracS/USvtGTnByw4CYnaDgDg9T Qn4LtHf3+CbTUA==
X-ME-Sender: <xms:nrn9WMAc_X4akEJp4Bca3Bfrroqo7o-FdoLNpMr6eIopSUsNTCw8Uw>
X-Sasl-enc: wbOeArWVfCgAtPot8Vyzhmydq1aGQRrfEGlISEk0K+C2 1493023134
Received: from [192.168.0.6] (cpc121086-nmal24-2-0-cust54.19-2.cable.virginm.net [77.97.145.55]) by mail.messagingengine.com (Postfix) with ESMTPA id 53D31246CA; Mon, 24 Apr 2017 04:38:54 -0400 (EDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (1.0)
From: Alexey Melnikov <aamelnikov@fastmail.fm>
X-Mailer: iPad Mail (14A456)
In-Reply-To: <B6E61D59-781E-4137-B010-979F85927615@tzi.org>
Date: Mon, 24 Apr 2017 10:00:12 +0100
Cc: core-chairs@ietf.org, draft-ietf-core-links-json@ietf.org, The IESG <iesg@ietf.org>, core@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <4C6A2BAA-F0FB-4E4B-BB33-95F69615B62D@fastmail.fm>
References: <149281630600.25862.8449227995136793167.idtracker@ietfa.amsl.com> <C3A5C6CC-89EC-42F9-897A-75CF13B58051@tzi.org> <B6E61D59-781E-4137-B010-979F85927615@tzi.org>
To: Carsten Bormann <cabo@tzi.org>, Adam Roach <adam@nostrum.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/GgEOefwvg0BxadBKi571CpDhmOQ>
Subject: Re: [core] Adam Roach's Discuss on draft-ietf-core-links-json-07: (with DISCUSS and COMMENT)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Apr 2017 08:39:02 -0000

Carsten and Adam,

> On 22 Apr 2017, at 09:32, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Interesting.
> Julian Reschke reminds me that this is repaired in draft-nottingham-rfc5988bis-05.txt:
> 
> 3.  Link Serialisation in HTTP Headers
> 
>   The Link header field provides a means for serialising one or more
>   links into HTTP headers.
> 
>   The ABNF for the field value is:
> 
>     Link       = #link-value
>     link-value = "<" URI-Reference ">" *( OWS ";" OWS link-param )
>     link-param = token BWS "=" BWS ( token / quoted-string )
> 
>   Note that any "link-param" can be generated with values using either
>   the "token" or the "quoted-string" syntax, and therefore recipients
>   MUST be able to parse both forms.  Individual "link-param"s specify
>   their syntax in terms of the value after any necessary unquoting (as
>   per [RFC7230], Section 3.2.6).

I think this document should recognize this change and just reference draft-nottingham-rfc5988bis normatively. (I will be AD sponsoring it shortly anyway.) Adam, will this address this concern

> Unfortunately, this doesn’t retroactively fix RFC 6690, which still has restrictive ABNF for rt, if, title, anchor.  Hmm.

Well, we just have to special case them. The list of special attributes is fixed.
> 
> Grüße, Carsten
> 
> 
>> On Apr 22, 2017, at 10:03, Carsten Bormann <cabo@tzi.org> wrote:
>> 
>> Hi Adam,
>> 
>> thank you very much for this deep review.
>> This will allow us to improve the document a lot.
>> 
>> Let me pick one issue here that I think goes beyond the details of links-json.
>> 
>>> Let's say some future document defined a link relation ("smellslike")
>>> that included a parameter with ABNF syntax like:
>>> 
>>> "smellsys" "=" quoted-string
>> 
>> My knee-jerk reaction is “then don’t do that”.
>> 
>> But the more fundamental problem is that RFC 5988 actually defines a data model and its serialization without ever saying so.  Any reasonably defined link parameter will either have a syntax that is limited to ptoken or allow both ptoken and quoted-string serialization.
>> The fact that we then use ABNF to define the link parameter syntax obscures that property and allows the above deviation.  We already made the mistake for [anchor, title, rt, if] (see MUSTBEQUOTED in the reference implementation).  There is no need to make it again,  but the use of ABNF for what should be a data model definition does make it too easy to shoot ourselves in the foot.
>> 
>> Note that the above issue hits any implementation that wants to generate RFC 5988 syntax, not just one that converts links-json into RFC 5988 syntax.
>> 
>> So my takeaway summary is that links-json only works for reasonably defined link parameters (after grandfathering in anchor, title, rt, if) and probably should say so much more explicitly.  But I don’t know how to fix RFC 5988 about this issue.
>> 
>> Grüße, Carsten
>> 
>> _______________________________________________
>> core mailing list
>> core@ietf.org
>> https://www.ietf.org/mailman/listinfo/core
>> 
>> 
>