Re: [netconf] Yangdoctors last call review of draft-ietf-netconf-tcp-client-server-09

Ladislav Lhotka <ladislav.lhotka@nic.cz> Tue, 20 April 2021 12:42 UTC

Return-Path: <ladislav.lhotka@nic.cz>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BE8C43A2102; Tue, 20 Apr 2021 05:42:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 1SBblbJWhXwg; Tue, 20 Apr 2021 05:42:28 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 321453A2100; Tue, 20 Apr 2021 05:42:28 -0700 (PDT)
Received: from localhost (unknown [IPv6:2001:1488:fffe:6:a88f:7eff:fed2:45f8]) by mail.nic.cz (Postfix) with ESMTPSA id A290E140828; Tue, 20 Apr 2021 14:42:25 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1618922545; bh=KrRYsB1IIF/3V7M/Wax4Z9ydVBsfZOIgKu9esFd3wkI=; h=From:To:Date; b=sw5dKYcxYlQcxlMhVFqPYEzK8HwBGndfU+baD1LTSyTIeNXhUWdpjzOEC4hzKCAHi MrBZG+ps/aEsABuRuIodeNkRQWgM/jP7IYFsitH1TQ8HMOiwGk2b/UUqomTxW9xtYS sGLO3JYIhhy/0ANynZyAzrNaeBLXT2hLX+ICfv4M=
From: Ladislav Lhotka <ladislav.lhotka@nic.cz>
To: Kent Watsen <kent@watsen.net>
Cc: YANG Doctors <yang-doctors@ietf.org>, draft-ietf-netconf-tcp-client-server.all@ietf.org, last-call@ietf.org, "netconf@ietf.org" <netconf@ietf.org>
In-Reply-To: <01000178ebd39133-87ef25f3-1047-4f02-b5fb-706e82e7c02a-000000@email.amazonses.com>
References: <161796231010.8005.7390142571009530431@ietfa.amsl.com> <01000178ebd39133-87ef25f3-1047-4f02-b5fb-706e82e7c02a-000000@email.amazonses.com>
Mail-Followup-To: Kent Watsen <kent@watsen.net>, YANG Doctors <yang-doctors@ietf.org>, draft-ietf-netconf-tcp-client-server.all@ietf.org, last-call@ietf.org, "netconf@ietf.org" <netconf@ietf.org>
Date: Tue, 20 Apr 2021 14:42:25 +0200
Message-ID: <87tuo1w2j2.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: clamav-milter 0.102.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/NEd0wom8GsemMbkxbzJzMQ7D-Vk>
Subject: Re: [netconf] Yangdoctors last call review of draft-ietf-netconf-tcp-client-server-09
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Apr 2021 12:42:34 -0000

Kent Watsen <kent@watsen.net> writes:

> Hi Lada,
>
> Thank you for your review!
>
> Below are responses to your comments.
>
> K.
>
>
>> Reviewer: Ladislav Lhotka
>> Review result: Ready with Issues
>> 
>> The modules are well designed and nicely documented, both in the descriptions
>> and text of the Internet-Draft.
>
>  ;)
>
>
>> **** Comments
>> 
>> - Sections 2.1.4, 3.1.3, 4.1.3: the sentence 'The "..." module does not contain
>> any protocol-accessible nodes.' is misleading in that the modules do define
>> data nodes that are intended to be protocol accessible after the corresponding
>> grouping is used. I know this is a part of the NETCONF/YANG lingo, but another
>> formulation that clearly says what's going on might be preferable.
>
> Fair enough.  How about this?
>
>    The "ietf-tcp-..." module does not itself define
>    any protocol-accessible nodes.  This module defines
>    only "grouping" statements that are used by other
>    modules to instantiate protocol-accessible nodes.
>

What about using just the last sentence? It says all.

>
>
>> - Sections 2.2, 3.2 and 4.2: the XML snippets use document elements
>> "tcp-common", "tcp-client" and "tcp-server", but these containers are not
>> defined in the corresponding modules. This is confusing, my suggestion is to
>> rewrite the examples in the JSON representation where no such top-level node is
>> necessary.
>
> Indeed, and my validation script even takes the special step to convert the groupings to containers in order for the validation to succeed.   In other modules, I created a “foobar-usage.yang” module to instantiate the grouping statements.
>
> Hmmm, I was about to create the JSON, but realized that it would be easier to strip out the first-and0-last lines from the XML examples.  I understand that they're not a valid XML documents, but snippets have been used before…
>
> FWIW, all the examples are still validated, so there’s otherwise no loss in correctness.

Maybe it is not necessary to validate these short fragments. In any case, a casual reader might be confused - where do these elements come from? As a minimum, some explanation should be added.

>
>
>
>> 
>> - What is the purpose of "tcp-connection-grouping" if it only uses
>> "tcp-common-grouping" and nothing else? Why cannot "tcp-common-grouping” be used directly?
>
> I added this comment:
>
>     Whilst this grouping appears to not add any value beyond that given
>     by "tcp-common-grouping", it is defined so as to provide space for a
>     future peer module (e.g., "tcp-system-grouping" that defines additional
>     configuration nodes used to configure a TCP stack at an operating
>     system level.

OK, so this new grouping could use equally well either "tcp-connection-grouping" or "tcp-common-grouping", and add more configuration nodes. Having two names for the same thing is confusing.

>
> Makes sense?
>
>
>> - The "local-port" parameter defined in ietf-tcp-client seems dubious from the
>> security viewpoint in that fixing the source port makes it easier for attackers
>> to steal the connection (see RFC 6056).
>
> Interesting read.  But note that the RFC regards primarily cleartext protocols.  An axiom in security circles is “obscurity is not security”, i.e., randomizing client ports to make off-path guessing harder is not much of a win.

I don't think this can be labelled as security by obscurity. Without cryptographic protection, it is basically the only available measure against traffic injection. In DNS, for example, source port numbers (and transaction IDs) with insufficient entropy are considered security issues.

>
> In our case, and pretty much every IETF protocol now, a secure transport layer is used, and having a predictable 5-tuple can greatly reduce the attack-surface in firewall rulebases.
>
> As it stands, it’s configuration enabled by an optional feature (your next comment) and, besides, the wildcard values (e.g., “0”) may configured, enabling [potentially-random] operating-system selected values - so no harm?
>
>
>> If the feature
>> "local-binding-supported" is needed at all, I'd suggest to mention this in
>> Security Considerations.
>
> “Needed” is an interesting take.  My feeling is that the model is
> incomplete otherwise.  From a Security Considerations perspective,

I was thinking it might be needed for cases like NETCONF call home. Otherwise, it is not common to be able to configure the port for the side that performs active open.

> I’d like to put something like:
>
>    “Implementations are RECOMMENDED to implement the 'local-binding-supported’ feature for cryptographically-secure protocols so as to reduce to attack surface presented by firewalls.”

I don't understand what firewalls have to do with this issue. On the other hand, I would also mention the reason why this is RECOMMENDED, and cite RFC 6056.

>
> Is that what you had in mind?   If nothing else, having such a statement in the draft would certainly catch the eye of the SecDir reviewer.  Thoughts?

Of course, a SecDir review would be more authoritative here.

Cheers, Lada

>
>
>> - The module ietf-tcp-client uses the placeholder "RFC AAAA", which is not
>> defined in the Editorial Note.
>
> Fixed.
>
>
>
>> **** Nits
>> 
>> - RFC 7950 is cited repeatedly (6 times) in a general context, e.g. whenever
>> YANG 1.1 is mentioned. It should suffice to use the citation at the first
>> appearance.
>
> All but one citation removed.
>
>
>
>> - sec. 1.3: s/in compliant/is compliant/
>
> Fixed (in all the drafts!)
>
>
>> - in 3 places: s/illustatrating/illustrating/
>
> Fixed (in all the drafts!)
>
>
> Thanks again!
>
> K.
>
>

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67