Re: [yang-doctors] [Netconf] last call review of draft-ietf-netconf-keystore-02

Kent Watsen <kwatsen@juniper.net> Tue, 01 August 2017 18:24 UTC

Return-Path: <kwatsen@juniper.net>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B7C111321F1; Tue, 1 Aug 2017 11:24:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.802
X-Spam-Level:
X-Spam-Status: No, score=-4.802 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=juniper.net
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 zBrRA4a2IH12; Tue, 1 Aug 2017 11:24:27 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0136.outbound.protection.outlook.com [104.47.36.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A05B713221F; Tue, 1 Aug 2017 11:24:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=32IyEfdNar+JkB2SPpefJxeFkle/G42RMSVMz9a70jo=; b=BFlZrpfdKqtk45YZON19Mw2rxSFUWrtrOqfgFQL2tLHLZEQgMqEL7M/+p3XXokmft0MoB2opr3nwzDeRG2/bm+uiWeLOB20XciA+grIHbU9rhogUECtnqIAtz4NxwGblqQwWUmRaskdy0ZNADr2I8+isvL3ZswWfLRX1vO/ssAk=
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com (10.160.117.151) by BN3PR0501MB1476.namprd05.prod.outlook.com (10.160.117.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.10; Tue, 1 Aug 2017 18:24:26 +0000
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) by BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) with mapi id 15.01.1320.010; Tue, 1 Aug 2017 18:24:25 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: "t.petch" <ietfc@btconnect.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "draft-ietf-netconf-keystore.all@ietf.org" <draft-ietf-netconf-keystore.all@ietf.org>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] last call review of draft-ietf-netconf-keystore-02
Thread-Index: AQHTCq8XkNqYUxlm6UGsbvnPncWRP6JvjmEA
Date: Tue, 01 Aug 2017 18:24:25 +0000
Message-ID: <7C4C9B41-7343-4FCD-AB0F-0131F64B45BF@juniper.net>
References: <150028100874.32703.14161403810529927281@ietfa.amsl.com> <B1AC6895-5681-48F8-B7E7-418118120B4E@juniper.net> <20170720165942.GB21506@elstar.local> <F5E9973C-FCCD-4A96-B0D3-8C735CE911D3@juniper.net> <20170728073923.GA28870@elstar.local> <701F31A6-9941-4DE4-AE7E-00E859F103F8@juniper.net> <20170728154008.GA29865@elstar.local> <53886D3E-8A0C-4664-A7BD-1E708A80EE9D@juniper.net> <20170728170930.GA30054@elstar.local> <04f301d30aae$7482e900$4001a8c0@gateway.2wire.net>
In-Reply-To: <04f301d30aae$7482e900$4001a8c0@gateway.2wire.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kwatsen@juniper.net;
x-originating-ip: [66.129.241.11]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN3PR0501MB1476; 6:hgdpS16VXUu69ZssDT9ibdxhXFoKaVNFEFapz/g8Wmfz+AJHM3mWOHtshi3W2DGz0DgDasvn2qHUcwDp2BB+uGKuIqAv78ZfNt+GXh59nckvFms6tCS2zmXsyNKXHCv3DnbYHOKgRLjxZ9bo2uyo7uenHD1/bXG04OlorJMyvXOW4yMu+H9Z6lw3QNfs2xpisqz9b4ScJK61zRn5qIwcf7ytIyo7GkBiK7vGg3egvN6pXw/cqcQhL1TrmrTxdKlWft3vTJcvCyRbu2N++uWVOhGGp/FFILUuISKvdHDNbQSM8NDr97O5pDz46FBVN7sXhkHkrP3DPRV5+SIhuDmz3w==; 5:fplmsJ4vZ8BwP7eu72jO+3UMrdf1jxb1DmMi0dHV8nDqasayKy6b8YhTSPPtQkH91WLwBi1xAXuaGJgFr2JdfFIcwwvsDic2PnEWmKNpTTnuSfgwwSHYmKbJEa1+n5exfYdjBA0S1Gpyds2bzesKVA==; 24:gWioVHk/stUUO/X6x6DbKqIUj0jWq06BJgX/WGMPi9xowJ3lqaO2Tm+cbY/R2hEBtJzx1ygthlBiCheZKD8dyu5XXvwRy1dlgoiQ5qhGzEU=; 7:MlV4o0TPpwZG5WHqFg7cREJ0MFExPxwLl42s6OxDJ3DOAvcMNzTxeEI0kUQL1PYVK8vdPwNNbCwozfp/0YlaYbyKEgHv2mRMCSeigIx777Rzio4aYlvwockNb5bMUeG25tUj1Hzc4PhbUhkN6/Gr/O1ChCAnkAKC46kJnAP76d71P3GtjtQqmuj32069x8SWCMIoTcY1eGepMLlzpahtNyyTgSs0YJLBSv0z7iafLZU=
x-ms-office365-filtering-correlation-id: 76f0267c-156f-459b-26de-08d4d90a8a54
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR0501MB1476;
x-ms-traffictypediagnostic: BN3PR0501MB1476:
x-exchange-antispam-report-test: UriScan:(158342451672863)(192374486261705);
x-microsoft-antispam-prvs: <BN3PR0501MB1476833CDCD23F0CB255B34DA5B30@BN3PR0501MB1476.namprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0501MB1476; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0501MB1476;
x-forefront-prvs: 0386B406AA
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39840400002)(39850400002)(39410400002)(39450400003)(39400400002)(199003)(189002)(81156014)(6512007)(101416001)(33656002)(82746002)(6436002)(50986999)(76176999)(54356999)(3846002)(102836003)(6116002)(5660300001)(86362001)(8666007)(105586002)(551544002)(3660700001)(54906002)(68736007)(106356001)(25786009)(77096006)(4001350100001)(7736002)(66066001)(305945005)(4326008)(229853002)(36756003)(8676002)(14454004)(99286003)(3280700002)(2906002)(6506006)(83716003)(38730400002)(81166006)(189998001)(8936002)(6246003)(97736004)(93886004)(230783001)(478600001)(6486002)(2900100001)(83506001)(53936002)(2950100002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0501MB1476; H:BN3PR0501MB1442.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <DEFF1CE309DD5549B4B36A3535DDB148@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2017 18:24:25.8972 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1476
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/gQ7yWZxeclygmJCk2CKApOT0Eao>
Subject: Re: [yang-doctors] [Netconf] last call review of draft-ietf-netconf-keystore-02
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Aug 2017 18:24:31 -0000

Hi Tom,


> Changing the subject because my tack is slightly different.
> 
> I cannot reconcile this I-D with my (mis?)understanding of cryptography.
> 
> Stepping back, I see two types of keys, symmetric where one key is used
> for encryption and decryption, and asymmetric, where there are two keys,
> public and private, mathematically related but impossible to derive one
> from the other, one used to encrypt, the other to decrypt.
>
> I see this I-D as solely concerned with asymmetric keys.

Correct, though there was a time when we considered having a "password"
leaf, which would've been a form of a symmetric key.


> Public and private key pairs must be generated together, after which the
> private key must stay secret else you have no security.  Public keys by
> contrast are public for all to know.  The challenge is authenticating
> that the public key really is the public key of who you think it is.
> Most public keys arrive by certificates which then allow you to follow a
> chain thereof to a hopefully trustworthy trust anchor.  SSH, and some
> other protocols, are different in distributing naked public keys and
> relying on some other means of authenticating them (e.g. Trust on First
> Use).

Correct, though it's worth noting that SSH can also distribute X.509 certs
per RFC 6187.


> So when you say  "AFAICT, the system should be able to generate its
> host-key from the private-key itself." that is at odds with my 
> understanding and would lead to an absence of security.

My mistake, I was using the old name "private-key" before we changed
it to just "key", and what I really meant to say was that the system
should be able to convert /keystore/keys/key/private-key into a
representation suitable for software consumption (e.g., an openssh
host-key file).


> When the I-D says, "that might be used to hold onto private keys
> and certificates "I struggle to see the point.  Indeed, the 
> module contains public keys as well as
> "leaf public-key {
>          config false;
>          mandatory true;"
> so you are really storing public/private key pairs (which may be
> generated on the box).

That particular sentence, in the Abstract and Introduction, has been
rewritten based on Juergen's comments.  The abstract now says:

   This document defines a YANG module for a system-level mechanism,
   called a "keystore", containing security-sensitive data including
   private keys, pinned certificates, and pinned SSH host-keys.

The Introduction now says:

   This document defines a YANG [RFC7950] module for a system-level
   mechanism, herein called a "keystore".  The keystore provides a
   centralized location for security sensitive data, as described below.

   This module has the following characteristics:

   o  A configurable list of keys, each a public/private key pair.  If a
      key is used to sign a certificate signing request (CSR), which is
      then signed by a certificate authority (CA), then the resulting
      certificate may be configured as being associated with the key.
      Keys are expected to be configured using standard configuration
      mechanisms, however, to support hardware that generates keys, the
      key may also be created via an action called 'generate-private-
      key" action.  Keys may also be preinstalled (e.g., a key
      associated to an IDevID [Std-802.1AR-2009] certificate).

   o  An unordered list of pinned certificate sets...<snip/>
   o  An unordered list of pinned SSH host key sets...<snip/>
   o  An action to request the server to generate a new key...<snip/>
   o  An action to request the server to generate a CSR...<snip/>
   o  A notification...<snip/>

Does this help?  What "point" are you not seeing?


> The I-D also says "Certificates associated with this private key."
> which defeats me.  A certificate or chain thereof gives me a public key,
> never a private one, and the means to authenticate the public key.

Again, this goes back the old name "private-key" before we changed
it to just "key".  I agree that it's wrong at face-value.  Above you
can see how this text was changed.  Now what it says makes more sense.


> A public key may or may not have a certificate or chain thereof.  

true.


> A TLS client would likely have both but will rarely have a private
> key.

True, assuming client certificate based authentication is "rare".


> A server of any protocol (except SSH and such like) will have a
> public/private key pair and a certificate (and likely a chain thereof)
> to send to any enquiring client along with the public key.  An SSH
> server would have a public/private key pair but likely no certificates.

All true


> So, I cannot reconcile my understanding with the I-D.

I think it was mostly due to the whole "private-key" to "key" rename
not having percolated through all the text yet.  Yes?


> Tom Petch

Kent