Re: [Netconf] Mandatory local configuration in Keystore groupings

Balázs Kovács <balazs.kovacs@ericsson.com> Mon, 03 September 2018 12:08 UTC

Return-Path: <balazs.kovacs@ericsson.com>
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 856F8130E2F for <netconf@ietfa.amsl.com>; Mon, 3 Sep 2018 05:08:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.332
X-Spam-Level:
X-Spam-Status: No, score=-3.332 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com header.b=BS7jrk4d; dkim=pass (1024-bit key) header.d=ericsson.com header.b=j/eH/Z3T
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 q5HHabSvacuU for <netconf@ietfa.amsl.com>; Mon, 3 Sep 2018 05:08:47 -0700 (PDT)
Received: from sesbmg22.ericsson.net (sesbmg22.ericsson.net [193.180.251.48]) (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 09A5F1277BB for <netconf@ietf.org>; Mon, 3 Sep 2018 05:08:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1535976525; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AmPZJ1PrHmatP5y8QD/i9KyzV4hhnh71MSBYRWuWaVQ=; b=BS7jrk4dUwKE+sf7dGTVwQWRAiylKLZyoF4LZcVsn2kXu44w4a7lUozvIM2RfgVq XBaUEuwBQ9JRrRcUPc65bpaYH44Z1IYed1/XjGEQ4HJCkxBqdz3XkY9bYiT0JNNo are5uk1reGYxL8sm/UC+q7UvE8uxYPO++Mv7uQ6gOy8=;
X-AuditID: c1b4fb30-3cd869c0000055da-ac-5b8d244da1da
Received: from ESESSMB505.ericsson.se (Unknown_Domain [153.88.183.123]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id 7C.2F.21978.D442D8B5; Mon, 3 Sep 2018 14:08:45 +0200 (CEST)
Received: from ESESSMB505.ericsson.se (153.88.183.166) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 3 Sep 2018 14:08:44 +0200
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Mon, 3 Sep 2018 14:08:44 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AmPZJ1PrHmatP5y8QD/i9KyzV4hhnh71MSBYRWuWaVQ=; b=j/eH/Z3TPoWaaXAaW2ujJQaZrzw9E/vwNWPiBkQ0lwqS3qIb5M0C+3pL5XTI8EwXCnRzMscj6dANlqDWIhqHomEpb6la/HCDWfoqcxPZp3DfazFsrj4zli6gwBMNAe/6y6UKyoggXFs7WygUhpZF8Kxm23O7FBNZInbMwYRqCpw=
Received: from VI1PR0701MB2016.eurprd07.prod.outlook.com (10.167.209.150) by VI1PR0701MB2942.eurprd07.prod.outlook.com (10.173.72.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.9; Mon, 3 Sep 2018 12:08:12 +0000
Received: from VI1PR0701MB2016.eurprd07.prod.outlook.com ([fe80::bd7a:c3c7:f6f1:4e9]) by VI1PR0701MB2016.eurprd07.prod.outlook.com ([fe80::bd7a:c3c7:f6f1:4e9%4]) with mapi id 15.20.1122.009; Mon, 3 Sep 2018 12:08:12 +0000
From: Balázs Kovács <balazs.kovacs@ericsson.com>
To: Kent Watsen <kwatsen@juniper.net>, 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: AQHUE4npYduSZhsf/U2Th8xceQbCUaSAzHaAgEmH34CAAG1ZgIAA+nAAgAPuH4CAA+yKAIABAxSAgAB6cACAAHFXIIAAWSCAgADMp9CAAnp9gIAFf/ZQ
Date: Mon, 03 Sep 2018 12:08:11 +0000
Message-ID: <VI1PR0701MB2016010B75E7958119F54BAB830C0@VI1PR0701MB2016.eurprd07.prod.outlook.com>
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> <C739EADD-F458-4939-AEBD-59519586FE81@juniper.net>
In-Reply-To: <C739EADD-F458-4939-AEBD-59519586FE81@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.kovacs@ericsson.com;
x-originating-ip: [89.135.192.225]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR0701MB2942; 6:tbzAncsh5668ptCs/LsyGpYcLKNk7GhSQDZzmUCNXbETYeAB81GDS5gXlAs2cocZQlKbZvVmSZ+AoDtJPrNcBdjObtJlA0RuumyzBUJ5ePJ0wC/B8urowBL8n3R3H3dE9doHMT5kgX0GlCtlq5avpPLCCPmJhYvTKiAapKj5EEHl5QkBfRq1wvnrIALPXkiwK+JuzcTVsdGtym1kb/diOIRGQi4CXeBi/dkoSF4cUMQGtDGCPCO1GLNJMivAWNTQvhzdnvnF7Axz9AshV1y196XA7Wnhgql2xsNLBPb4DIQz7oRIe9wyyB8MJH/Z73DB5kGfpjF06BZCbDM/zzapr+ez1ybtItDpy2F3rouxxMzJ22IIV/7QzStTBNHU6XQpZnqKQ9Y3hVXPSyWbnY8CY72JuPS4WWI3yYnkHT3s79UNhI5jK5reEzMlvaKYZgIVxZOhHHCRle807gI3/dBF4g==; 5:1KTynBNEXFuOCisVhoUZttobeZEYLsPMGdWP3COQLMRp8Fhb4UjRqoW1uS4cEesGcd3G6mTt1lfCE9mYFB6axGivFV/qOSmh2D4t7T+oAG9dmrNFb0uHqT1kqXZG/x09lGeErbRvdPfuAw7DsY6Nu1QvNme7LGB7c5JwY5PoFlM=; 7:kcppMhgu8r68V1Fc8M+2T0Dv83aRGHAQexqG8euS1Cp5cokCPDeso1tXDu/rXhQHOzJLUtdLIr+SXAyGJEi6MfmlCtQu1xhoV+mrpXKozqN/3iSsOOlqtcyLTMAFlTXDDQV9Xlj1AGg5ktUeChkPzR8e4FdlVZN17bwJUIVNpolmZDsEvoNNu8V0JTA8PuAYHM3eNAndrBgGv57XYM5xPDrKpvkMMVQ3gGRv3ZR1GE35k9u5/VKUDs7Q1BBRzTUo
x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR;
x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(136003)(39860400002)(376002)(13464003)(199004)(189003)(4326008)(5250100002)(1941001)(74316002)(8676002)(99286004)(2900100001)(106356001)(85202003)(7696005)(68736007)(2906002)(316002)(110136005)(76176011)(8936002)(86362001)(81156014)(7736002)(305945005)(6246003)(81166006)(85182001)(256004)(14444005)(25786009)(66066001)(3846002)(6116002)(6636002)(6436002)(93886005)(229853002)(478600001)(14454004)(33656002)(11346002)(476003)(446003)(53936002)(97736004)(5660300001)(102836004)(105586002)(186003)(53546011)(6506007)(9686003)(26005)(486006)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0701MB2942; H:VI1PR0701MB2016.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
x-ms-office365-filtering-correlation-id: 4aadf64b-9393-43ac-d5b1-08d61195eba1
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0701MB2942;
x-ms-traffictypediagnostic: VI1PR0701MB2942:
x-microsoft-antispam-prvs: <VI1PR0701MB294254B3D94EC1678DAF2285830C0@VI1PR0701MB2942.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(37575265505322)(158342451672863)(138986009662008)(248295561703944);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016); SRVR:VI1PR0701MB2942; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2942;
x-forefront-prvs: 0784C803FD
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: 4icYO14mFbdeLRGlG9jPgEANLEhn/YOrHqgJszmuHja3XqSJSSOiCxBtRXRs115NSpOHJKeofIlNdrSe328vwsXOyohM+b3nLITrpXb0uII2U4Byk6DiMynvEB9J8h4hQkw3KxUK2o5alKMsH6ZpDD/kCaNEnIda72t7rfjdYFOscsZViOeoOt++1K4eoQ2G/6xLaOru6HcftAinemJr7W/ZN77FDZE+N0fJkK3AiQV81AdB9FoZMH8WJsYB6bECOhSUwa89UhyxuG+OAtg8NuE6bbBKBCH+IS5oZRayJT8d9k0SuxzjeTB822czlz5RcSWlYNRCha80oARHe4pT6EJ0IGYVWMc26sObNp50SjE=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 4aadf64b-9393-43ac-d5b1-08d61195eba1
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2018 12:08:11.8963 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2942
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAKsWRmVeSWpSXmKPExsUyM2J7ta6vSm+0wYeFohYH5rBbdHc/Y7eY uuk2qwOzx5IlP5k8rjddZffY+GsxSwBzFJdNSmpOZllqkb5dAlfGs3V/mAumBFTMPvqXtYGx x6+LkYNDQsBEomdTeBcjF4eQwFFGiSunt7NBOF8ZJf63XmWCcBYzSRze+hHMYRGYwCxx6WIr VGYqUObQeqiex4wSN///A8pwcrAJOEucf/EYrEpEoItR4tnNuWAJZgFNibV/PzKD2MICXhK7 9t5mBLFFBLwlerr3s0A0NDFKfH+1CKyIRUBFYuOshSwgNq9AgsTO31uh1n1nlpi2ZgYbSIJT wF7i3sIJ7CA2o4CYxPdTa6C2iUvcejIfzJYQEJBYsuc8M4QtKvHy8T9WiPpYiR2v77BDxJUk Zry6xQphy0pcmt/NCLJMQuAAu8S5+f+gmg0ljq/czwyR6GKTeP5pDjMkNH0l9p0ygag5CQyM iZ4Qto7EwoUTWCDsfIkDS9dCLcuVaDrTzjSB0XAWkltnAU0ChdL6XfoQYUWJKd0P2WeB/S8o cXLmE5YFjCyrGEWLU4uTctONjPRSizKTi4vz8/TyUks2MQLTycEtvw12ML587niIUYCDUYmH l/t3T7QQa2JZcWXuIUYJDmYlEd6bSr3RQrwpiZVVqUX58UWlOanFhxilOViUxHkt/DZHCQmk J5akZqemFqQWwWSZODilGhiTzi0JO8t6t3b7Kbe54Rz8a4/NPBv1+8WalAkPolc9euP1OLPi 7rOTD/dzVrV9O/T+QDxLt61w/+IvV4R7lsrIPM1acfzgA99ZEgFLTlsrpfw3KjKf4MzkmVbh 7+AS/jKl7OTSJbctmM4JyyRcibWLr9Vfm2L+OS7wl2er9parz8yEzj6U6riixFKckWioxVxU nAgAvpTc4yMDAAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/TYeHIXTxqxCST-n2Dfq91UzwVFM>
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: Mon, 03 Sep 2018 12:08:50 -0000

Hi Kent,

See below.
Br,
Balazs

> -----Original Message-----
> From: Kent Watsen <kwatsen@juniper.net>
> Sent: Thursday, August 30, 2018 11:15 PM
> 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
> Subject: Re: [Netconf] Mandatory local configuration in Keystore groupings
> 
> 
> 
> 
> > 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.
>

I meant the state in operational datastore is not reflected in some way in the configuration datastore. This was a confusion from my side.

> 
> > 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?
> 

Yes it makes, see below (also related to the 'hidden' enum discussion below).

> > 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).
> 

Ok, I follow.

> 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.
> 

With the containment approach, does it still mean that the operator must read the key names in <operational> and create a key and certificate in the configuration datastore, where key name must match a right key stored in <operational>? How can a key be removed?

> > 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.
> 

Ok.

> > 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?
> 

Well, ok, let's keep it as it is in the new must statement you proposed.

> > ...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!
> 

If it is 'hidden', then is there a need to set the real private key raw data? It can just be drawn as it was when invoking generate-asymmetric-key.  Or what is the difference between generate-asymmetric-key vs. setting 'hidden' enum (regardless of the user not being able to provide public key in 'hidden' case--which is currently a must)?

> > 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?
> 

What is the procedure to remove a key that was created via generate-asymmetric-key?

> Kent // contributor
> 
> 
>