Re: [Jmap] I-D Action: draft-ietf-jmap-blob-11.txt

Neil Jenkins <neilj@fastmailteam.com> Tue, 19 April 2022 06:14 UTC

Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2F1153A0DB8 for <jmap@ietfa.amsl.com>; Mon, 18 Apr 2022 23:14:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.109
X-Spam-Level:
X-Spam-Status: No, score=-2.109 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=cSVvjHZW; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=e8jUaIPn
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 tpU6lGGrcmIR for <jmap@ietfa.amsl.com>; Mon, 18 Apr 2022 23:14:36 -0700 (PDT)
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 996063A0D6E for <jmap@ietf.org>; Mon, 18 Apr 2022 23:14:36 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1D45A3201F9F for <jmap@ietf.org>; Tue, 19 Apr 2022 02:14:33 -0400 (EDT)
Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Tue, 19 Apr 2022 02:14:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1650348872; x= 1650435272; bh=F0a+Jm1OcZ0z3R6KMW5TmU0EfI6C5UESEqDCS/q1wiQ=; b=c SVvjHZW7leUupoWtwQzs2KGAGP1NzpSJJM9Q9sj20g68i9Y2v900JS/RhF5Qn5sn mm6cWYET0JBcvoqpU9hZ89SYbAR3Q0RKwYvS21v8hfLTPAasNQwWMI4tf+zCj8la iKd/FViHZ7YGiRmKWfFMIzp9vchz4QRQSMNLO6vPlbXxoS5Dj7c+OD30/v+3mKYj mWufU35DmV627+cdywCQLLuXDf4EXHrt5WmBR+DhJyT63pih7Lnhs41P/nouwGdY +j7bvfNkKBY+fUG+FNEEJNaCDSKbdNmPSg0btGfBuu6VqUO4ePVJ++WmBhWwAyUY zof0MY9Uv7vidd55gOdzA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1650348872; x= 1650435272; bh=F0a+Jm1OcZ0z3R6KMW5TmU0EfI6C5UESEqDCS/q1wiQ=; b=e 8jUaIPnQP/AxEgPsYdaLZNMK1cOuDPfUhPn9m+L4cYk0Cwcmy4+tPTV7mP+07ZA+ bzSWkVwMPv7Chgyt1xhZSVDVU/3AebYNcS4z/7dKzH7tSJxIeCkEc3TYtdbxDkDx qG/GLSlb0p9eJLmPkqRDsunUhzOLdwyXVTWC3SBhsdJf6QYEt47ydiyDA8mr1kyV Au3TUS+2iCX3lONnbGwXf+urgae/9GRecxEIblinKv2eDB9D8yJ1OSRICNuA/nwd /JSVRYtMLM4D6/nnftn2C0peSpSkj+fFPamjhqwyqIHQgrd0Y9L8KT5nsMPjflmR F80JXuOUhyjDkDKepTdpg==
X-ME-Sender: <xms:SFNeYuEN08U0TopbCzgMODonPQLEjcsxFfnHt-8zDh8ytHAj5V2PUg> <xme:SFNeYvUqtwqCgGuUVGH0Mq4YL0Di1golSq4SNGyten4cw6zEmeFNwCHG67jDpeqO8 wbDcfR75XfW1A>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtvddguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfpfgv ihhlucflvghnkhhinhhsfdcuoehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomh eqnecuggftrfgrthhtvghrnhepheeuhfdujedtieevkedvhfffgfelfeelhfefkeehhfek leekhfefueefveffjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepnhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:SFNeYoLA0Sfy2T9BYnZMBfDWA46DoknHXIXsAG5d3a5s37p4MiS6eg> <xmx:SFNeYoEv_99uGgvI1BnMbQ-6MEa4aiFqqQN1kkaEddb16VNNivOhqA> <xmx:SFNeYkXkhInyal7k0LBdEeYjxvMQMGn_wN9Q7Y2gggXVzbd9yWLZPw> <xmx:SFNeYsjzqOLd8rpS-xocgNSRtoy4lSoJMh3ZNH5GC8k7KZfT9_oAcg>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5CD9AAC0E98; Tue, 19 Apr 2022 02:14:32 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.7.0-alpha0-568-g521196dd5d-fm-20220414.001-g521196dd
Mime-Version: 1.0
Message-Id: <d1c81dfe-f552-48bc-9365-5c3d2ad4b36f@dogfood.fastmail.com>
In-Reply-To: <164840486711.29024.8028686731542270779@ietfa.amsl.com>
References: <164840486711.29024.8028686731542270779@ietfa.amsl.com>
Date: Tue, 19 Apr 2022 16:14:04 +1000
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="693c95208be648f68a959d0fef1c5844"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/7xqjHKnwWMRADZc9pFhcv2B3ha4>
Subject: Re: [Jmap] I-D Action: draft-ietf-jmap-blob-11.txt
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Apr 2022 06:14:45 -0000

A few comments on this draft:

It seems to use the type signature conventions of the core spec, but doesn't explicitly say this in the "Conventions Used in this Document" section. Presuming this is the intention thoughm the type for `supportedTypeNames` should be `String[]|null`

> *4.1 The result is the same as for Foo/set in RFC8620* […]

I think this could be clearer. Specifically, it's not the same as a standard `/set` in that there are no state strings in the response (as well as no updated/destroyed of course).

> *NOTE: Servers MUST set the creationIds value to the blobId returned in any successful Blob/upload's created response to allow backreferences, as that is the main purpose of this extensions.*

Again, I feel like this could be clearer. It's really saying an entry must be *added* to the `createdIds` map in the request for each successful upload, so the blob id may be used via back reference in a subsequent method call.

> data: `[DataSourceObject]`

Should be `DataSourceObject[]`. (There are a number of other instances like this in the spec; I won't keep listing them here)

> Exactly one of:
>  * data:asText: String|null
>  * data:asBase64: String|null

These are missing descriptions to specify exactly how they are to be interpreted.

> or a blobId source:
>  * blobId: Id
>  * offset: UnsignedInt|null (MAY be zero)
>  * length: UnsignedInt|null (MUST NOT be zero)

Why must length not be zero? You are allowed a zero length blob. Also

> If `null` then length is the remaining octets in the blob.

So what if there are zero octets remaining?

> 4.1.2. Blob/upload complex example 

Still has properties from `/set` in the responses that should not be there.

> 6.3. Creation of "JMAP Data Types" Registry 

There's no documentation here on how to add or modify entries in this registry in the future.

Cheers,
Neil.