Re: [Ntp] Draft extension NTS for pools

David Venhoek <david@venhoek.nl> Wed, 10 January 2024 11:18 UTC

Return-Path: <david@venhoek.nl>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2AE81C09C231 for <ntp@ietfa.amsl.com>; Wed, 10 Jan 2024 03:18:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=venhoek-nl.20230601.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 BsOP1maspnp0 for <ntp@ietfa.amsl.com>; Wed, 10 Jan 2024 03:18:36 -0800 (PST)
Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 95181C09C230 for <ntp@ietf.org>; Wed, 10 Jan 2024 03:18:35 -0800 (PST)
Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a2a360dbc11so404234666b.2 for <ntp@ietf.org>; Wed, 10 Jan 2024 03:18:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=venhoek-nl.20230601.gappssmtp.com; s=20230601; t=1704885514; x=1705490314; darn=ietf.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yqMbsGZw2OUymjG02P/SQ5MIP0+QeF1zvQTtlnCa1tA=; b=Fl181A3EFthbjesqb2/a+CNWCol274hWvrRg/E/z5SqF8tKG2P3rocciyxmz7oOtwF i4KEqDUNNa6QTgl0HVGLxORyOUI8dvEVm1+gSN7daUBBkoGSeESRaCzolToK4sO/tX+e 1P/kECoKkNZMYHtvjv00yvmewAIHPXKL2m3NFb/R912MT4pyS+d+ZVISKYg/UwvLthDX Cjr8JGomB0+j5owOFSTRDe4UBhbSYXtnc9LNJ+TlVFemUDRCE90zUdRW7DWsABYYkwqm 1YW4J+J4qaFmK8HWKqplJcEry3a+dgGPDAauHwyZTmibaVFW/UHNUAOPJoHG+FCoI8gT kAPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704885514; x=1705490314; h=content-transfer-encoding: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=yqMbsGZw2OUymjG02P/SQ5MIP0+QeF1zvQTtlnCa1tA=; b=BNQQuIYUSZoFqn95Xv4If+914tYAp6OUKROCZcek+e8NmNIfZT79fFb1z4QJFCWRU8 +qf05pFB+9FWD9IoxgcIw6qbWlSjOfGmF/ilqeHKr84jyG3ggSaGvRrCHXFJI30RP5je O+SimPWzr9F+bOO/V7hvgNpl6/NeDtDhsXb5HNAQyFp0G7n5ZM2MASZcnyVTiJ/J0Jwc HBDYGmv5sbTqCcRCLj0iJb2KJZxjiIw3uk8OlvAvFn1fq7NYeKQIxICd8NxqtkMVyQDh Ic7tVoLT6aBDo2D4P+BZxKdHPBkw4CpezfJs257iMCxUDjChJNfl0kHJAdkHUXCZhNbD ULmg==
X-Gm-Message-State: AOJu0YwNZ0AAjx6hrlG2pBA4/GDsiysJ9Qbi9FD5Gjwf5GgS3OqsVT+u O6KHwUgSOXiy3ZTweh9uS7xbE3ag6bAxR93U/GoAIozbYvpRLgDksxVugd1WYU8=
X-Google-Smtp-Source: AGHT+IFy+GWX2S8Q4lgHfhoIk3cnHSFvdAj389LwFbmMesUeEEcs/wGnG5HvuhLLLGwnsfUNIXNHf3MPyX8dPBQ0gCA=
X-Received: by 2002:a17:906:d8ac:b0:a26:f957:b9c2 with SMTP id qc12-20020a170906d8ac00b00a26f957b9c2mr505675ejb.0.1704885514169; Wed, 10 Jan 2024 03:18:34 -0800 (PST)
MIME-Version: 1.0
References: <david@venhoek.nl> <CAPz_-SWidPW1bACgt_dN7saGfjPYbXtZLbqFpTGhPj5OOK4xYg@mail.gmail.com> <20231224053610.3C8E028C002@107-137-68-211.lightspeed.sntcca.sbcglobal.net>
In-Reply-To: <20231224053610.3C8E028C002@107-137-68-211.lightspeed.sntcca.sbcglobal.net>
From: David Venhoek <david@venhoek.nl>
Date: Wed, 10 Jan 2024 12:18:23 +0100
Message-ID: <CAPz_-SVy7Md9YNOR0k9WHiSbrfMAkAkVbHfJgsJeaYfM-wwswA@mail.gmail.com>
To: Hal Murray <halmurray@sonic.net>, NTP WG <ntp@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/k9K5H7OsotP72PHsM_8v8jzSmnE>
Subject: Re: [Ntp] Draft extension NTS for pools
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Network Time Protocol <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Jan 2024 11:18:39 -0000

Thank you for the feedback, below inline my responses to a number of points

On Sun, Dec 24, 2023 at 6:36 AM Hal Murray <halmurray@sonic.net> wrote:
>
>
> I think the pool as we know it and security are incompatible.  The problem is
> one of trust.  If you have a large collection of volunteers, there is no way
> to know that they are all good guys.  NTS can ensure that you are talking to a
> pool server, but not that the operator of that system is a good guy.

True, however there is still some value in ensuring you are talking to
a specific pool server from a security point of view.

> I could imagine a pool run with a restricted membership.

This is one of the scenarios we are considering when moving this more
towards operational.

>  ...
>
> ---------
>
> Your draft is well written.  I think I could implement from it without much help.
>
> I think it needs a big warning about trust and the current pool.

Feel free to provide text for a concrete suggestion on this.

> Section 5: Pool authentication
> I don't understand
>   To discourage misuse, ...
> What sort of misuse do you have in mind?  What could a bad guy do if he gets cookies for an arbitrary key?

The honest answer here is that we don't have a concrete attack that
could exploit this. However, we felt very uncomfortable to allowing
arbitrary clients to do this, as it is something that isn't possible
in the original design of NTS.

As for the misuse, if this were open for arbitrary clients, somebody
could implement a client that requests cookies for itself but still
chooses the key manually. This is a bad idea because it opens you up
to potentially choosing bad keys (insufficient randomness, that sort
of thing).

>   ... MUST authenticate clients using the Fixed Key Request
>   record using TLS client certificates.
>
> At first glance, that seem overly strong.  Yes, client certificates are a good way to authenticate.  Why isn't filtering by IP Address good enough?  It might be simpler to implement with firewall rules.  But that's not good enough if you are worried about MITM attacks.

Filtering by IP isn't enough, as authenticity of IP addresses isn't
guaranteed. Also, IP addresses as identities are less stable than may
be desirable for a server. We chose to specify TLS client certificates
specifically because that avoids specifying our own authentication
scheme, and ensures all servers support the same mechanism.

On the whole, I think I am open to relaxing these particular
requirements to a SHOULD, but we made these particular choices out of
an abundance of caution. Note that they don't impact performance much
since these connections can be persistent for decent amounts of time.

>
> Section 6.5. NTP Server Deny
>
> > A client MAY send multiple of these records if desired. The data in the
> > record SHOULD match that given through an NTPv4 Server Negotiation received
> > in an earlier request from the same NTS Key Exchange server.
>
> I think this area needs work.  I need to be able to avoid servers that I got some other way that also happen to be in the pool.
>
> And you might have multiple servers for load sharing so "the same" gets complicated.

I agree that this isn't a perfect solution, though to be honest I
don't see a good way to do better. For avoiding servers you get in a
different way, these may be known to you under a different name than
the pool knows them by, so avoiding those via these records may or may
not work. That is the primary reason for the SHOULD here (ensuring you
provide a name knowable to the pool).

"the same" was intended here in the logical sense of the word, so
multiple servers for load sharing would still be "the same" for the
purpose of this clause, but maybe we should clarify that some more.