Re: [netconf] Latest ietf-netconf-server draft and related modules

Michal Vaško <mvasko@cesnet.cz> Thu, 29 April 2021 14:56 UTC

Return-Path: <mvasko@cesnet.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 A22733A0BB3 for <netconf@ietfa.amsl.com>; Thu, 29 Apr 2021 07:56:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, RCVD_IN_DNSWL_BLOCKED=0.001, 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=cesnet.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 MI0tHRUkxBfe for <netconf@ietfa.amsl.com>; Thu, 29 Apr 2021 07:56:42 -0700 (PDT)
Received: from kalendar.cesnet.cz (kalendar.cesnet.cz [IPv6:2001:718:1:1f:50:56ff:feee:34]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CB9193A0BB1 for <netconf@ietf.org>; Thu, 29 Apr 2021 07:56:41 -0700 (PDT)
Received: by kalendar.cesnet.cz (Postfix, from userid 110) id 00940600B2; Thu, 29 Apr 2021 16:56:35 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=kalendar; t=1619708196; bh=27Cu+n8pttbF+HiQN73L7aGdNiA0V51RB83JWV9F1rA=; h=From:In-Reply-To:Date:Cc:To:Subject; b=xuC/xuPnq9NzZS5AazTiNcslX4AiGZ3eol3p+nGeQIbSsfbKxi/RrIC3IuD/5SYCt j1IVtIXzTF1U4nLq/xkkazh7dcadERzBlQkxUA0mz2BO7JYemV++1sYQRYQcMMzCxw m+RRzy3c/qIqR6XKkTZMvI6G7AGgkYGXcaoyvWf8=
From: =?utf-8?q?Michal_Va=C5=A1ko?= <mvasko@cesnet.cz>
In-Reply-To: <010001791de3029b-730530a6-f4fb-4d57-9d39-a1551ab76260-000000@email.amazonses.com>
Content-Type: text/plain; charset="utf-8"
X-Forward: 84.42.188.124
Date: Thu, 29 Apr 2021 16:56:35 +0200
Cc: =?utf-8?q?netconf=40ietf.org?= <netconf@ietf.org>
To: "Kent Watsen" <kent+ietf@watsen.net>
MIME-Version: 1.0
Message-ID: <62ed-608ac900-53-32820540@104833101>
User-Agent: SOGoMail 5.1.0
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/1qg7ren6aW0BuWolfKe0okwOD68>
Subject: Re: [netconf] =?utf-8?q?Latest_ietf-netconf-server_draft_and_related?= =?utf-8?q?_modules?=
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: Thu, 29 Apr 2021 14:56:47 -0000

Hi Kent,

> > I do not really see the point of having the configuration there just for testing purposes. With all the feedback provided, it seems to me now that all the configuration of "keyboard-interactive" should be scratched and leave it just as a presence container to allow augments. With a description mentioning them and the possibility of using PAM or similar authentication methods.
> 
> Could provide how you used “keyboard-interactive” before?  Was config such as in the current model used, or was it actually interacting with an PAM-like mechanism?

Currently, we do not use PAM but directly ask for the user password for the "keyboard-interactive" method. But it seems to me this may be wrong and definitely not the intended use so I will probably rewrite it once these modules are published and we are migrating to them.

> >> My question before was (and still is), since you did this optimization before, did it really matter (to save that roundtrip), especially in the context of using the (very slow) keyboard-interactive method?
> > 
> > But how is it saving just one round-trip? If you are offered "password" authentication but want to use "publickey" instead, let's say, you will likely leave the input empty just so that it fails and you get to the next method. But that causes a failed authentication attempt, if nothing else, which I do not think is that harmless.
> 
> I’m unsure if you understand the SSH protocol, so here goes:  the client starts off with an auth method.  It can optimistically pick one (e.g., if it only has one to choose, then it has nothing to lose by picking it) or pick “none”.   In either case, if the server is unhappy with the method selected by the client (and it always will be when “none” is selected), the server responds with a list of “productive” methods the client should try next.  
> 
> The question is, how important is the ability to configure a “first” method (assuming more than one has been configured)?
> 
> My guess is that it’s not important as follows:
> 
> 1) I assume the client is not resource-constrained (as, if it were, then it would likely be using TLS instead of SSH).  Thus, in the worst case, where the client performs some expensive key operation, it’s not a big deal because it has the resources to do it quickly.
> 
> 2) Assuming the client sends an “expensive method” first, and the server isn’t configured to support that method first, it will not waste any CPU cycles doing an expensive key operation; it will simple return a failure with a list of “productive” methods.
> 
> Thus the net-impact is some wasted CPU-cycles on the client and the latency incurred by one unnecessary roundtrip.  Assuming the client is not resource-constrained, the only significant variable is the network and, in a very high-latency network, it could be important.  Thoughts?

I am not sure what the problem is but it seems we are still not understanding each other. My specific example is as follows. The client uses "none" method first to get the list of supported methods, always. Then, based on the returned methods, it gets the set of supported methods on both the server and the client. The problem is, what should be the order of trying to authenticate using these methods? Like I said before, if a more complex method is selected instead of a simpler one, it may result in additional failed authentication attempt (and client disconnect if none are allowed), minor user annoyance, and even wasted server CPU time, yes. I consider the first problem serious enough that would like the module to support configuration that could prevent it.

Regards,
Michal