Re: [T2TRG] draft-hartke-t2trg-ciri-00 review

Ari Keränen <ari.keranen@ericsson.com> Wed, 23 January 2019 09:05 UTC

Return-Path: <ari.keranen@ericsson.com>
X-Original-To: t2trg@ietfa.amsl.com
Delivered-To: t2trg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A86F8123FFD for <t2trg@ietfa.amsl.com>; Wed, 23 Jan 2019 01:05:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.875
X-Spam-Level:
X-Spam-Status: No, score=-7.875 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-4.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com header.b=Xkc2B89c; dkim=pass (1024-bit key) header.d=ericsson.com header.b=HgV/UIBd
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 iEDHzYvQGNqR for <t2trg@ietfa.amsl.com>; Wed, 23 Jan 2019 01:05:50 -0800 (PST)
Received: from sessmg23.ericsson.net (sessmg23.ericsson.net [193.180.251.45]) (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 BFC04130DE9 for <T2TRG@irtf.org>; Wed, 23 Jan 2019 01:05:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/relaxed; q=dns/txt; i=@ericsson.com; t=1548234347; x=1550826347; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4iqDTCFkDOpr1EYNA6mP8Ma5Gx0He8PG1x+IPQuqdNE=; b=Xkc2B89czwBpT7SJjRm7bRtJ8sW1epitcxX6I3gzh2ESEJ3rFfh631pleCfxQFx+ DHW15yAasecgkrRKQ7ZAdRfx8T2Fnpiqba0IHPVwtRsvML2gFVhwd4tG6tgIjqfc 5XFQWoxMYAzb5jjIiKf6MG0dQP4FAYjnw2x7Ng+m5xw=;
X-AuditID: c1b4fb2d-db5ff7000000062f-da-5c482e6306d3
Received: from ESESSMB504.ericsson.se (Unknown_Domain [153.88.183.122]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id F5.CC.01583.36E284C5; Wed, 23 Jan 2019 10:05:39 +0100 (CET)
Received: from ESESSMB501.ericsson.se (153.88.183.162) by ESESSMB504.ericsson.se (153.88.183.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 23 Jan 2019 10:05:38 +0100
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB501.ericsson.se (153.88.183.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Wed, 23 Jan 2019 10:05:38 +0100
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=4iqDTCFkDOpr1EYNA6mP8Ma5Gx0He8PG1x+IPQuqdNE=; b=HgV/UIBdnVKyHQ3qm6buSQI+n4emwqz8H6gw3tnJP0YrUkT0DknUNA8upDFOTDJHjYdg+fxb+nn7wXrhiYc5KwSoqocPrawU4crotDstwGsBz7/90WTZUVREMqqiZp3216f+cvAkSkArMjT2yvH+1P+IDBWaJ8nElNZaNpBnxjw=
Received: from HE1PR07MB4236.eurprd07.prod.outlook.com (20.176.166.145) by HE1PR07MB3211.eurprd07.prod.outlook.com (10.170.246.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.9; Wed, 23 Jan 2019 09:05:37 +0000
Received: from HE1PR07MB4236.eurprd07.prod.outlook.com ([fe80::15e:bce2:76f6:7b9b]) by HE1PR07MB4236.eurprd07.prod.outlook.com ([fe80::15e:bce2:76f6:7b9b%5]) with mapi id 15.20.1580.004; Wed, 23 Jan 2019 09:05:37 +0000
From: Ari Keränen <ari.keranen@ericsson.com>
To: Klaus Hartke <hartke@projectcool.de>
CC: "draft-hartke-t2trg-ciri@ietf.org" <draft-hartke-t2trg-ciri@ietf.org>, "T2TRG@irtf.org" <T2TRG@irtf.org>
Thread-Topic: [T2TRG] draft-hartke-t2trg-ciri-00 review
Thread-Index: AQHUsbaoN2sOHNFPSUOGL+7Ra8iqEKW7MRKAgAFhGwA=
Date: Wed, 23 Jan 2019 09:05:37 +0000
Message-ID: <52465A18-0B76-4F75-AB83-69699BB7F366@ericsson.com>
References: <58aa0ae4-b3fe-abf7-9bda-4908ef0b3fd7@ericsson.com> <CAAzbHvZ4FyKErmS8i6_bWPgvXUoZbc+ZX28n1WsMa1tWGbvkzg@mail.gmail.com>
In-Reply-To: <CAAzbHvZ4FyKErmS8i6_bWPgvXUoZbc+ZX28n1WsMa1tWGbvkzg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [89.166.49.243]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; HE1PR07MB3211; 6:G7qpP95/LqZyiuRafRqsPtIoKp7/Z/nOqsnWcX2OWcZ4ZkSYMUwt11DesT+LubjOilqxtRzjIuF0z+q+sor887OX0uHejvrcJtcRHo/fkw0c7KZUZs9KVZUeMja7W7dhPSr9iSN0guvdNdR+o0NGubYPnz+jQyAhqkhpOl60/aGdjIEDCuekj7yCwfXW/JLTGg+GnVwK7j3kOOJuLe9hFzudHXdYO/WX7ScK6fB5hNgZxBzpP5P558IMoKrcKhx5P/NERYQE5weT3x0GOUijylReYghhLUr5+DxNuhDGMYw3jx12GpqAwYHRGmlxUxHY9MX7A8avYvq+YdRl2/hXNAu5m8VJYsa4nZth+usDD93tArUyNfjQg5zf5NrT/8tW0U63Ln/3NAe3AYFVqKTzMV0H5/qAV8AxvPYm7H/kCkuygJFfLl7W5o4TJ/YeKrl0psi/7vWBXUrquuHrMnJWKQ==; 5:EkPPmtHcZh3YyOuyBlSF2K328juFc0UNW3IoeEBgzeJE/SY008mFKETZIIhusKoZSA9cktwJsmrDmQfUE9bBesCpq1rkyfHIS579sQX0IoFQOtp678McYMNECGKNPueaoJehN/KCOalxUzthcVq9gRRgr8O/4OaHfiThmC9TSCglGalyRIsciBcN140AaS+HiCInnxV3fAKEWF4Bc3HYJA==; 7:cttzyq/BfUC5O7e0ROUvJERUTaH2SXxrrgum7bTcNVYuAWIV8kp/iljw3i+K1O2CC/AnrslgDg19Lpe1kiJPlWZqfK3F4HAIrRIeC2CbzMKzLdg2y685SNPbLPC8+w+vTqrqDTDkBhZXorKzJNqP9A==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 60eb5e9a-6da3-4916-6e0e-08d68111f0d2
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060)(7193020); SRVR:HE1PR07MB3211;
x-ms-traffictypediagnostic: HE1PR07MB3211:
x-microsoft-antispam-prvs: <HE1PR07MB32118614A28331494099C95585990@HE1PR07MB3211.eurprd07.prod.outlook.com>
x-forefront-prvs: 0926B0E013
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(366004)(346002)(376002)(396003)(43544003)(189003)(199004)(4326008)(476003)(2616005)(446003)(11346002)(3846002)(6116002)(33656002)(25786009)(36756003)(68736007)(6916009)(81156014)(8676002)(8936002)(305945005)(7736002)(99286004)(2906002)(81166006)(54906003)(316002)(66066001)(85202003)(106356001)(105586002)(6512007)(229853002)(478600001)(14454004)(6486002)(6436002)(102836004)(6506007)(6346003)(82746002)(486006)(186003)(14444005)(26005)(256004)(53936002)(85182001)(76176011)(6246003)(86362001)(83716004)(66574012)(71190400001)(71200400001)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB3211; H:HE1PR07MB4236.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=ari.keranen@ericsson.com;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: FiaxKZjG0a6BYM2vw9yyJWJZf5tGw9dyB+I3iuoVJCqoWTOOe33z7sF27uqeAZkmiKQrrmTfYroXU+298rHkN2xpX71nA4f3n5rw6inF0hs7BPkiLB1f1oBp30bdGmOQpR9sOwTdukyiArvflSputxfLI8Cp9M/643ejH9ROO4c3xzNkwwpZuqx7Y5Uyg2dR2P2SGnVLnbBxsz01MBnhAs39q9ibEHGy7mdczbFAYyP92cykLE3PK4dx/9S2wnw3MZmLtRDDpJ1/M0B8GYVTXvaQeB4hWDP3i+oFU08tCGriesE0LL3z3JurJhpvhewhvR9/xccpCfNAfCNt6ynoxV8FIHmOG2BPIUwRJ4FVkeIoDhub7FMCQ3UlVGvetuF89qYYU8uTo1NGG23whQ7G8gaQSpBMhf/c2Vz6L8IQCbo=
Content-Type: text/plain; charset="utf-8"
Content-ID: <3CDEB55095C7344DA43ACE643FD0AF24@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 60eb5e9a-6da3-4916-6e0e-08d68111f0d2
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2019 09:05:37.3142 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3211
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTcRTH+d17N6/Dwc/l42SKOopssakZai/tQTEIQf+JiEkNvahNp+2q pH+Imo9QR+aziZnRKikfrSQzRPNRaii6/CM1ModTk0RHkqEOa9td0H+fc873PDk0KdLxfOgU dSajUStTxXwBpbvclStVyeSKEO1KUOTsLhu52veFiFyfr6BOk3K9fouQVxsG+fLvllIUS14R nExkUlOyGU1w1DVBss74EGVYQ28uTKrz0XRIGXKlAR+Fukmji51FeAjB3cWYMiSw8SaCts8j FGfoCZgyrBF2g8KVJDSv9yEuUk3AB9OQUzaPoGiun7IX4+NTYC7u5dnZAwfBYP2Mw09iNVRU NTl4Dw6Hdx23CU4TAV2P6vkcH4fB6kJbLm1rdwCmRxyzCnE0lJrKSK5XCQKzuduR64rjYKep 1cEIe8HvjxyT2BtmzQ8IblEM+p4JkmNPWFnY5XEcCONrJqfGDz49KHdsBrjQBQoMBc4EKVhq a50cA/fGd0hONINgor2RtE8KWAKbxmBOo4LlYgvFsS/0/5xz6n/xYGO1js+dm4GnbcWoEska /hu2wVaKxIeg420w55bDpGWDx3Eg1JSbXBocx3CHUZ2Zaka8Z8iTZVg2LelImIzRpCSwbLpa pmYyXyLbw/R37kjfoOc/zgwgTCOxm3DNX64Q8ZTZbE7aAAKaFHsIzxsvKETCRGVOLqNJv6rJ SmXYAbSPpsTeQqvIXSHCScpMRsUwGYzmX5SgXX3y0Z2v2z1j16VPzqb7N3dPsX/CahjtueSM G36ltE4QlU1vx1HtSiLhtUpcUhSAerOGtWRE1eO5ZQ9zrYIyxUdvqjov7dflvRAuacduuXUZ xPHvJa+QMKB4qaU1VLY3/HDj6MUTx/pirYu1hRtjkvT7LdalrYM9vnnDfl5x3t9GxRSbrAyV kBpW+RfwVC4uLAMAAA==
Archived-At: <https://mailarchive.ietf.org/arch/msg/t2trg/m5mXqyatJSPWMkV2V70RH72SeNk>
Subject: Re: [T2TRG] draft-hartke-t2trg-ciri-00 review
X-BeenThere: t2trg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IRTF Thing-to-Thing Research Group <t2trg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/t2trg>, <mailto:t2trg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/t2trg/>
List-Post: <mailto:t2trg@irtf.org>
List-Help: <mailto:t2trg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/t2trg>, <mailto:t2trg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Jan 2019 09:05:54 -0000

Hi Klaus,

> On 22 Jan 2019, at 14.01, Klaus Hartke <hartke@projectcool.de> wrote:
> 
> Hi Ari,
> 
> thanks a lot for your review!
> 
> Ari Keränen wrote:
>> 2.1.  Options
>> 
>>    host.ip
>>      Specifies the host of the IRI authority as an IPv4 address
>>      (4 bytes) or an IPv6 address (16 bytes).
>> 
>> Do we need endianess considerations here? Or does CBOR take care of that?
> 
> Is there any protocol or format that does not encode 192.0.2.42 as
> h'C000022A' or [2001:db8::42] as h'20010DB80000000000000000000042'? I
> always thought that IP addresses do not have an endianness.

Nothing obvious comes to my mind, but I remember in some other contexts (e.g., HITs in HIP specs; which are essentially IPv6 addresses) we were careful to remind about the byte order, especially for crypto operations. But perhaps that is not that relevant here, so I'm fine either way.

>> 2.2.  Option Sequences
>> 
>>     A sequence of options is considered _well-formed_ if:
>> 
>> Do we need the _emphasis_ here? Maybe in quotes since it's a defined
>> term? Unless we want to follow the CDDL convention -- which perhaps
>> makes sense. But then it's probably good to have a note along the lines
>> of "New terms are introduced in _cursive_." in the terminology section.
> 
> Yes, the idea was to write terms defined by the document in cursive
> where they are introduced. I'll add a note to the terminology section.

Sounds good, thanks!

> 
>>     o  a "host.ip" option is followed by a "port" option;
>> 
>> Why is the port option mandatory? No default ports allowed?
> 
> This is relates to a tricky question regarding design goals.
> 
> As defined by RFC 3986, URIs can often be written in a number of ways:
> 
> * Schemes can be written in upper- or lowercase but are case-insensitive.
> * Registered name are case-insensitive as well.
> * Hex characters in percent encodings are case-insensitive as well.
> * Schemes can define scheme-specific rules. E.g., in the case of "coap":
>    * The port 5683 and an omitted port are equivalent.
>    * The path "" and "/" are equivalent.
> 
> The primary function of CIRI References is to dereference them (where
> RFC 3986 defines "dereferencing a URI" as using an access mechanism
> determined by "URI resolution" to perform an action on the URI's
> resource). For that, a client only needs to compare URI schemes, pass
> registered names to a name resolution service, and know the default
> ports of the protocols it actually implements.
> 
> The question is if we secondarily also want to be able to compare
> CIRIs. Normally, because of all of these normalization rules, this is
> quite tricky to do for all URI schemes (in particular if a URI scheme
> has scheme-specific rules and is not recognized by an implementation).
> However, if we restrict CIRIs to follow the normalization rules of
> CoAP, then we can actually support any URI scheme with the same
> normalization rules (such as HTTP) with ease. The only thing we need
> to know to successfully compare two CIRIs with an unrecognized scheme
> is - the default port.
> 
> So, at the cost of two bytes in a CIRI with a default port, we gain
> that we can compare any supported CIRI even when the scheme is
> unrecognized. Is it worth it? In my opinion, yes - if we want to be
> able to compare CIRIs. On that, I don't have a good opinion yet. What
> do you think?

Seems like a sensible design choice. But since it's non-obvious, should it be mentioned somewhere in the document?

>> 3.  CBOR
>> 
>>       ciri = [?(scheme:    1, text),
>>               ?(host.name: 2, text //
>>                 host.ip:   3, bytes .size 4 / bytes .size 16),
>>               ?(port:      4, uint .size 2),
>>               ?(path.type: 5, path-type),
>>               *(path:      6, text),
>>               *(query:     7, text),
>>               ?(fragment:  8, text)]>
>> 
>> Isn't "text" too permissive type for most (all?) of the components?
> 
> RFC 3986 actually makes no restrictions at all on what characters can
> be used in registered names, paths segments, queries and fragment
> identifiers. (The only requirement is that some of them need to be
> percent-encoded.) So, as I understand it, "text" (a.k.a. "tstr") is
> the right match here.
> 
> The scheme is restricted with a regex in -00:
> 
>      ciri = [?(scheme:    1, text .regexp "[A-Za-z][A-Za-z0-9+.-]*"),
>              ...

Does this mean also control characters like new-line are OK, or is there need for restricting that? Should we express the need for percent-encoding in CDDL? 


Cheers,
Ari