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

Kent Watsen <> Tue, 27 April 2021 19:08 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6FB693A1C83 for <>; Tue, 27 Apr 2021 12:08:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.917
X-Spam-Status: No, score=-1.917 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_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Z6FTqbXp53d8 for <>; Tue, 27 Apr 2021 12:07:57 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 9F0803A1C5A for <>; Tue, 27 Apr 2021 12:07:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug;; t=1619550472; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=FtBwnFhNaW0Rb4Ahz3iW3keEbqW+7e/zifkkgtBZJ0M=; b=kE2JPvIk4doE0k15zHLd1TBnzYP5RuyJeRUSm8JQVS75Jwy2B9PwX9CNbLk1/uEM lJO4yjBynRS55v/slwXFUbUuPLYxnVqawhTFtCJU1MtBXl+YsuOp6olhrlsq62YaS4b Vg4MSppdZq9pxzZB965f3cGdKUspKkASvDcQs25o=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.\))
From: Kent Watsen <>
In-Reply-To: <>
Date: Tue, 27 Apr 2021 19:07:52 +0000
Cc: Michal Vaško <>, "" <>
Content-Transfer-Encoding: quoted-printable
Message-ID: <>
References: <> <78fd-6087b600-7b-59cd2c00@214199368> <> <> <>
To: Juergen Schoenwaelder <>
X-Mailer: Apple Mail (2.3654.
X-SES-Outgoing: 2021.04.27-
Archived-At: <>
Subject: Re: [netconf] Latest ietf-netconf-server draft and related modules
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 27 Apr 2021 19:08:07 -0000

Hi Juergen,

I’m familiar with how PAM et. al. works.  The question in front of us is what the “server” models should look like, specially the SSH and HTTP server models, as they are the only two that have a “users” subtree.

The TLS model (just like the SSH and HTTP models) has a “client-authentication” subtree, but it’s wholly leafrefs into the truststore, and hence no “users” need to be locally defined.

All three models have a "client-auth-config-supported” feature (possibly better named 'client-auth-local-config”) that enables the “client-authentication” subtree.  This is in recognition that the models can go only so far, and it’s expected that application-specific augments may be needed.

In my view, the TLS "client-authentication” subtree is likely good for most production environments, whereas the SSH and HTTP subtrees are good for simple environments with small number of users.  For instance, the HTTP-subtree is most like an `htpasswd` database.  The SSH-subtree is intended to be equally simple...

[Michal: was/is your use simple?  Knowing that “keyboard-interactive” isn’t simple, my query is more in terms of the total number of users…]


Disclaimer: I have no hands-on experience with either the SSH or HTTP "client-authentication” nodes.  My RESTCONF server implements the "restconf-server-app-grouping” and supports both TLS- and HTTP- level client auth, but it uses the "client-authentication” node only from the TLS model, as it was more intuitive to maintain a distinct “user” model than to define users in the “http-server-parameters” grouping inside the part of the data model for configuring the transport (ie., what addr/ports to listen on, etc.).

> On Apr 27, 2021, at 11:55 AM, Juergen Schoenwaelder <> wrote:
> On Tue, Apr 27, 2021 at 02:24:41PM +0000, Kent Watsen wrote:
>> Hi Juergen,
>> Are you saying that a client SHOULD use the “password” method for password-based authentication?  That is, from a modeling perspective, the “keyboard-interactive” method’s “response” node can remain a cleartext value, even though it MAY contain a password?    Note that, on most servers, the “password” method is a lookup into the local users database (e.g., /etc/passwd).
> On systems that support PAM, essentially all utilities that do user
> authentication hook into the PAM mechanism and hence they can all be
> configured to implement the security policy of choice. By default,
> programs like login or sshd or ... typically end up calling the
> tradtional Unix PAM module, that does a verification of a password
> against a stored crypt-hash value. But this is only one of many
> possible options. You can easily change the configuration to talk to a
> RADIUS server instead or to a Kerberos 5 server or ... The PAM system
> is very flexible. Note that it is possible to have PAM modules
> (keyboard-interactive) where the server sends a challenge to the
> client, the clients displays it to the user, collects the users
> response, and forwards it back to the server and this exercise may be
> repeated several times. Note that the server's PAM configuration
> drives an interaction with the user via the keyboard until it is
> either happy or not.
>> When using a password with keyboard-interactive, I expect that the password would be handled/compared via some PAM-like proxy.  As such, the password would NOT be statically-configured in the model (unlike with the “password” method), but rather in an external DB (/etc/passwd, RADIUS, LDAP, etc.).  Hence I question introducing a “choice” node to the “response” for iana:crypt-hash or encrypted values...
> Yes, if you end up in the Unix PAM module, then keyboard-interactive
> and password authentication become more or less the same. But this is
> a special case from the keyboard-interactive (PAM) perspective,
> despite the fact that it might be a common case. What exactly happens
> when keyboard-interactive is executed is determined by the server's
> PAM configuration and the client is expected to deal with it in an
> interactive manner (i.e., not good for automation).
> RFC 7317 likely got the tradeoffs right on the client side from what
> you typically find as default setups on networking gear. Completely
> modeling and exposing keyboard-interactive is likely something you
> want to leave to an extension (for someone who has a lot of spare
> cycles).
> /js
>>> On Apr 27, 2021, at 3:32 AM, Juergen Schoenwaelder <> wrote:
>>> Well, my point is that keyboard-interactive may mean password
>>> authentication but it may also mean other things. On a Unix system,
>>> the traditional password can be seen as a property of an account,
>>> i.e., not something that belongs to a specific authentication method.
>>> In other words, if my keyboard-interactive (PAM) configuration is
>>> setup to check the password of my account, then it checks the same
>>> password that also the password authentication mechanism would check.
>>> But with PAM, I can also make keyboard-interactive check something
>>> else.
>>> /js
>>> On Tue, Apr 27, 2021 at 08:58:42AM +0200, Michal Vaško wrote:
>>>> Thanks for the input. So based on this my idea was simply to allow to configure this common use-case directly. But yes, it would result in configuring the password twice although once for the "password" authentication, the second time for the "keyboard-interactive" method. I consider that not to be a problem and believe the distinction between the used methods being important on its own.
>>>> Regards,
>>>> Michal
>>>> On Monday, April 26, 2021 19:21 CEST, Juergen Schoenwaelder <> wrote: 
>>>>> On Mon, Apr 26, 2021 at 05:06:48PM +0000, Kent Watsen wrote:
>>>>>> * The sshd_config manage says:
>>>>>>   AuthenticationMethods
>>>>>>            Specifies the authentication methods that must be successfully completed for a user to be granted access.  This
>>>>>>            option must be followed by one or more lists of comma-separated authentication method names, or by the single
>>>>>>            string any to indicate the default behaviour of accepting any single authentication method.  If the default is
>>>>>>            overridden, then successful authentication requires completion of every method in at least one of these lists.
>>>>>>            For example, "publickey,password publickey,keyboard-interactive" would require the user to complete public key
>>>>>>            authentication, followed by either password or keyboard interactive authentication.  Only methods that are next in
>>>>>>            one or more lists are offered at each stage, so for this example it would not be possible to attempt password or
>>>>>>            keyboard-interactive authentication before public key.
>>>>>> As yet, with the current model, I don’t see a direct correlation to “AuthenticationMethods”, unless you think “keyboard-interactive” is it, but that doesn’t follow from the manpage snippet above.
>>>>> SSH iterates over the authentication methods that both peers
>>>>> offer. The 'keyboard-interactive' method (RFC 4256) hooks into PAM,
>>>>> for many setups this results by default to password authentication,
>>>>> but depending on the PAM module selected, 'keyboard-interactive' can
>>>>> carry more complex challenge response dialogues.
>>>>>  [...] With the generic
>>>>>  method defined here, clients will not require code changes to support
>>>>>  new authentication mechanisms, and if a separate authentication layer
>>>>>  is used, such as [PAM], then the server may not need any code changes
>>>>>  either.
>>>>>> From a YANG perspective, keyboard-interactive is of course challenging
>>>>> to model since you end up modeling something as flexible as PAM...
>>>>> /js
>>>>> -- 
>>>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>>>>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>>>>> Fax:   +49 421 200 3103         <>
>>>>> _______________________________________________
>>>>> netconf mailing list
>>> -- 
>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>>> Fax:   +49 421 200 3103         <>
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <>