Re: [Gen-art] Genart last call review of draft-ietf-httpapi-link-template-02

Christer Holmberg <christer.holmberg@ericsson.com> Wed, 24 May 2023 08:52 UTC

Return-Path: <christer.holmberg@ericsson.com>
X-Original-To: gen-art@ietfa.amsl.com
Delivered-To: gen-art@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 837B7C1516FF; Wed, 24 May 2023 01:52:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZhovT92mkRT0; Wed, 24 May 2023 01:52:52 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::60e]) (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 A89FBC151071; Wed, 24 May 2023 01:52:51 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eYepdkaBg5ARrwXStYmfCe3LAPRtjjOxE95cYBjMn1MPj4fW1PpkOgUpeK+krfUqlVEHcsgOVSlhVEbFhRMSZNM1TAVlZqk2fSX/7dBcQiTTstfUJjE5M6OgGdsZJ0Y47KoeB0l58tuVpzJ8wyM6yl2JvQnG0cM2EQ2PoXrYYQUWY43OLnATB+ycUeiLUwiCNnEo86xCzWwPdAk2RsAnIN9uvf114m8Jo2QGHud3aTKVPIaCiirmn/tVpsFKv6hlvuIhoai1rw9tH9Vb1nm/Av/79Vi/XeC962hvWHY7oQPPxwgkFk7KVbM/QDXLuRm0VPfVZMkNg+Hbmf82s+5MIA==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B+BU+1UouUObrq4kQvz3YstSfGppncmyOQ2CjhjOBSQ=; b=ViYcGpR63CP3fzgXJxUJIuwhcYPwFdAaFPrb4Hk2EqHlIVxt827U/xvZXGQ/LifwB2V1ZZ4Z3Ln+I9/cQ5DbwEQmVB1mGrF4bcGrmIsHlLiLgaBP57c310gk59TAn2ml5c3AIFSIAQzEayFksDRHx8d6kHLGa3LA4BGRKU0x234WduB8KsqmKa15YHDZBjrBXFnKyCNstkFYiEnlvjxw6dl+hu9sysUwozNfxpDprPKzdR9P3wfp2BLBfpCDUQ9PqmMO5wleuySQ7gsU8+SMT1pI458g05Tuy/A0N5r2uVm/BIIgDSBTdzEf2QRZBc5eGxSxGKSEUrfesTYqhVVJyQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B+BU+1UouUObrq4kQvz3YstSfGppncmyOQ2CjhjOBSQ=; b=kWTCJ5XXfI6x1vENmWGtgO1snbMLo/q2QW+r5JDLDBvdEoEi6yk0Akg+VI0GfN9u7XHZ09NUUo0MN2h2zWBgY/alArmaUmCGylaY4V6F9qlfAojJMyEhpimPaM5gQr/uxVS4LU7NMYnOK8Xw+wBD9YAN853wsPh28fucQzNA6bo=
Received: from VI1PR07MB4447.eurprd07.prod.outlook.com (2603:10a6:802:5d::25) by DU0PR07MB8993.eurprd07.prod.outlook.com (2603:10a6:10:40f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 08:52:46 +0000
Received: from VI1PR07MB4447.eurprd07.prod.outlook.com ([fe80::4552:b28e:5c01:b0eb]) by VI1PR07MB4447.eurprd07.prod.outlook.com ([fe80::4552:b28e:5c01:b0eb%4]) with mapi id 15.20.6433.015; Wed, 24 May 2023 08:52:45 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Mark Nottingham <mnot@mnot.net>
CC: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>, "gen-art@ietf.org" <gen-art@ietf.org>, HTTP APIs Working Group <httpapi@ietf.org>, Last Call <last-call@ietf.org>
Thread-Topic: Genart last call review of draft-ietf-httpapi-link-template-02
Thread-Index: AQHZiYk+/vdkoSTvK0uTtDhdp6KeZa9hdyHQgAAPj4CAAGvyUIABK5WAgALMIZCAAAcE8IACnucAgACQN0A=
Date: Wed, 24 May 2023 08:52:45 +0000
Message-ID: <VI1PR07MB4447844ED5B94E350D71944E93419@VI1PR07MB4447.eurprd07.prod.outlook.com>
References: <168424064858.44084.3692769234533396629@ietfa.amsl.com> <34AA44A9-B351-4798-8920-90724F600D8D@mnot.net> <HE1PR07MB4441A4329BA51DC42C9796DE937C9@HE1PR07MB4441.eurprd07.prod.outlook.com> <C5848939-4628-4760-B1B7-ECB7105B866A@mnot.net> <HE1PR07MB4441C788DC81233E50441297937C9@HE1PR07MB4441.eurprd07.prod.outlook.com> <EE952FBC-B0A4-4818-A288-1B320B469D5E@mnot.net> <HE1PR07MB4441EFC69B1BDFED17CDFFE293439@HE1PR07MB4441.eurprd07.prod.outlook.com> <HE1PR07MB4441359730E81FABD0A385AB93439@HE1PR07MB4441.eurprd07.prod.outlook.com> <913BDEE9-26F8-4391-AB57-A40D07C41EE4@mnot.net>
In-Reply-To: <913BDEE9-26F8-4391-AB57-A40D07C41EE4@mnot.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: VI1PR07MB4447:EE_|DU0PR07MB8993:EE_
x-ms-office365-filtering-correlation-id: 290ba6fe-217e-444c-3f7c-08db5c343e64
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Q3rGUazmQivv/rdm8HmhAk9ipySPSuCHQ1A/dmUKkXEImppic7wvScM6TEQ405Gy3j5sE9LR6jyPPLzfOSQJp1zMJVv498wrjAdvFuxVKf8V1ICO/H5HNmnBbTwl+pmrJBJk82J9NCbfx5XLNde+2Mr2ZEPXrVXc9ykxPEhmv4EsdFjuOW3FDOJPothVpdT/YMTpPUS7RriU6YXiYezcTTGMpxnuJVDYhOiAx1rzV53pse9cnOCtPr+e1UO8vYkgJvkhl0GV00oNpWr8rAE4gcjC6m9/jQq6n3qWCAlUUYiWZYafmFl5wC8SRzoPW8DsIxxxymqiyOH4mmQjq2IfS9TEcWq0qDEjpvOuJrV9wiBnzDzNXTtkIZ916zFq4u2caVTRZrH2I2zgBmbex4ZF66I+1L1WC0J6jIvqYoENWLr2t5hwpkQIGdRT9qsgNPXMcGcoAClBSY/askCScvXKA5tY1+M4B0anVYnFpd5ulr31udKHVCvDKVMztdyhJMmZ8Drx4P6myxO0/IYFHl7D1F5NTSfNaB7uz41noVT5SH167CNCjXomBMQCi3CtF8ywZRBn20XStA/skIJ/cnwxybCiaEHMr/IOM++9nyTy9OlbDqr9qHAYZ0vS4Pou4WUA8XlD09034xpwCG15h8d4Pw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR07MB4447.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(366004)(136003)(346002)(376002)(451199021)(478600001)(7696005)(966005)(71200400001)(54906003)(53546011)(26005)(9686003)(6506007)(66476007)(186003)(66946007)(76116006)(64756008)(66446008)(66556008)(6916009)(4326008)(33656002)(99936003)(5660300002)(82960400001)(52536014)(41300700001)(38070700005)(86362001)(55016003)(38100700002)(2906002)(8676002)(8936002)(316002)(122000001)(44832011)(83380400001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: Og3wJASwxyY3SvOJzTJJjPHEPNA4jJaHXrZ6iGzWSFN5oC9h1jfppiP0wReK5e0Dj1ndzzUZfCNkVZRJ/LSfGk+ObbYYp42jhXz1PUKbzRbENUkCec4IuSKnFMTY6AcUOF6lL1ko/Ssdu+enoEVrrE2o02UJ1av3HrLOtFsCDFMoJiWoXHSG666+UvgxISoUd0UWpPMrf9Q4QaeDIbqJshmXpiU7MtpVoS1MDlM1b1+GYlq64ylxI1SiwSTrN5D6ozOcetFgZg2JcLlPnfFX1IWfz75FsBtsdluanIEKXcfoiO9WCb6hv6iVG4sAsUqQe2Cq0lQDZ54bbppn0pZolC+rRDCkKIuazcvSI98i4HIrOLlDildHzJ3F0Z8LaXHyK8TZ8wEEM8ay08XWgMdBmTFgmBcZCtU5lJzoT92B01LtMkepFIqhX7ZzJ2/p40zhmofHChzfcdQMUG0a1qvlG01X/umQl4TTzpxjOtLBBUueW0maFjqj/Jeu8AeN3Lrlso5E+6xlH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HAC5a96X/hNuYR0ow7RpmxyF+JaQ==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_005F_01D98E36.406A8080"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: VI1PR07MB4447.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 290ba6fe-217e-444c-3f7c-08db5c343e64
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2023 08:52:45.7466 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: K20dTYNHOIBbyEERZLF7wHPEVKhGz7FuHTX+b6ZCJavm9klB1aUBgyqYBepgYSlBDShDi5sozFZzfbbrD++GEmZE6nOQ/qEKy7FtfdBzUsc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB8993
Archived-At: <https://mailarchive.ietf.org/arch/msg/gen-art/rVa1Hi-6iKnxY7A-7E95iBBhdsg>
Subject: Re: [Gen-art] Genart last call review of draft-ietf-httpapi-link-template-02
X-BeenThere: gen-art@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "GEN-ART: General Area Review Team" <gen-art.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/gen-art>, <mailto:gen-art-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/gen-art/>
List-Post: <mailto:gen-art@ietf.org>
List-Help: <mailto:gen-art-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/gen-art>, <mailto:gen-art-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 May 2023 08:52:56 -0000

Hi Mark,

>The quotes in my examples weren't part of the value -- sorry for the
>confusion.
>
>The point is that SF is being retrofit here -- parameters are defined by
>applications that may not be aware that they're being used in a context that
>leverages SF, so we can't assume they'll follow SF syntactic rules.

Perhaps it would be useful to add a Note about that? Because, now the text 
only says that parameter values must be String, without any justification.

Now, making the above assumption that an application is "sf-unaware", isn't 
there a risk that the parameter NAMES will cause problems?

According to RFC 8288 (Section 3), the syntax for the parameter name is 
'token':

     Link       = #link-value
     link-value = "<" URI-Reference ">" *( OWS ";" OWS link-param )
     link-param = token BWS [ "=" BWS ( token / quoted-string ) ]

 According to RFC 7230 (Section 3.2.6), the syntax for 'token' is:

     token          = 1*tchar
     tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
                    / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
                    / DIGIT / ALPHA
                    ; any VCHAR, except delimiters


However, RFC 8941 (Section 3.1.2) only allows a subset of those characters for 
parameter names (key):

      parameter     = param-key [ "=" param-value ]
      param-key     = key
      key           = ( lcalpha / "*" )
                         *( lcalpha / DIGIT / "_" / "-" / "." / "*" )
      lcalpha       = %x61-7A ; a-z

For example, RFC 8941 does not allow capital letters, or a bunch of
special characters, for parameter names, that RFC 7230 do allow.

Regards,

Christer



> On 22 May 2023, at 5:57 pm, Christer Holmberg
> <christer.holmberg@ericsson.com> wrote:
>
> ...and, as the comment was about Parameters, my examples should look like:
>
> Example-Header: X; parm="1234" // sf-string
> Example-Header: X; parm=1234 // sf-integer
>
> Example-Header: X; parm="foo123" // sf-string
> Example-Header: X; parm=foo123 // sf-token
>
> Example-Header: X; parm="1.2.3.4" // sf-string
> Example-Header: X; parm=1.2.3.4 // NOT a valid value, as sf-decimal
> only allows one dot
>
> Example-Header: X; parm="1.2" // sf-string
> Example-Header: X; parm=1.2 // sf-decimal
>
> Regards,
>
> Christer
>
> -----Original Message-----
> From: Gen-art <gen-art-bounces@ietf.org> On Behalf Of Christer
> Holmberg
> Sent: Monday, 22 May 2023 10.48
> To: Mark Nottingham <mnot@mnot.net>
> Cc: gen-art@ietf.org; HTTP APIs Working Group <httpapi@ietf.org>; Last
> Call <last-call@ietf.org>
> Subject: Re: [Gen-art] Genart last call review of
> draft-ietf-httpapi-link-template-02
>
> Hi Mark,
>
>>>> Ah. The reason is that allowing any type would require creating a
>>>> mapping of current values to SF types, and there are just too many
>>>> potential (and undocumented) values already in use to do this.
>>>
>>> I don't think that is true. Just because the Parameter syntax allows
>>> values to be encoded sf-string, sf-token, sf-boolean etc it doesn't
>>> mean that you have to map each value (existing or new ones) to each
>>> of those encodings. If a value is defined as a String, then it has
>>> to be encoded as a sf-string.
>>
>> Consider an implementation that wants to serialise a link relation
>> that has a 'foo' Parameter that it has no special knowledge of. If
>> the value is "bar", that's very straightforward -- it will
>> successfully serialise as a Token. However, consider the value
>> "1.2.3.4" -- it will fail parsing, because it looks like an Integer
>> or Decimal to the parser, but it isn't.
>
> It will not look like an Integer or Decimal to the parser: if the
> value is surrounded by quotes, it is a String. Tokens, Integers and
> Decimal do not have quotes.
>
> Example-Header: "1234"     // sf-string
> Example-Header: 1234 // sf-integer
>
> Example-Header: "foo123" // sf-string
> Example-Header: foo123 // sf-token
>
> Example-Header: "1.2.3.4" // sf-string
> Example-Header: 1.2.3.4 // NOT a valid value, as sf-decimal only
> allows one dot
>
> Example-Header: "1.2" // sf-string
> Example-Header: 1.2 // sf-decimal
>
>
>> Of course, we could specify something like "try to parse it as a
>> Structured Value; if serialisation fails, serialise it as a String."
>> That strategy might be workable, but it creates a lot of complexity
>> -- at runtime when you have to test the value by running code, and
>> when values are handled, because now they could come in multiple forms.
>>
>> Always serialising as a string recognises that, from the standpoint
>> of the Link header field, the value's type is opaque.
>
> In general, if a parser is not able to determine the encoding without
> "testing" values etc, the syntax is bad. But, in the case of
> structured field values that is not the case: the parser will always
> know if a value is sf-string, sf-integer, sf-decimal etc.
>
> Regards,
>
> Christer
>
>
>

--
Mark Nottingham
https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-2328097a3e27f5ac&q=1&e=c2215f80-2678-4d68-bcee-ea310de4050b&u=https%3A%2F%2Fwww.mnot.net%2F