Re: [dnssd] Please review substantive changes to Update Lease

Ted Lemon <mellon@fugue.com> Thu, 02 February 2023 22:08 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 AA9D9C1575CC for <dnssd@ietfa.amsl.com>; Thu, 2 Feb 2023 14:08:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.896
X-Spam-Level:
X-Spam-Status: No, score=-6.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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=fugue-com.20210112.gappssmtp.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 KLnzJD3qe-UO for <dnssd@ietfa.amsl.com>; Thu, 2 Feb 2023 14:08:32 -0800 (PST)
Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 6430FC1575C9 for <dnssd@ietf.org>; Thu, 2 Feb 2023 14:08:32 -0800 (PST)
Received: by mail-qk1-x734.google.com with SMTP id ou35so1623294qkn.5 for <dnssd@ietf.org>; Thu, 02 Feb 2023 14:08:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fugue-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zpugoVEGOBarUSiQSOE8rdZAqAkQCYB3vVOV5NiVRHc=; b=r23V1YxUTLdzL4+NsiXGb5/mzx6mM2DHwXKwQ0NBz7/wBZEpUAhWafLmZx0y5XCkOF Mxgw9BXD49OBd7cZ/8PjZNcAWJKPnDgSMLTJFG6GT0tyvyA4fRFgYwN2HpLUaCw3KPrZ lozUmWN/Y1e6FUuEphgPBlFWDNqx+ftVUT4fqY1P70Q9qc2q7ToZkIK9SOFaC/A8iw6o xL0k07gOJy29eZUy2dWvCdgZd/nEpFuTLYIzseeHMdTgkL+EKZPjrhNtN0PlvmLCC+QE NZuZXNTi0RU8utsmYsiQpdBOMSKr3lLo6aVO5IoTIZTC4RDBm1OlpAi7WpHhlcFcDiUE N3vw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zpugoVEGOBarUSiQSOE8rdZAqAkQCYB3vVOV5NiVRHc=; b=vvg/pYG/L2LQl+QXjwSUWCrMmT6ueNKtVPTY/eZtRhTW4GMbemcnUZrswDV6vpepQD kxTFpZtfcMo5KkfTLgVTbCkitiEElvw/zwvlXXJEchQIWHgh6kRTEb6PmsrQPnxOsiFa d7SVtdeCJpw8Yk/w+XTrpCXG6rThDwqShC0uS88ksfJnPVJbZoFAbpUnSpuAx8RUt2P0 ZNn1IucwUr9B2Dx570wpfvUdtpod1lm6IZsU+qZpNZna5xCtv4lkiJxQW8E/AzZxJeZP 71X0EyeoAvY/dv3wNoa82dU9HldO1UsHcIrN5POJzfzkVnrv09wlW24lwi74hXs8oTQN G9kA==
X-Gm-Message-State: AO0yUKXyYUAzL6qv6rWe/hZMjNJAmuhWLDmtD12DusMMjPc7VJMr+WOH D+jXTerFarzQvQolXcMko9ls/wOWcfWTdHrkE/yvQQQ75PaWh86g
X-Google-Smtp-Source: AK7set/PcEd4aix+kE9urBJtjFXAuqngD7OZai3OyzIgDaugawDJnh6BgZKIeX8zMEF+wfzA6BUu2Egd4KoOBHtWhqU=
X-Received: by 2002:a05:620a:882:b0:727:f71e:8ec1 with SMTP id b2-20020a05620a088200b00727f71e8ec1mr682711qka.163.1675375710719; Thu, 02 Feb 2023 14:08:30 -0800 (PST)
MIME-Version: 1.0
References: <CAPt1N1mZ9+o5vZ3Ut7RH6hdQgQsQqxz36uvyT+7H7GFPyHz1Fg@mail.gmail.com> <CACJ6M179+Rf+Qw-t7P+xKNQeRYcfRma_YRyT3Ayy-Osu8rcgsQ@mail.gmail.com>
In-Reply-To: <CACJ6M179+Rf+Qw-t7P+xKNQeRYcfRma_YRyT3Ayy-Osu8rcgsQ@mail.gmail.com>
From: Ted Lemon <mellon@fugue.com>
Date: Thu, 02 Feb 2023 14:07:54 -0800
Message-ID: <CAPt1N1=FzJtvMyfEt5_rWyYHsw6mo4zONSgzwYiRh9jbOFSq1A@mail.gmail.com>
To: Chris Box <chris.box.ietf@gmail.com>
Cc: dnssd <dnssd@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000001a683605f3becef3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnssd/B5uVS2Tvr8omihiUd-RF7pjRIcQ>
Subject: Re: [dnssd] Please review substantive changes to Update Lease
X-BeenThere: dnssd@ietf.org
X-Mailman-Version: 2.1.39
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: Thu, 02 Feb 2023 22:08:36 -0000

On Thu, Feb 2, 2023 at 10:26 AM Chris Box <chris.box.ietf@gmail.com> wrote:

> Section 4.1 now has this, committed in
> https://github.com/dnssd-wg/draft-ietf-dnssd-update-lease/commit/0e0da091040b56d6abc6223277819ab770f31591
> <https://github.com/dnssd-wg/draft-ietf-dnssd-update-lease/pull/18/files>
>
> When sending an initial update, the requestor MUST delay the initial
>> transmission by a random amount of time across the range of 0-3000
>> milliseconds, with a granularity of no more than 10 milliseconds. This
>> prevents synchronization of multiple devices of the same type at a site
>> upon recovery from a power failure. This requirement applies only to the
>> initial update on startup: since renews include a random factor as well,
>> any synchronization that occurs after such an event should quickly
>> normalize.
>
>
> My personal thought on this, wearing no hats, is to wonder how realistic
> is 10ms accuracy for a low-power device? I understand the rationale, which
> is to permit 300 different slots in which the transmission could occur.
> However I wonder if the granularity ought to be a softer requirement. Views
> from implementers needed.
>

FWIW, I think the main issue with low-power devices is that when you are in
a sleepy mode, you don't want to turn the radio on too often. From that
perspective, as long as we know when to turn the radio on, I don't think
the actual time we turn it on matters much. There may be transports with
precise time-slice characteristics that would prevent this from working,
and they wouldn't be able to conform to this. We could make it a SHOULD and
explain this—devices that can't do this tend to be part of ecosystems like
Thread where there's an additional spec that can say how such devices
behave in that specific environment.


> Section 5.2 has this, committed in
> https://github.com/dnssd-wg/draft-ietf-dnssd-update-lease/pull/18/files
>
> In order to prevent records expiring, requestors MUST Refresh resource
>> records after approximately 75% of the original lease has elapsed. This
>> interval MUST be adjusted randomly by +/-10% so that after a network
>> restart, subsequent Renews do not remain synchronized across devices
>> affected by the power failure.
>
>
> Personal thought again: does this mean the client code should aim for a
> range of 65% to 85% of the original lease? Or does it mean 67.5% to 82.5%?
> I don't think it really matters either way, but it would be good to be
> clear about our intention. We should also ask ourselves if there are valid
> reasons why refresh should occur later than 85%.
>

Yeah, I meant 65%-85%. DHCP uses 85%—I think that's generally a better
number than 75%. I think going much past that isn't a good idea, though—it
doesn't give you much of a window to survive temporary outages. Maybe 20%
variance is more than we need though. Probably 80-85% would be perfectly
adequate.


> Finally, section 8's security considerations are rewritten and greatly
> expanded. The commit was
> https://github.com/dnssd-wg/draft-ietf-dnssd-update-lease/pull/19/files.
>

> Section 8 <https://rfc-editor.org/rfc/rfc2136#section-8> of [RFC2136
>> <https://www.ietf.org/archive/id/draft-ietf-dnssd-update-lease-04.html#RFC2136>]
>> describes problems that can occur around DNS updates. Servers implementing
>> this specification should follow these recommendations.
>> Several additional issues can arise when relying on Update Lease. First,
>> a too-long lease time is not much different than no lease time: the records
>> associated with this lease time will effectively never be cleaned up.
>> Servers implementing Update Lease should have a default upper bound on the
>> maximum acceptable value both for the LEASE and KEY-LEASE values sent by
>> the client. Servers MAY provide a way for the operator to change this upper
>> limit. We recommend that the default values for these limits should be 24
>> hours and 7 days, respectively.
>> The second issue is that a too-short lease can result in increased server
>> load and a failure to persist data subject to such a short lease. Servers
>> implementing Update Lease MUST have a default minimum lease interval that
>> is acceptable. We recommend a minimum of 30 seconds for both the LEASE and
>> KEY-LEASE intervals.
>> There may be some cost associated with renewing leases. A malicious (or
>> buggy) client could renew at a high rate in order to overload the server
>> more than it would be overloaded by query traffic. This risk is present for
>> regular DNS update as well. Servers MUST have a minimum interval before
>> which they will not accept a Refresh for a recently updated record. Such
>> messages MUST be silently ignored.
>> Some authentication strategy should be used when accepting DNS updates.
>> Shared secret [RFC8945
>> <https://www.ietf.org/archive/id/draft-ietf-dnssd-update-lease-04.html#RFC8945>]
>> or public key signing should be required. Keys should have limited
>> authority: compromise of a key should not result in compromise of the
>> entire contents of one or more zones managed by the server. Key management
>> strategy is out of scope for this document, however. An example of a key
>> management strategy can be found in [I-D.ietf-dnssd-srp
>> <https://www.ietf.org/archive/id/draft-ietf-dnssd-update-lease-04.html#I-D.ietf-dnssd-srp>],
>> which uses "first come, first-served naming" rather than an explicit trust
>> establishment process to conver update permission to a set of records.
>
>
> Personal thought: "Servers MUST have a minimum interval before which they
> will not accept" could be made a bit easier to parse, e.g. "Servers MUST
> have a minimum interval for accepting Refreshes. Such messages that arrive
> before that time MUST be silently ignored."
>

Yes, that's a good clarification.