Re: [Ntp] NTPv5: big picture

Magnus Danielson <magnus@rubidium.se> Sat, 02 January 2021 02:01 UTC

Return-Path: <magnus@rubidium.se>
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 3B6F93A0965 for <ntp@ietfa.amsl.com>; Fri, 1 Jan 2021 18:01:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 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, NICE_REPLY_A=-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=rubidium.se
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 Uf3YsQraoUAu for <ntp@ietfa.amsl.com>; Fri, 1 Jan 2021 18:01:33 -0800 (PST)
Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 653843A0964 for <ntp@ietf.org>; Fri, 1 Jan 2021 18:01:29 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 4B9F53F738; Sat, 2 Jan 2021 03:01:12 +0100 (CET)
Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (2048-bit key; unprotected) header.d=rubidium.se header.i=@rubidium.se header.b=FpOla9mr; dkim-atps=neutral
X-Virus-Scanned: Debian amavisd-new at bahnhof.se
Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (2048-bit key) header.d=rubidium.se
Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9naRGpOTBtGn; Sat, 2 Jan 2021 03:01:11 +0100 (CET)
Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 6ADFA3F72A; Sat, 2 Jan 2021 03:01:08 +0100 (CET)
Received: from machine.local (unknown [192.168.0.15]) by magda-gw (Postfix) with ESMTPSA id 867579A0064; Sat, 2 Jan 2021 03:01:24 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rubidium.se; s=rubidium; t=1609552884; bh=iyG2G6SOAEONRZSaOBPeNEFtwg0tyZgEgsyOGrTBlQw=; h=Cc:Subject:To:References:From:Date:In-Reply-To:From; b=FpOla9mrof5IFwV9JcJnWANP59CN9gRpApNNQQEpDJe9Z7YoSUNIVJfUXQGXoaFXJ T+dDuufr6NuoH/b3bl6jTrpKrFZz0XPTcuuaEl/4yzdapW9lZOycXAph0y6JWwEQzF vONiJReyARrdxLsU10CZHpZ9v3dmyUqV6OAs9235V2y9tp7umcXnLF8OXyGyLAV6n2 aqnkPp4cxok4uS9EfBE/daMae1V0wUIdkc6dk147j3lQJAZz8cAgIKuWSsNFCcik/B jxFKb7kFNoC00kb0So9/2wzVNXuOLxEojyyhMkJuVnV5ug3mwGUMf/ZzmttIC9OcwE ySxsvA1DfqSwg==
Cc: magnus@rubidium.se, ntp@ietf.org
To: Philip Prindeville <philipp@redfish-solutions.com>
References: <20210101025440.ECE3340605C@ip-64-139-1-69.sjc.megapath.net> <155b7ae6-c668-f38f-2bbd-fd98fa4804db@rubidium.se> <16442E9F-DD22-4A43-A85D-E8CC53FEA3E5@redfish-solutions.com>
From: Magnus Danielson <magnus@rubidium.se>
Message-ID: <66534000-c3ba-8547-4fb1-1641689c6eba@rubidium.se>
Date: Sat, 02 Jan 2021 03:01:18 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <16442E9F-DD22-4A43-A85D-E8CC53FEA3E5@redfish-solutions.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/Zz0ukF2Zo3oqEYKziLqYDvMl7Kw>
Subject: Re: [Ntp] NTPv5: big picture
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <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: Sat, 02 Jan 2021 02:01:37 -0000

Philip,

On 2021-01-02 01:55, Philip Prindeville wrote:
> Replies…
>
>
>
>> On Dec 31, 2020, at 8:35 PM, Magnus Danielson <magnus@rubidium.se> wrote:
>>
>> Hal,
>>
>> On 2021-01-01 03:54, Hal Murray wrote:
>>> Do we have a unifying theme?  Can you describe why we are working on NTPv5 in 
>>> one sentence?
>>>
>>> I'd like to propose that we get rid of leap seconds in the basic protocol.
>> Define "get rid off". Do you meant you want the basic protocol to use a
>> monotonically increasing timescale such as a shifted TAI? If so, I think
>> it would make a lot of sense.
>>
>> If it is about dropping leap second knowledge, it does not make sense.
>
> I think “handle separately” makes sense here.  It shouldn’t be a blocking problem and how we handle it, assuming me handle it correctly, is orthogonal to everything else.  Or should be.  See “assuming we handle it correctly”.
I think the core time should have a very well known property, and then
we can provide mappings of that and provide mapping parameters so that
it can be done correctly.
>
>
>>> Unfortunately, we have a huge installed base that works in Unix time and/or 
>>> smeared time.  Can we push supporting that to extensions?  Maybe even a 
>>> separate document.
>> Mapping of NTPv5 time-scale into (and from!) NTP classic, TAI, UTC,
>> UNIX/POSIX, LINUX, PTP, GPS time-scales is probably best treated
>> separately, but needs to be part of the standard suite.
>
> I think TAI makes sense, assuming I fully understand the other options.
Do notice, the actual TAI-timescale is not very useful for us. We should
have a binary set of gears that has it's epoch at some known TAI time.
One such may for instance be 2021-01-01T00:00:00 (TAI). As one can
convert between the NTPv5 timescale and the TAI-timescale we can then
use the other mappings from TAI to other timescales, assuming we have
definitions and other parameters at hand. One such parameter is the
TAI-UTC (and upcoming change).
>
> If NTP v5 sticks around as long as NTP v4 has to date, I think we can’t underestimate the implications in both autonomous flight (the unpiloted taxis that are being certified right now come to mind), as well as the proliferation of commercial space flight… space flight has been commoditized (in part) by the use of commercial-off-the-shelf technologies such as metal 3D printing for generating bulkheads and structural panels.
>
> Why shouldn’t the time standard/format used for space flight also be COTS?
>
> It seems increasingly probably over the next 20 years that interplanetary flight will become common.
Things can be installed in places where we just don't have access to
normal network.
>
> Further, assuming we start colonizing the moon and Mars… stay with me here… will the length of a terrestrial day still even be relevant?  Or will we want a standard based not on the arbitrary rotation of a single planet, but based on some truly invariant measure, such as a number of wavelengths of a stable semiconductor oscillator at STP?
You can setup additional time-scales and supply parameters to convert
for them. If you need a Mars time, that can be arranged. JPL did that
because they could.
>
>
>
>>> --------
>>>
>>> Part of the motivation for this is to enable and encourage OSes to convert to 
>>> non-leaping time in the kernels.  Are there any subtle details in this area 
>>> that we should be aware of?  Who should we coordinate with?  ...
>> I think that would be far to ambitious to rock that boat.
>
> Divide and conquer.
>
> I think POSIX clock_* attempted this by presenting mission requirements-based API’s.
That was only part of the full interface.
>
> The next step is to have consumers of time migrate… perhaps starting with logging subsystems, since unambiguous time is a requirement for meaningful forensics.
They will do what the requirements tell them. Many have hard
requirements for UTC.
>> Kernels already operate with a double vision and have ways to handle
>> both non-leaping time and leapsecond in parallel.
>
> "Double vision" is perhaps an understatement.
It is, can be expected from me.
>
> Another good example is SNMP using “uptime” as 100Hz ticks since booting… since oftentimes a good external source of time can’t be established until well into the boot process.
>
> As I recall, this is one of the CLOCK_ types in POSIX.
It is.
>
>
>>> ---------
>>>
>>> I think this would bring out another important area: How does a client 
>>> discover if a server supports an option and/or discover servers that do 
>>> support it?
>> The solution that works for other protocols is that you ask for
>> capabilities (or you get them served as part of basic handshake). This
>> is typically a text-string of well defined capability names. Set of
>> constants or set of bits have also been seen.
>
> Or ASN.1 OIDs or… 
Sure. There is gazillion ways of doing it, I grabbed a few that seems
popular. ASN.1 isn't popular, just what people is forced to used.
>
>
>>> I'd like the answer to be authenticated.  It seems ugly to go through NTS-KE 
>>> if the answer is no.
>> Do not assume you have it, prefer the authenticated answer when you can
>> get it. I am not sure we should invent another authentication scheme more.
>>
>> Let's not make the autokey-mistake and let some information be available
>> only through an authentication scheme that ended up being used by very
>> few. You want to have high orthogonality as you do not know what lies ahead.
>>
>> So, we want to be able to poll the server of capabilities. Remember that
>> this capability list may not look the same on un-authenticated poll as
>> for authenticated poll. It may provide authentication methods, hopefully
>> one framework fits them all, but we don't know. As you ask again you can
>> get more capabilities available under that authentication view. Another
>> configuration or implementation may provide the exact same capabilities
>> regardless of authentication.
>>
>>>  Maybe we should distribute the info via DNS where we can 
>>> use DNSSEC.
>> Do no assume you have DNS access, the service cannot rely on that. It
>> can however be one supplementary service. NTP is used in some crazy
>> places. Similarly with DNSSEC, use and enjoy it when there, but do not
>> depend on its existence.
>
> Good point.
>
> As someone who works in security, I’ve seen a fair share of exploits that arise when protocols make tacit assumptions about the presence and correctness of other capabilities and then these turn out not to be valid under certain critical circumstances.
>
> Doing X.509 when you don’t have Internet connectivity for CRL’s or OCSP is a good example.
I've seen many networks where normal rules of internet applies, yet they
are critical, need it's time and fairly well protected.
>
>
>> When DNS is available, what additional values can be put there to aid
>> validation and service?
>
> Uh… Available “where”?  The internet is relativistic.  What the server sees and what the client sees can be wildly different, even from moment to moment.
I didn't say it was on Internet at all times. I can see things like a
point-to-point wire, I can see a heavily fortified network air-gapped
from Internet, I can see networks heavily fortified with very indirect
access to Internet. I can see things with a NAT or just a simple
firewall to the Internet. For some of these scenarios DNS will be
available, for some not. They all use the same "Internet technology"
because that is COTS. So, designing and internet technology also entails
to design for these other scenarios. A succsessful design also
understand and respect the problems of the more isolated scenarios.
>
>
>>> Again, that can be a separate document.
>> Sure. I think the final word on slicing and dicing of documents becomes
>> an issue once the parts are done. I think one should not focus too much
>> on it, as it will become apparent later in the process what will make
>> most sense.
>
> I would argue the opposite: let’s keep them as decoupled as possible, and only cede to inter-dependency when we can’t otherwise avoid it.

It's really not being the opposite, rather that is needed to get a
decent structure, because all you argue for is that we please please do
not make the specification a spagetti-coded one. Nobody wants that. How
the pieces is fit into a document or several is a complete orthogonal
property in that case. I was reacting on the over-focus on document here
and document there.

Cheers,
Magnus