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

Kent Watsen <kent+ietf@watsen.net> Tue, 27 April 2021 19:08 UTC

Return-Path: <0100017914bb076f-9fb97a64-b35a-474d-9222-9be5ec784aaf-000000@amazonses.watsen.net>
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 6FB693A1C83 for <netconf@ietfa.amsl.com>; Tue, 27 Apr 2021 12:08:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.917
X-Spam-Level:
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: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
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 Z6FTqbXp53d8 for <netconf@ietfa.amsl.com>; Tue, 27 Apr 2021 12:07:57 -0700 (PDT)
Received: from a48-94.smtp-out.amazonses.com (a48-94.smtp-out.amazonses.com [54.240.48.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9F0803A1C5A for <netconf@ietf.org>; Tue, 27 Apr 2021 12:07:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; 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.60.0.2.21\))
From: Kent Watsen <kent+ietf@watsen.net>
In-Reply-To: <20210427155544.pd7bmt2hdztx2zui@anna.jacobs.jacobs-university.de>
Date: Tue, 27 Apr 2021 19:07:52 +0000
Cc: Michal Vaško <mvasko@cesnet.cz>, "netconf@ietf.org" <netconf@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-ID: <0100017914bb076f-9fb97a64-b35a-474d-9222-9be5ec784aaf-000000@email.amazonses.com>
References: <20210426172143.hhhebmeudv23dvkr@anna.jacobs.jacobs-university.de> <78fd-6087b600-7b-59cd2c00@214199368> <20210427073236.7s5fx2jzgs4hvhtc@anna.jacobs.jacobs-university.de> <0100017913b7c3d4-e03a2d29-4b0f-4820-bee9-56f532679207-000000@email.amazonses.com> <20210427155544.pd7bmt2hdztx2zui@anna.jacobs.jacobs-university.de>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3654.60.0.2.21)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2021.04.27-54.240.48.94
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/G9t7I5k5cPN8na3YxJH6xQ8yc0g>
Subject: Re: [netconf] Latest ietf-netconf-server draft and related 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: 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…]

K.

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 <j.schoenwaelder@jacobs-university.de> 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 <j.schoenwaelder@jacobs-university.de> 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 <j.schoenwaelder@jacobs-university.de> 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         <https://www.jacobs-university.de/>
>>>>> 
>>>>> _______________________________________________
>>>>> netconf mailing list
>>>>> netconf@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/netconf
>>> 
>>> -- 
>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>>> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
>> 
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>