Re: [dnssd] SRP Update - removing individual services (draft-ietf-dnssd-srp-06)

Ted Lemon <mellon@fugue.com> Fri, 18 December 2020 13:20 UTC

Return-Path: <mellon@fugue.com>
X-Original-To: dnssd@ietfa.amsl.com
Delivered-To: dnssd@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 874AB3A0637 for <dnssd@ietfa.amsl.com>; Fri, 18 Dec 2020 05:20:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fugue-com.20150623.gappssmtp.com
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 LJE41vETV9GM for <dnssd@ietfa.amsl.com>; Fri, 18 Dec 2020 05:20:52 -0800 (PST)
Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C5333A067A for <dnssd@ietf.org>; Fri, 18 Dec 2020 05:20:52 -0800 (PST)
Received: by mail-qt1-x82b.google.com with SMTP id j26so1190671qtq.8 for <dnssd@ietf.org>; Fri, 18 Dec 2020 05:20:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fugue-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=iZe7t+YxirdB2yCYn6mod7bWRTAOHC0efJGEF5dDJ0Q=; b=Z6C+mra4ZStrwvKmqk8+PUVwk7AXZ7YqSkAqYj8gZi7Gy34kvOeH29B3Sg+sOeHvqQ gAwZKAfcPABN1Z1DQ5LLITjm34W7zSqx9D0RG21tcc2HM5lyKEA4M9GgL4Jmjo/oMjQn 2iejTOnNKp7vYTyaZTXDGSJB1iuvPkoROoLEynkLFlcGSjkWRGe4qjfO2v2yqEYjD/b3 Vro4NH+KLFnuj6BqAXfZSYFDqiknCoBdGmLWWHBbZr6iWI5Cn91/FCYrnVTPN/S1rf2t B+y6HZiZinRNlwjn//7oI9vmmbLiFZ+GoyLOK9Q94dYpYzUyKDTlFr0SwpjQpeR6aQGZ jS5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=iZe7t+YxirdB2yCYn6mod7bWRTAOHC0efJGEF5dDJ0Q=; b=i0nL6zLLV3uirvyvD8HBkFUHVxp42+xKUzyIQPrDdUhfDMXmaXo2SzWKMyRvAwNir9 7D3iNzWKaSh1BfeoENl8nii3CBSK08wWjM8RhexKThCMy4SZdrxL1DZhyT10O7Jme7C4 6zxTkZI9ip0zB+Pf0GcAttjMZxBxqqnyYRcN3dmGwbCRLkmyXzP0h3lPDzzyEOJXowPy 3cJaCDSOLoF2ewN/c7JwFHq1NItn6OtQCbHghb/dIxt9/OAljorlNUhDZFpwheva1MwD ZpnIgf5RVYKwBvd7cq/cYCi59DsnTaOcPuU0/BC6M/Pj880aydzoEssmXbAL32MwiSBi VSag==
X-Gm-Message-State: AOAM5313WGxKBJImWn9Gs2yunjirsRVunfURXLCkrbfin4FpTx38yzBA BNdJP8M/ejNcH3u/PlZtQjl3Ag==
X-Google-Smtp-Source: ABdhPJz2G6QN75uOiEtApVslbtvC2TcPI6/WFhRpnl6ruEtVCgUbymh1wNvFSaIkwnPgZVLBcjzojw==
X-Received: by 2002:ac8:6895:: with SMTP id m21mr3859852qtq.20.1608297651511; Fri, 18 Dec 2020 05:20:51 -0800 (PST)
Received: from [192.168.4.70] (c-24-91-177-160.hsd1.nh.comcast.net. [24.91.177.160]) by smtp.gmail.com with ESMTPSA id c139sm3911317qke.24.2020.12.18.05.20.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Dec 2020 05:20:50 -0800 (PST)
From: Ted Lemon <mellon@fugue.com>
Message-Id: <741BC8D6-CFEF-453B-8F89-A6B102A37DAA@fugue.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_316B31BB-66A7-4992-AEFF-FA8C1C7E12D7"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\))
Date: Fri, 18 Dec 2020 08:20:49 -0500
In-Reply-To: <CAJ5Rr7bDSMv1uPDPXppG9e4OUEU7oriK9tVKD20=P3Kgb2q=0g@mail.gmail.com>
Cc: Abtin Keshavarzian <abtink@google.com>, DNSSD <dnssd@ietf.org>, Jonathan Hui <jonhui@google.com>, Rongli Sun <rongli@google.com>
To: Kangping Dong <wgtdkp@google.com>
References: <CACce4dTbWCVwBityepJpb5FF4Rv43+DUev_0Ka+rVT9exZrJzA@mail.gmail.com> <031C980F-D8B6-4051-8DC0-D8417FDBBD0F@fugue.com> <CACce4dQZ708aaMdvmwhEurHDSdFAvLbzwpDWz=viig_2cX75Dw@mail.gmail.com> <680A60B6-BD88-475E-91ED-48F23036A7C8@fugue.com> <CAJ5Rr7bDSMv1uPDPXppG9e4OUEU7oriK9tVKD20=P3Kgb2q=0g@mail.gmail.com>
X-Mailer: Apple Mail (2.3654.40.0.2.32)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnssd/sNFgZa2IxkLk1xD7-w8dceRhxJU>
Subject: Re: [dnssd] SRP Update - removing individual services (draft-ietf-dnssd-srp-06)
X-BeenThere: dnssd@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of extensions to DNS-based service discovery for routed networks." <dnssd.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnssd>, <mailto:dnssd-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnssd/>
List-Post: <mailto:dnssd@ietf.org>
List-Help: <mailto:dnssd-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnssd>, <mailto:dnssd-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Dec 2020 13:20:55 -0000

On Dec 17, 2020, at 11:02 PM, Kangping Dong <wgtdkp@google.com> wrote:
> I'd like to summary my understanding of what current SRP-draft-06 is doing/allowing:
> We can add services separately. like, we can add "service-1" and in the first SRP update and "service-2" in the second SRP update.
> We can only remove all the services together with its host because "exactly one Host Description Instruction" is a MUST for each SRP update.
> But the spec seems, is not enforcing this behavior:
> Therefore, SRP servers MAY remove all
> service instances pointing to a host when a host is removed, even if
> the SRP client doesn't remove them explicitly.
> If we cannot remove individual service without removing the host, should the "MAY" be a MUST?
> Otherwise, there may be no efficient way to clean up the service until the lease time expires.

Yes, I think this is an oversight in the specification. What my implementation actually does is to remove all the entries when we see a “lease 0” update with a valid host record that’s signed with the right key.

> To remove a service registration, the SRP client retransmits its most
> recent update with an Update Lease option that has a LEASE value of
> zero.
> Does it remove only the services in my most recent update or all services I have ever registered?

My implementation does the latter. It tracks what services are registered per host.

> This is what
> I was confused about and thought we can remove individual service. As we cannot remove individual service,
> I think we don't need to retransmit the most recent update: It may be more efficient to always transmit a
> SRP update with only Host Description Instruction and zero lease time. Thoughts?

Yes.

> For the current use model, I agree it will work for most cases and removing individual service may be rare
> (even there are, it can be done with a "removing all" and an add). So I don't have a strong opinion to support it.

I don’t think we really have enough data to say. In the interests of being general, I think it’s probably worth specifying how to remove individual services. This is what I’d originally intended—I did the “lease time 0” hack because it was expedient, not because it was the right thing to do.

I’ll spin a -07 later today if I have time that makes this change and addresses your other concerns from above, and then if you’re willing, you guys can review my changes and see if they are sufficient.