Re: [netconf] crypto-types fallback strategy

Kent Watsen <kent+ietf@watsen.net> Fri, 27 September 2019 14:35 UTC

Return-Path: <0100016d7325f06e-00613ab7-413c-4d97-972c-858cf4886b65-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 55AEC12010C for <netconf@ietfa.amsl.com>; Fri, 27 Sep 2019 07:35:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 TEHVwfHBv1QD for <netconf@ietfa.amsl.com>; Fri, 27 Sep 2019 07:35:31 -0700 (PDT)
Received: from a8-96.smtp-out.amazonses.com (a8-96.smtp-out.amazonses.com [54.240.8.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E2D2E1200C4 for <netconf@ietf.org>; Fri, 27 Sep 2019 07:35:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1569594929; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=h4DuHNIhoa5iuEySIqjsSfpSyxmDHw5B8z67w/cv+PI=; b=Qq9xgIlI72dzL0Fn5ZCQxMgfnQDxi5tSeUQL7uSLORLQS9hlyli3xG4m/30B4x/M I/ukmIwrHeZOT1Vo5vUCit3gBCkamwXC961BCLf+/qhwNamezBVYC0cvR/loEv1NEl6 RrFEjUohGwqZ32AiR15B9TYsIhsbCQjkJHt1clxQ=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <0100016d7325f06e-00613ab7-413c-4d97-972c-858cf4886b65-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_D543F5E4-CD06-4117-A859-F3E4B994B336"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Fri, 27 Sep 2019 14:35:29 +0000
In-Reply-To: <MN2PR11MB4366E914816F6C3D9515A31DB5890@MN2PR11MB4366.namprd11.prod.outlook.com>
Cc: Juergen Schoenwaelder <J.Schoenwaelder@jacobs-university.de>, "netconf@ietf.org" <netconf@ietf.org>, Rifaat Shekh-Yusef <rifaat.ietf@gmail.com>, Wang Haiguang <wang.haiguang.shieldlab@huawei.com>, Frank Xialiang <frank.xialiang@huawei.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>
References: <8053FDA0-77EA-488F-B5A7-F203359105E0@akamai.com> <MN2PR11MB43669B3A47A39FD93B47292FB58F0@MN2PR11MB4366.namprd11.prod.outlook.com> <6924CAD5-F740-4512-8689-E0307AF0BD88@akamai.com> <MN2PR11MB4366B5C09B4348FDAE33E2BCB58F0@MN2PR11MB4366.namprd11.prod.outlook.com> <99BFF357-6A2A-49E0-BB38-37C25DB04213@akamai.com> <MN2PR11MB4366F20EE2FD6DF04B965125B58E0@MN2PR11MB4366.namprd11.prod.outlook.com> <EBE4757D-E99E-41EB-A52B-A25F023BF4BC@akamai.com> <MN2PR11MB4366E4ECE10DFB018941BA5FB58E0@MN2PR11MB4366.namprd11.prod.outlook.com> <0100016d44bda220-51590a9a-0a15-4b63-a49d-47efe712e82e-000000@email.amazonses.com> <MN2PR11MB436617082A8308A7A8928DDFB58E0@MN2PR11MB4366.namprd11.prod.outlook.com> <20190918163657.4pxh5jddxgrir5oh@anna.jacobs.jacobs-university.de> <0100016d455c6145-844c669e-8f31-4203-a827-7368d33cdee4-000000@email.amazonses.com> <MN2PR11MB4366E914816F6C3D9515A31DB5890@MN2PR11MB4366.namprd11.prod.outlook.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-SES-Outgoing: 2019.09.27-54.240.8.96
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/nH3-NQuwm2tp9muFekqB0VWMwSU>
Subject: Re: [netconf] crypto-types fallback strategy
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: Fri, 27 Sep 2019 14:35:34 -0000

[cc-ing my co-authors, as they're beginning to convert crypto-types back to identities again]


Rob et. al.,

> I tend to agree that sometimes less modules is more. For me, the
> problem is likely more that I am not entirely sure what the proper
> base types would be, which may depend on what exactly they are used
> for. I guess I wait until I see the description text...
>  
> Okay, we'll keep just the one YANG module.
> [RW]
> Do you mean one module for all the identities of just the base identities?
> 

Dunno.   

Identities provide the desirable benefit of hierarchy and extensibility, but they come with the weight of the module needing to be implemented (not just imported) in order for the identity to be defined.  This is how YANG works; it would've been better if, e.g., identities could be defined by "implemented" via YANG-library...

The thing with crypto algorithms, the algorithms a server supports is a matter of importance, e.g., because the algorithm isn't approved for use on the network.  The ability to configure algorithms supported is not currently present in the ssh-client-server and tls-client-server drafts, as I was hoping it could be added later as a -bis extension or an update, but perhaps it should be, in order to drive this problem, to ensure a proper crypto-types solution.

Working within the current YANG construct, one possible solution would be to define every algorithm identity in its own module, thus enabling servers maximum flexibility to describe which are supported.  The ostensible negative is that doing so would produce many modules.  While not a computer problem, it could become onerous.

Another idea is to not use identities either (in addition to enumerations), but instead define a data model that preserves the extensibility of identities without needing to implement modules.  For instance, instead of assuming the "algorithm" field is an 'identityref', perhaps a "leafref" is used.


ietf-crypto-types.yang snippet:

	// protocol accesible nodes  (note: config false)
	list algorithms {
	  config false;
	  key name;
	  leaf name {
	    type string;
	    description "The name of a collection of algorithms.  Suitable values are defined in the TBD IANA registry...";
	  }
	  list algorithm {
	    key name;
	    leaf name {
	      type string;
	      description "The name of an algorithm.   Suitable values are defined in the TBD IANA registry...";
	    }
	  }
	}    

	grouping public-key {
          leaf algorithm-type {
	    type leafref {
	      path "/ct:algorithms/ct:name";
	      require-instance false;
	    }
	    must '../algorithm';
          }
	  leaf algorithm {
	      type leafref {
	        path "/ct:algorithms[ct:name = current()/../algorithm-type]/ct:algorithm/ct:name";
	        require-instance false;
	      }
	    must '../algorithm-type';
	  }
	}


PROs:
  - allows a server to advertise (in <operational>) which algorithms it supports without any need to implement a module, other than crypto-types.
  - supports extensibility via IANA registries.  Sequence:  RFC updates registry --> server supports --> client configures to use.
  - "require-instance false" enables YANG-based config validations to succeed w/o presence config false data.

CONs:
  - only one level of hierarchy (would more every be needed?)
  - "require-instance false" enables YANG-based config validations to succeed even when misconfigured (though commit should fail).


Thoughts?

Kent // contributor