[Jmap] Re: Mahesh Jethanandani's Discuss on draft-ietf-jmap-contacts-09: (with DISCUSS and COMMENT)

Neil Jenkins <neilj@fastmailteam.com> Thu, 06 June 2024 06:03 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 8C96DC1D61EB; Wed, 5 Jun 2024 23:03:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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="R8ZAXXzY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="j/sylEqs"
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 ufFQz44rI2EN; Wed, 5 Jun 2024 23:02:59 -0700 (PDT)
Received: from fhigh1-smtp.messagingengine.com (fhigh1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D3510C1D4A93; Wed, 5 Jun 2024 23:02:58 -0700 (PDT)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9CABE11400E0; Thu, 6 Jun 2024 02:02:57 -0400 (EDT)
Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Thu, 06 Jun 2024 02:02:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=cc:cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1717653777; x=1717740177; bh=j2MRqxVaov9+b2/YZY3dpEhCu6l8qs0TGv1+qWNLMbU=; b= R8ZAXXzY5MV2/utQirgCNGWa/ikSp8vxzlM2weRHxKJeb0d88XFs0Zrs4gcSAnDN udnm+WHRBR0GPd3dp6m8Urxscqkdn+uu0AqaOIKk3Tfu6wCLRC29crjbersytVTT fjQLfxUs04Kndlz3o0LwW6d+Bosi0lL2ubf7lAVyPZ5RLv8lSbuzdV5RE/WFa8LI b6AZ1uQUo6BfUrtaEiAR06bg1YG1WzemeesKEGQpvkB6juq34jryF1Uz00BR10dP E9drv6kUBTHRr9igm0dLO6p9geJYqPvJ63JEEP0Y8HBWyWGjrK535dnzuIGZFXAz rco5QEt9uayo1jdvmZX1fQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717653777; x=1717740177; bh=j2MRqxVaov9+b2/YZY3dpEhCu6l8 qs0TGv1+qWNLMbU=; b=j/sylEqs352MQn574L+BUqv5w9R2QBmYJgvlkkjIDzhm KPaRLesJxRfCpiY320PqSCr75lETF4vlcgZEFVKEnoIHIP/Hp2R3wT9EECLs54z+ QusZ/fmWENavp93YL1dkRFIPJmyF2heaO7Dj7gPicPMFoKsD2ulYFYIC2/njKZ7B wxzdivrgh/RgCwXGcsIWIyUZsuShk+HWnfscOKKaAaZGshR8eUPa12epNKvHjB2f LysS3Fb3GNGGAsei/Q0EJORkeWe2hI1hr75GewiZ+e/RV9K8vi1eowsbxQ8UrUQP r7J/1YAhOQLxM+/iXKSHCIxHCGerruArEiNiI0dKMw==
X-ME-Sender: <xms:EVFhZiLz-KliMsQSIRLSJF5vGAxACgfL2Ka-kYpenhYeSYkwaxEfnQ> <xme:EVFhZqItvvCX82fKM8OohKgl4SjmuOXhJmzHJzkG9ojGRVR0aZ42Lh9apj2Y4ILcF MyCdpe9RU5RIQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeljedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreerjeenucfhrhhomhepfdfp vghilhculfgvnhhkihhnshdfuceonhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtoh hmqeenucggtffrrghtthgvrhhnpefhvdehgfelkeelffegieeileetfeffudejkefgkeeh leeiteekueffheeuffehueenucffohhmrghinhepihgvthhfrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnhgvihhljhesfhgrshht mhgrihhlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:EVFhZitSseLodI1fNWqZppNXw5gDh6-Lt6-6K2wWCJ1FVcZCRSBkpQ> <xmx:EVFhZnYK2iNy7yqe5kivojELrQV43eadKwUeMjC7TdEYt39cc9MdXg> <xmx:EVFhZpY8SF62V18ESFxl3ND4o5EMZxi0wDf-00oBj5173gb4j4tsmg> <xmx:EVFhZjAsX3pxlJCPvU8FTzmVUyvt3-xvzNCJTq5FVOFevFK8dVGvvw> <xmx:EVFhZsxRoxipcFeUX-HpZMp9iu5fb3Eyvm2JNd09rASajRHD1LtCMSuC>
Feedback-ID: ibc614277:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 011612D4007D; Thu, 6 Jun 2024 02:02:56 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.11.0-alpha0-515-g87b2bad5a-fm-20240604.001-g87b2bad5
MIME-Version: 1.0
Message-Id: <757b8e8b-ef9c-461a-86ac-82f861ab9d94@dogfoodapp.fastmail.com>
In-Reply-To: <1962CBFE-3ECB-436D-959D-23DFD60AA303@gmail.com>
References: <171625301728.10738.743002934797335476@ietfa.amsl.com> <7a00bc9d-d339-4a31-b566-12ceaf3841d5@dogfoodapp.fastmail.com> <1962CBFE-3ECB-436D-959D-23DFD60AA303@gmail.com>
Date: Thu, 06 Jun 2024 16:02:56 +1000
From: Neil Jenkins <neilj@fastmailteam.com>
To: Mahesh Jethanandani <mjethanandani@gmail.com>
Content-Type: multipart/alternative; boundary="77cf80e99cfe467e92eb4c0ed27592c3"
Message-ID-Hash: OH5YYTUMQEW7OFTFXHI6SKVFBIBXBCGL
X-Message-ID-Hash: OH5YYTUMQEW7OFTFXHI6SKVFBIBXBCGL
X-MailFrom: neilj@fastmailteam.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-jmap.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: iesg <iesg@ietf.org>, draft-ietf-jmap-contacts@ietf.org, jmap-chairs@ietf.org, IETF JMAP Mailing List <jmap@ietf.org>, Jim Fenton <fenton@bluepopcorn.net>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Jmap] Re: Mahesh Jethanandani's Discuss on draft-ietf-jmap-contacts-09: (with DISCUSS and COMMENT)
List-Id: JSON Message Access Protocol <jmap.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/JoyMVGuiV8Jmw7kV3XV6lMN3LDc>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Owner: <mailto:jmap-owner@ietf.org>
List-Post: <mailto:jmap@ietf.org>
List-Subscribe: <mailto:jmap-join@ietf.org>
List-Unsubscribe: <mailto:jmap-leave@ietf.org>

On Mon, 3 Jun 2024, at 08:31, Mahesh Jethanandani wrote:
> Thanks for that explanation. How about this?
> 
> OLD:
> If false, any attempt to destroy an AddressBook that still has ContactCard in it will be rejected with an addressBookHasContentsSetError. If true, any ContactCards that were in the AddressBook will be removed from it, and if in no other AddressBooks they will be destroyed.
> 
> NEW:
> If false, any attempt to destroy an AddressBook that still has ContactCard in it will be rejected with an addressBookHasContentsSetError. If true, any ContactCard that is in the AddressBook that is set to be destroyed. will be removed from it, and if the ContactCard does not exist in any other AddressBooks it will be destroyed.

Thanks. I've tweaked it slightly but kept the substance of your rephrasing:

If false, any attempt to destroy an AddressBook that still has a ContactCard in it will be rejected with an `addressBookHasContents` SetError. If true, any ContactCard that is in the AddressBook will be removed from it, and if such a ContactCard does not belong to any other AddressBook it will be destroyed.

> My question is about a ContactCard that is present in multiple AddressBooks. Take your example above, Bill appears in two AddressBooks, Work and Personal. And I will take the example of Apple’s Contacts App that I use. I use the search capability in the App to find the ContactCard for Bill, find it, select it, and hit the delete button. What happens?

Well, the exact answer is that Apple's Contacts app currently only supports CardDAV, which does not support a contact card belonging to more than one address book. So this will destroy the card.

A server that supports both CardDAV and JMAP Contacts can choose either:
 • To limit contacts to also only being in one address book (via the maxAddressBooksPerCard capability <https://www.ietf.org/archive/id/draft-ietf-jmap-contacts-09.html#name-addition-to-the-capabilitie>).
 • To support an implementation-specific mapping. I would expect at Fastmail for example we would implement this as just removing it from the single address book, not destroying the card and thus removing it from both.
Similarly, if Apple's Contacts client added support for JMAP Contacts, it could make a UI decision of what to do in this instance, but that is independent of the API exposed.

> Based on all the explanations, what I understand is:
> remove: A ContactCard can be removed from an AddressBook, but MAY NOT be destroyed.
> destroy: Once a ContactCard is removed from the last AddressBook that it is existed it, it is destroyed

This doesn't make sense to me, perhaps because I'm coming from a JMAP core understanding first. JMAP is at it's heart a CRUD mapping. So if I have a ContactCard I can either update it (modify a property on the object) or destroy it. The AddressBook(s) that a ContactCard is in are modelled as a property on the ContactCard containing a set of AddressBook ids. A ContactCard MUST belong to at least one AddressBook.

Therefore, you can either:
 • Update the contact card to add or remove AddressBook ids, i.e. to add or remove it from an address book. But you can't violate the constraint that it MUST belong to at least one address book via an update.
 • Destroy the contact card.
Does that clarify?

Cheers,
Neil.