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

Michal Vaško <> Thu, 22 April 2021 07:10 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 76B233A18A3 for <>; Thu, 22 Apr 2021 00:10:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id H2y0-AxmxVPy for <>; Thu, 22 Apr 2021 00:10:45 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 42D393A18A1 for <>; Thu, 22 Apr 2021 00:10:45 -0700 (PDT)
Received: by (Postfix, from userid 110) id D67966007A; Thu, 22 Apr 2021 09:10:36 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=kalendar; t=1619075436; bh=KitN6y7mVew33NqfhTEOpfL9HUNq0JWjQZ1QW7DVJs0=; h=From:In-Reply-To:Date:Cc:To:Subject; b=B+++YN3nhtuaHTpTJx0ZXrmJwhtJD7QnpWWiFEvOCCfWCS1Hnp5RvaHYYcmVMQ5ga Ve2vpimWbpvPnzd8tCWqBU52imqlVDfYLVkbQu55iJ/475yBa24Tnmnt08pQeri3DT pJpDgZqBw/v3v4FerhFZ10kLHydv4lsqpAl0lIak=
From: Michal Vaško <>
In-Reply-To: <>
Content-Type: text/plain; charset="utf-8"
Date: Thu, 22 Apr 2021 09:10:36 +0200
Cc: "" <>
To: Kent Watsen <>
MIME-Version: 1.0
Message-ID: <1108-60812180-37-670e7400@130038994>
User-Agent: SOGoMail 5.1.0
Content-Transfer-Encoding: quoted-printable
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: Thu, 22 Apr 2021 07:10:51 -0000

Hi Kent,

> Hi Michal,
> >> My understanding that you “think" these updates are okay, which is greatly appreciated (your considerations, that is).   It would be perfect if you could actually try them out before this work gets published...
> > 
> > Yes, that is exactly what I meant. Unfortunately, I am terribly busy and I am just not able to implement all these modules. Even if they got published today, I think it would take us at least several months till we are able to use them.
> Noted.
> >>> An improvement I can think of is to put all the authentication methods in "users/user" in a mandatory choice. The authentication methods would be one case, while something like "global-config" (empty leaf, for example) would be the other. That should allow for maximum versatility when one could configure the 'global authentication methods', enable the "client-auth-config-supported" feature to configure the recognized users, but use the global authentication methods settings for some/all the users (not having to configure each one separately). Because that will probably be our use-case.
> >> 
> >> Could you provide a tree diagram snippet that illustrates this?  Regarding your last sentence, I imagine that that might be many folks use-case.  That is, the actual user-auth might be somewhere else (e.g., PAM, LDAP, etc.); it might be rare thing that folks would want to config users inside the “ssh-server-grouping”.
> > 
> > I wanted to, but quickly learned that I did not understand this YANG part correctly. It seems every client authentication method has its own feature AND a leaf or container in {grouping:ssh-server-grouping}/client-authentication/supported-authentication-methods that marks support for the authentication method, again. Why the redundancy?
> The "{grouping:ssh-server-grouping}/client-authentication/supported-authentication-methods” container is solely for enabling the SSH-server know which authentication methods to present to the client during the handshake.
> The "{grouping:ssh-server-grouping}/client-authentication/users” container is a locally-defined list of users and credentials that can be used to authenticate them.
> In theory, the "supported-authentication-methods” could be derived as the union of the methods configured for each user, but at some point the “ca-certs” and “ee-certs” were pulled out of that container, and so that can’t be the case anymore…assuming it was ever a good idea in the first place...

I suppose I was not clear enough, the seeming redundancy is in all the specific client-authentication features AND the "supported-authentication-methods". You must both enable a feature and create the corresponding leaf/container to actually support the method.

But it seems enabled feature marks something like a capability of the system to support the authentication method and the data whether you actually want to advertise the method for new SSH clients. I am not sure this distinction is needed, though. It seems to me the "supported-authentication-methods" container can be removed altogether and the advertised authentication methods will simply be all the configured ones for the user.

> > Regarding the client authentication configuration, which is a separate issue, I suppose the most generic solution would be to model it the same way certificates and some other things are. Meaning, to have a separate container with a list of client-authentication configurations. Then, every {grouping:ssh-server-grouping}/client-authentication/users/user will have to reference one. That should allow support for all kinds of scenarios, including one where there is only a single client-authentication configuration and all the users reference it.
> This is where your providing a snippet of a tree diagram would be helpful.  Hopefully, with the above explanation, you're more able to do that now…?

I am sorry, I have still not adjusted to the fact that the modules now include all the configuration needed, with nothing being read from the system. Having understood this, I think the current principle of per-user configuration is fine, there is no other solution.

But to fully configure the "keyboard-interactive" method, there is some more information needed. I have looked at how libssh and OpenSSH sshd(7) configure this method.

Starting with sshd, it relies on login or PAM [1]. I do not have any experience with PAM so I do not know how exactly that is supported in these YANG modules. But as for login, it seems to basically duplicate the functionality of the "password" authentication [2]. That is my experience as well but I do not know any more background for this. So, the configuration would again be simply a "password" leaf.

As for libssh, it went for a completely generic solution in which you must specify the method name (which maps to the "submethod" would be my guess), the instruction, and a list of challenge-response prompts [3]. We have implemented the simple password authentication this way [4], when the password is read from the system (the login functionality, actually). Going with this full configuration, the instruction and a list of challenge-response prompts (with echo configuration) should be added to "{grouping:ssh-server-grouping}/client-authentication/users/keyboard-interactive/submethod”. Actually, why is "keyboard-interactive" a list? A container should be fine and "submethods" should probably be a list instead.

That is all the feedback I can provide for the "keyboard-authentication" method. I could even suggest the exact YANG changes if needed but I am missing the information about PAM support, if nothing else. Someone else could add something in case I missed anything and it would be great if you could find someone actually using the "gssapi" methods to provide similar feedback, otherwise you will likely have to rely on additional modules adding some augments, which is not an ideal solution.

[1] (search for ChallengeResponseAuthentication)
[2] (section AUTHENTICATION)
[3] (function ssh_message_auth_interactive_request)

> >> The following regards the "tls-listen or tls-call-home or sshcmn:ssh-x509-certs” if-feature statement:
> >>>> But I wasn’t trying to fix your original issue.  As mentioned, there is a YANG-next issue and the best that consuming modules can do is to 1) enable all the features defined in these modules and 2) augment-in “use”-specific feature statements where the groupings are used.
> >>> 
> >>> Okay, I suppose this can be done although it seems to me like a minor deviation (the augment solution). What is the reason for not having the module this way out-of-the-box?
> >> 
> >> It might be helpful to recall that this “if-feature” statement is in the netconf-client-server draft, and thus likely should be discussed in another thread.  That said, we’ve come so far already, so why not a little more, right?  ;)
> >> 
> >> So, do you have a proposal mind?
> > 
> > Right, we are getting OT, too bad :) I have attached a diff that fixes my concerns and I think it also makes for a more intuitive tree diagram.
> Your diff points in a direction that looks good to me.   I wish you’d proposed it originally ;)
> How does this commit look?

Um, I do not think that works. It took me a while to understand but based on the comment, you tried to add the "sshcmn:ssh-x509-certs" if-feature to the "client-identity-mappings" container. To my knowledge, what you actually did was augment-in no new nodes to the "client-identity-mappings" container, but making 'all these no nodes' conditional on an if-feature, none of which makes sense. The "if-feature" in an augment relates to the "augment" itself, not to its target, you can only add new nodes with an augment.

> BTW, this introduces an issue as to if “client-identity-mappings” are required for SSH when certs are used, or if the SSH username that is built into the protocol (and used in al non-cert scenarios) should take precedence.  Thoughts?

I have never configured or used certificates for SSH authentication so this is not a question that I can answer. But based on my other experience, I would naively guess that it means you are using certificates instead of SSH keys, which seems to me is relevant for the "hostbased" and "publickey" authentication methods and would, in-effect, replace the configuration of these methods. But that is not what is found in these YANG modules so I guess I am wrong.