Re: [Netconf] Mandatory local configuration in Keystore groupings

Kent Watsen <kwatsen@juniper.net> Thu, 30 August 2018 21:14 UTC

Return-Path: <kwatsen@juniper.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 D5A21130EC9 for <netconf@ietfa.amsl.com>; Thu, 30 Aug 2018 14:14:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.711
X-Spam-Level:
X-Spam-Status: No, score=-2.711 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_LOW=-0.7, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-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 YKdWJO5LNjYW for <netconf@ietfa.amsl.com>; Thu, 30 Aug 2018 14:14:57 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 945B6130E98 for <netconf@ietf.org>; Thu, 30 Aug 2018 14:14:57 -0700 (PDT)
Received: from pps.filterd (m0108157.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7ULDmgO029773; Thu, 30 Aug 2018 14:14:54 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=yXSj+4UQqijzaqA8AL4XB0kM2sAIysC/dWyKpw/KjU4=; b=gf73fRM1IRE33VFFWkOOvphd+4+/G8SrH3X7c+aEE01OhGiaBVD+U9aAfieMrRybQ+/q VYWtgqcJx3Av12snrHYeiQ6mp6yoJEDSNqLoT+NA5lR1bCWRejhIYc1XkTtTPsWdiONx 2GqizvUu9q3k3/nu6j3sy7VEltXj2tENlINf3ZFD3cK2vQsRQHHn/adIiyyItzj6Ojr5 jkxAc4hw7bUn1v9FmC8OFl7vMKUtOMPvpPj7BJaFZXjbeDEbomA451m3NGGgArcxi/78 1u4Z2pIpR6UXSh7iY8sQb4IyRsB1k4e7HlfvOfigpf1DzHr6i+gn51U9hyvChp4W5XWa nw==
Received: from nam05-dm3-obe.outbound.protection.outlook.com (mail-dm3nam05lp0117.outbound.protection.outlook.com [216.32.181.117]) by mx0a-00273201.pphosted.com with ESMTP id 2m6exph3sh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 30 Aug 2018 14:14:54 -0700
Received: from DM6PR05MB4665.namprd05.prod.outlook.com (20.176.109.202) by DM6PR05MB4875.namprd05.prod.outlook.com (20.176.112.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.14; Thu, 30 Aug 2018 21:14:52 +0000
Received: from DM6PR05MB4665.namprd05.prod.outlook.com ([fe80::544a:dd4d:9524:9e6d]) by DM6PR05MB4665.namprd05.prod.outlook.com ([fe80::544a:dd4d:9524:9e6d%5]) with mapi id 15.20.1122.000; Thu, 30 Aug 2018 21:14:52 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Balázs Kovács <balazs.kovacs@ericsson.com>, Martin Bjorklund <mbj@tail-f.com>, Balázs Lengyel <balazs.lengyel@ericsson.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] Mandatory local configuration in Keystore groupings
Thread-Index: AQHUE4rJV5t3ZASQT0G65kk51KFdjKSAiWUAgEnK74CAACpJAIABPX8AgAOrEACABC+ZAIAAwASAgAC9gACAAHNjgIAAFAaAgAEgEwCAAicPgA==
Date: Thu, 30 Aug 2018 21:14:51 +0000
Message-ID: <C739EADD-F458-4939-AEBD-59519586FE81@juniper.net>
References: <28C3C2C7-22BE-4425-A26C-4A777FA68A95@juniper.net> <20180827.102118.630809612057220140.mbj@tail-f.com> <AD108D78-8E5D-429B-AFA9-8C84430F5186@juniper.net> <20180828.090648.398453385489817261.mbj@tail-f.com> <VI1PR0701MB2016F2754609FAEC242C9D51830A0@VI1PR0701MB2016.eurprd07.prod.outlook.com> <C08E28A2-DB24-4456-969F-695F3EF8701D@juniper.net> <VI1PR0701MB20167F4B50F4D92FA34A79AC83090@VI1PR0701MB2016.eurprd07.prod.outlook.com>
In-Reply-To: <VI1PR0701MB20167F4B50F4D92FA34A79AC83090@VI1PR0701MB2016.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.14]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM6PR05MB4875; 6:j2BWlMRSVlY2MHVUb06HBPXhHiwPpHOgs2IzmrKQmGP7v+tmQ7FrhVFIqucqihf0IVvCJUfAB+L3Mxl8G2hXXxJh0S9PAPz/soOW88K1Yz6ULe7EAUS98SuulqT5CoagLXn4BiyDjlj9IxFQzKwJ3Tecl99cfsP2VWjibJyWODCHg0ZdMuIOlLxKo6Axr4TICMral/uVuW6y8x5GMgxuqzyVLj/WDXRQMSFFcKoblDf2ZjYSdVLjRCZISCG1T9hgAP2OvvfM2Fm6aRaYoYa3wmeYvSywgVM2v9qFII5TIclCix8MLay8c4erGAr5W4ALZySdSQJOn+Ivna0bTQOD+Cni0DOlfBcH98rT7Qf72x0gHGQDPWfXHKvQBOShkfwVTwynOL/wMoDs1FqTPJQws1r/Ca1DzZ8d40YzU0fRu4mT5a0fXZQKG2ggFWEsGVYZWwtgI4NhOsTjBRqwTaZ9HQ==; 5:dPkFL/UTF3FJIjB4zKBLikwNyLCgfmz3mQhsrJDYw4D3+UCS5lYWjDUICp8eatNBwLCdyFKsm73lgkP09tNVUjeZU6Jr4FoZVM5J9mQ92yLrBXCHxAtI8nexCP0MkPr8ZlNPEXkOLq846qFlT8XTcjF+5WpkxsQiBgiteoYxVOA=; 7:jwoJu2I6fJ8v64/ItqIf67BWwVs6sjJ1n+QDy+eQXzv1pijrSodau5bFhk6wM/aqNpOOImjsxqosA4Ae/XKnsaAvl+WlCbMOEgtOawG54XAOQ4MHWbl9vw0t8IoWau5wUpV6dZ6/GnIkFgUNLAXBZowRPGSlGhZgt3Efn62OVkHBQBy98pk08998s9oOkzPEifV6JVcDUOUwu+hKpBGdh4Kqm9npMGn2eQMQxbGGEQr8O0fE2SmQjFUpW5Hb8IQd
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 6db97b5b-3cc6-42a8-3a6a-08d60ebda04f
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DM6PR05MB4875;
x-ms-traffictypediagnostic: DM6PR05MB4875:
x-microsoft-antispam-prvs: <DM6PR05MB48758D72FA8CF7CD288E7EBFA5080@DM6PR05MB4875.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231340)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699049)(76991033); SRVR:DM6PR05MB4875; BCL:0; PCL:0; RULEID:; SRVR:DM6PR05MB4875;
x-forefront-prvs: 07807C55DC
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(136003)(376002)(39860400002)(346002)(189003)(199004)(256004)(7736002)(26005)(14444005)(33656002)(305945005)(53936002)(2906002)(6512007)(186003)(2900100001)(6486002)(229853002)(6436002)(102836004)(8936002)(81166006)(81156014)(66066001)(25786009)(316002)(110136005)(58126008)(6506007)(76176011)(36756003)(99286004)(68736007)(93886005)(82746002)(4326008)(97736004)(106356001)(105586002)(5660300001)(83716003)(86362001)(6246003)(14454004)(486006)(476003)(2616005)(478600001)(5250100002)(6116002)(8676002)(3846002)(446003)(11346002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR05MB4875; H:DM6PR05MB4665.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: GaWKUDRu/f0fMXn1x65sdePQVz6qTZ6wVPWRq1eXZfaTh10r2t9lJO9wkzSyj5xGRhpz5cV39zma+SM830sP0h7vdg9xKRCpYNXfl5NnwpxWAhUkt9xvuNM4lFaZ1zmGT95k7BMemJK7RR2udIYUvkRPxlCn7WVXQrV/FhodfIYhIvizbm2EzWuZhazT+tLHFlFOqKQqHDo1uSwKUy6DbwAhtKBibpWEOWlJq7vLpBvKx0Vqh1yWIkT0bTdx5IYfngJRdUuXmpwBw10IZeU24bOnU3rDdU5KG0gUYeaPh7myUjXEn4cEy0Bix0kt703XrVKMwOJNNBeEIDlrfNO+KESM8Tye+UQlOQRRdxsXUjQ=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <B0C848B27D3297459CBB690A339B8DB1@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 6db97b5b-3cc6-42a8-3a6a-08d60ebda04f
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2018 21:14:51.7726 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB4875
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-30_07:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808300213
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/FRtq_d0RCPfkLxHvCq3Tpc_xqSA>
Subject: Re: [Netconf] Mandatory local configuration in Keystore groupings
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Network Configuration WG mailing 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: Thu, 30 Aug 2018 21:15:00 -0000



> Balazs> I preferred the original short name and for me it was clear
> that this action produces a 'hidden' key. I actually like the idea 
> of changing the 'hardware-protected' enum literal to 'hidden'.

okay


> Balazs> I myself just started to realize that you intend to maintain 
> an operational tree that is out-of-sync with the configuration tree. 

unsure what you mean here.


> For example, a public key can be determined from the private key. It 
> is ok to require an instance of public key (with must) for a private
> key, but why is it mandatory to configure it? 

In most asymmetrical crypto system implementation, the only fact that 
is ensured is that you cannot find the private key from the public key.
The other way around, finding the public key from the private key is
trivial, but not guaranteed, in most cases.


> I did expect the public key filled in either by generate-asymmetric-key
> action, or by configuring private key. 

You want the public key to be automatically computed from the private
key, right?   It might be possible, but it's always possible that the
client can pass both, so the thinking is just do that - makes sense?


> Also the private-key, the public-key, and the algorithm leaves need to
> be in sync (all valid in respect to the other)

True.  I think you're making a case for letting the server derive the
public key, as the client might pass a mismatched set.  Deriving the
pubkey vs verifying a passed pubkey: both ops require crypto clue,
but only one is guaranteed to always work.


>>> In our opinion with Balazs L., we think it would be disadvantageous to 
>>> change the model by ruining the containment relationship between 
>>> certificate and corresponding asymmetric key.
>>
>> Can you say some more about this?  Is it mostly that the containment
>> is really intuitive?  That the relationship is linked both ways, 
>> whereas a leadref only goes one way?
>
> Balazs> The certificates in keystore are useless without a corresponding
> private key, so certificates of a key cannot be in the configuration 
> tree once the corresponding key is removed. By the way, how would a 
> private key be removed from <operational> if it does not exist in 
> configuration? If you do it with an action too, how would the 
> corresponding certificates be removed from the configuration?

Good points.


>> Martin makes a case for 'B', but he also said that my 'b' was 
>> "Better" but has scaling issues in the general case.  Perhaps 
>> we don't worry about the general case here?
>
> Balazs> Was it so? I saw an A and B model, A containing 
> must "(algorithm and public-key and private-key)
>              or not (algorithm or public-key or private-key)";
> and B containing the keys and the certificates in separate container,
> and a note "I think model B is cleaner".

Right, but if you scroll up higher, I had previously had an (a) and (b)
[note lowercase] to which he said (b) was "better".  Maybe it's moot,
since his (A) was effectively my (b).

My point is that the containment approach 1) does resolve the he primary
goal (configuring a cert for a key in <operational> and 2) I'm not concerned
about the general scaling problem.  By "perhaps we don't worry about the
general case here?", I mean to say that I prefer keeping the containment
approach.


> If I got it well, model A would keep the containment and produce
> the key name after invoking the action (affecting the configuration 
> tree!?) at least covering the key removal use case properly.

Invoking the generate/load-asymmetric key actions, as thus far dscribed,
would NOT affect the config tree (i.e., <intended>), only <operational>.


> Balazs> If the key generation and load only affects the <operational>
> only, I would rather vote for model A having the containment relationship
> between key and certificate(s). 

This is my preferred approach as well.


> Plus, I would also think about the mandatory statements in the
> configuration tree whether all 4 leaves (name, private-key,
> public-key, alg) or just name and private key needs to be configured.

I'm think all four are needed.  Only public-key is possibly not needed,
but it's trivial to ask a client to pass it, so why not?


> ...but why use an action at all then?  Everything can be done via 
> standard configuration, right?
>
> Balazs> That is actually a good question. Until the enum had the 
> literal 'hardware-protected' only the configuration use case of 
> the private-key was a bit unclear. Now I assume configuring the 
> private-key as 'hidden' could do the same as generate-private-key,
> but in that case the operator has no means to configure the public
> key (the removal of the mandatory condition for the public key
> could solve this). Regarding 'alg', I guess if hidden private key
> is asked, then algorithm is an input, but if binary private-key
> is configured, then it is rather implicit. Would the action be
> needed then?

There are a few things off in what you write, but the most important
thing is that there is no way to *configure* (via <intended>) a hidden
key.  Trying to do so, by passing the "hidden" enum, means that the
real private key raw data would NOT be set!


> Balazs> The action in this case seem to make sense only if the 
> purpose of the actions is really to only affect <operational>. 

Yes, that is the intent.


> But based on the above, I doubt yet how affecting configuration 
> can be avoided (even with alt A -> to maintain consistent composition
> of key and cert) I think this question goes back to some YANG 
> principles and is beyond my YANG competence.

I'm not following, can you say a different way?


Kent // contributor