Re: [Netconf] Mandatory local configuration in Keystore groupings

Kent Watsen <kwatsen@juniper.net> Fri, 12 October 2018 01:41 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 CE8FB130D7A for <netconf@ietfa.amsl.com>; Thu, 11 Oct 2018 18:41:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 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] 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 h4NoNYGvz1VI for <netconf@ietfa.amsl.com>; Thu, 11 Oct 2018 18:41:54 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (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 E443812958B for <netconf@ietf.org>; Thu, 11 Oct 2018 18:41:53 -0700 (PDT)
Received: from pps.filterd (m0108161.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9C1YGTU026285; Thu, 11 Oct 2018 18:41:51 -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=2yfc4ef+4MqcJ+pNZY7VsqehvQgPazbG8+l/nnJAA24=; b=dFPFAchi/LdpL1FnJspoMgwO2jKSm1GbqYnz4R66Aj1H/fVzaBd4JpEaH+/PqOvrmK/I vPgage3IIk7oasMCG/Etf4HVcv0Z3bi9XtIJYO6dYJMvSoIVE5BZXu+L1oQnreO0WdrQ hAoYIxHxCrWc5MaOGYu5n2u/5lUnsgArLrFtVU95Cvdl352vJlwX2XE52osuzwyfr5fW IKm/2RZn+YQ2DTC0OVzfn7e4fLVti0lGzf7Ycr4vZTq9ipwA3BOhPdfG/6J9tHQYCFba tSGmsW9Ov3fYCoMHgblN4S4G94lGKWM3kl0LdxNTYGw4XRHyTso+DTuqNZgNFHsaKSSN 8A==
Received: from nam04-co1-obe.outbound.protection.outlook.com (mail-co1nam04lp0053.outbound.protection.outlook.com [216.32.181.53]) by mx0b-00273201.pphosted.com with ESMTP id 2n2bc88rhe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 11 Oct 2018 18:41:50 -0700
Received: from DM6PR05MB4665.namprd05.prod.outlook.com (20.176.109.202) by DM6PR05MB4011.namprd05.prod.outlook.com (20.176.71.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.12; Fri, 12 Oct 2018 01:41:48 +0000
Received: from DM6PR05MB4665.namprd05.prod.outlook.com ([fe80::8574:3388:660d:e495]) by DM6PR05MB4665.namprd05.prod.outlook.com ([fe80::8574:3388:660d:e495%5]) with mapi id 15.20.1228.020; Fri, 12 Oct 2018 01:41:47 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Balázs Kovács <balazs.kovacs@ericsson.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] Mandatory local configuration in Keystore groupings
Thread-Index: AQHUE4rJV5t3ZASQT0G65kk51KFdjKSAiWUAgEnK74CAACpJAIABPX8AgAOrEACABC+ZAIAAwASAgAC9gACAAHNjgIAAFAaAgAEgEwCAAicPgIAF1PmAgAF1VYCACj3EgIAAtxgAgACClQCACVx+gIAAM1IAgADfpYCAACvtAIAAV4eAgABZMQCAICDwAIAAPDCAgADPeICAAp4yAIAAc/UA
Date: Fri, 12 Oct 2018 01:41:47 +0000
Message-ID: <37148076-E997-453B-9177-E76F1C612FEC@juniper.net>
References: <20180918.090227.98113334613843662.mbj@tail-f.com> <VI1PR0701MB2016707AE81A6F77719461D4831D0@VI1PR0701MB2016.eurprd07.prod.outlook.com> <A9FACF6E-2207-4FD3-966A-3482DC96B35D@juniper.net> <20180918.221210.1111111634668608576.mbj@tail-f.com> <VI1PR0701MB2016CB295B311EFCF2F7632C83E70@VI1PR0701MB2016.eurprd07.prod.outlook.com> <VI1PR0701MB2016753ED14EC8BFEE82F45C83E70@VI1PR0701MB2016.eurprd07.prod.outlook.com> <B6C88812-91FF-4242-AA16-B5301DB86C9F@juniper.net> <VI1PR0701MB2016D840CE109F34F276C82D83E10@VI1PR0701MB2016.eurprd07.prod.outlook.com>
In-Reply-To: <VI1PR0701MB2016D840CE109F34F276C82D83E10@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/10.10.2.180910
x-originating-ip: [66.129.241.13]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM6PR05MB4011; 6:oTpCtrFeklNjwyS92pmvlPV6TZSklfCiyEd4VG/805GVT6Erl7SViQugfChypfrc8FE+rZB/sKPkjJbq5T5jDoFjGgjU4ds9AQBzF1jNIn6EZ6/ztiXpgaFknVRdSjqGxMpadUd1eaIcQL6U6K3EI+Yh5C718yzlRM8zyZgkTC1F7g4iAAmvxOC/8V39PJ6RLSD5xLHM5DzGAD82/5LYxK13Xi+ZKQDavqz7HqMMqM9fnoi+IZ0mu/VP3CIYVQRdFjnB3NfjTE506ZudhRPmzmzi0G9Xu1wJRrb9VOTv6G14hcAyQ+klhcz+OwSl1iHZ4tvzOQNmbZeSRIZldxYpBVRJ2ky9Pc4bWd0ul6vE6+5XhhYtpIlJjRTFuhDJI1woAI/J22jOQhj8gP/VXDdv1RKR5DMo7pqjNlIDqApl5L3XhBRBMbzyFLMjIsreQyLQKKu6wtg8IICOxxYxrgRffA==; 5:dVF44LEfD4VP666q+ZrOr2Nt0T5ZGoMhX1jTne34k0MLciLPJ15KUxIigrwZVhAR4IIncRc6+KR8UqP5b8UK1t43ObMv2HCNlLKm26f1yclzCP1hg9Cj7098R7R0EMy3WM4603Kt2fiwyQd5d+RBVbFYbXt1tlRC6xntqRZig6A=; 7:AaALQgPli7VRkemctnKRXP+R5aQo2wVeZ1DLHat4HRrcHjPEFiGA+zF4zAjcVAW3tMvMn38IotaL3zunDZ3aW7XnhUXAYL1arxQX39Uvts1fFcr6iu79zIowObVpma5vXFAMfSKYQ6cFMwuelJEXRJBDCNbextfJUeZy9YBSuKZ2bhM0nnlvuROKY00Uk2GhReBDtMDbbWxpbkEbIzH6YVw8n7kEZxjLtshV8CjyNF4P7oKuX23e6stSvvSl/5/O
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: bde256da-2122-48fb-911c-08d62fe3dfe4
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DM6PR05MB4011;
x-ms-traffictypediagnostic: DM6PR05MB4011:
x-microsoft-antispam-prvs: <DM6PR05MB401135F0BE64B6EEE5B335CAA5E20@DM6PR05MB4011.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(155532106045638);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201708071742011)(7699051); SRVR:DM6PR05MB4011; BCL:0; PCL:0; RULEID:; SRVR:DM6PR05MB4011;
x-forefront-prvs: 0823A5777B
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(136003)(376002)(346002)(366004)(396003)(189003)(199004)(6916009)(5660300001)(68736007)(105586002)(3846002)(446003)(6116002)(11346002)(476003)(2616005)(186003)(6246003)(86362001)(102836004)(106356001)(36756003)(478600001)(486006)(2900100001)(14444005)(66066001)(256004)(26005)(305945005)(8936002)(229853002)(76176011)(316002)(81156014)(58126008)(33656002)(81166006)(6506007)(25786009)(6486002)(14454004)(7736002)(82746002)(4326008)(71190400001)(71200400001)(99286004)(97736004)(2906002)(53936002)(83716004)(93886005)(6512007)(8676002)(5250100002)(6436002)(561944003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR05MB4011; 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: AkYbRLhaJWTjC2U9HldI86f9Zsf7ATUrmpMOpiOigYoSEdng+fMOBbXjrdUoiN0Vw7ZqSRPnSgDjb4js0YZHCyugBVE4zeILenypr2lP2TMuX8HQh3D+Okd56DF3//6PYNou3blUm9jb/JiImBynJqtZoqAWY3JSPv5h8V3bXF+r5WrM3+CICza/j9J7dGlgNqM2gcNuRwZxSkFZUnhWcrDGGqsL7NaTUz2nFxEPtZTGNscYJ4bnpIFeR2Qed0NgVA+TZyIetG5+Kf3Zm/WqTZGhZbhltnSa4Wn9q7QXcbE5pcpFi+Qxpoy86XtaXg6WB27g0gNqj8WBqhVpznAVUtufSlcl8zrw0B8PgNw7oN0=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <20A7AF808DE51948A4EAF6B633281AE3@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: bde256da-2122-48fb-911c-08d62fe3dfe4
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2018 01:41:47.8663 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB4011
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-12_01:, , 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-1810120014
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/vMvObWZHd1S2aefOiwlKdnFeBX0>
Subject: Re: [Netconf] Mandatory local configuration in Keystore groupings
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 12 Oct 2018 01:41:57 -0000

// All, I plan to update this set of drafts before the cutoff, to address 
// the few items that have come up here, as well to add (finally!) a fix
// for "Should algorithm identities be moved from ietf-[ssh/tls]-common
// to crypto-types?" issue from IETF 102 (I've been working with a few
// cryptologists, and we have a proposal that we'd like to put in for
// review).  That would leave just the "Add support for TCP Keepalives?"
// issue remaining, for which I still don't have a good answer.


Hi Balazs,

> One more issue. There are 3 local-or-keystore definitions in 
> keystore. For example:
>
>  grouping local-or-keystore-asymmetric-key-with-certs-grouping {
>    description
>      "A grouping that expands to allow the key to be either stored
>       locally within the using data model, or be a reference to an
>       asymmetric key stored in the keystore.";
>    choice local-or-keystore {
>      mandatory true;
>      case local {
>        if-feature "local-keys-supported";
>        uses ct:asymmetric-key-pair-with-certs-grouping;
>      }
>      case keystore {
>        if-feature "keystore-supported";
>        leaf reference {
>          type ks:asymmetric-key-ref;
>          description
>            "A reference to a value that exists in the keystore.";
>        }
>      }
>      description
>        "A choice between an inlined definition and a definition
>         that exists in the keystore.";
>    }
>  }
>
> I was thinking if the 'leaf reference' in 'case keystore' should
> rather be 'mandatory true'. I know it does not make a difference
> now when there is only a single leaf in that case (and we don't
> plan more), but maybe it is more secure to have the mandatory flag
> on.

I guess it doesn't hurt but, assuming that there is no intention to
ever add more descendants to the "keystore" case, it's unnecessary
(as you say).  What is your concern?


> Regarding the groupings:
>
> I think the 'local' configurations in local-or-keystore groupings
> got too much capability in the end, and the locals became kind of
> full-fledged keystores. Shouldn't the local be simplified to binary
> privkey and certificate? I think local should be much simpler, but
> this is just my opinion. 

Below is the tree diagram for the "local" case from the
local-or-keystore-asymmetric-key-with-certs-grouping.  I picked
this grouping because it's the most complicated of them all.

   +--:(local) {local-keys-supported}?
      +-- algorithm?                       ct:key-algorithm-ref
      +-- public-key?                      binary
      +-- private-key?                     union
      +---x generate-hidden-key
      |  +---w input
      |     +---w algorithm                ct:key-algorithm-ref
      +---x install-hidden-key
      |  +---w input
      |     +---w algorithm                ct:key-algorithm-ref
      |     +---w public-key?              binary
      |     +---w private-key?             binary
      +-- certificates
      |  +-- certificate* [name]
      |     +-- name?                      string
      |     +-- cert?                      ct:end-entity-cert-cms
      |     +---n certificate-expiration
      |        +-- expiration-date?        yang:date-and-time
      +---x generate-certificate-signing-request
         +---w input
         |  +---w subject                  binary
         |  +---w attributes?              binary
         +--ro output
            +--ro certificate-signing-request    binary

I assume that you're having issue with the actions and perhaps 
also the notification.   Of course, these are due to the 
crypto-type groupings being used here.  As you've likely
noticed, the YANG modules aggressively use groupings.

Do you feel that "local" keys should never be "hidden"?  Why 
should keys used in keystore be the only ones that can be hidden?
What about devices that do not have the "keystore-supported"
feature, can they not have hidden keys? Assuming local keys
can be hidden, than the "generate-certificate-signing-request"
action is needed, right?  As for the notification, how is it 
not a good thing, even for "local" keys?


> This of course impacts what should be moved to ct. Some detailed
> thoughts below:
>
> 1. Is the 'local-or-keystore-asymmetric-key-with-certs-grouping'
> grouping used by any module? 

Not currently.  It was being used by the [ssh/tls]-client-server
modules, but I switched it out to the "local-or-keystore-end-entity-
certificate-grouping" because I think only a single certificate can
be specified in those cases.  Perhaps we should go back to using 
that grouping and have a "refine" statement to set "max-elements 1"?
This didn't occur to me before, but looking at it now, I think we 
should do it, and then remove local-or-keystore-asymmetric-key-with-
certs-grouping.

That said, I generally don't view unused groupings as a bad thing.
E.g., there are some unused groupings in crypto-types, though they
clearly seem like they could be useful in other contexts.   FWIW,
if we choose to keep the 2nd grouping, we should also add a "local-
or-keystore-trust-anchor-certificate-grouping", for symmetry.


> Client/server models seem to use only the ks:local-or-keystore-
> end-entity-certificate-grouping. Latter is lacking the action and
> cert is not in list. What was the objective with the local 
> configuration? Shouldn't it be much more simple than the keystore
> capability? Shouldn't it be just for configuring a non-hidden key
> and corresponding cert? Even the current local configuration with
> hidden key generate/install seem to be stepping on the toes of 
> keystore. Hidden key generation I guess would also need CSR 
> creation to bind the hidden key with a cert (which is not part
> of the local branches).

A lot of this I already touched on.  I do think local hidden keys
are a good thing.  As for the rest, I think you're making a case
for doing the alternative mentioned above (i.e., using a "refine"
statement to set "max-elements 1").


> 2. I guess crypto-types should contain the groupings that are
> foreseen to be reused. But those that we see only for keystore,
> could possibly remain in keystore. 'asymmetric-key-pair-with-certs'
> grouping contain way too much keystore specific implementation in
> my opinion, so it should be in keystore and not reused (unless 
> you really want to boost the capabilities of the 'local' 
> configuration). I would also keep 'end-entity-cert-grouping' in
> keystore with the certificate expiration information. 'trust-
> anchor-cert-grouping' could stay in trust anchors, it just adds
> a leaf. ' asymmetric-key-pair-grouping' should be in keystore IF
> it is only for keystore. Maybe if this latter was simpler that 
> the local configurations should also use, then that could be in ct.


The above covers all this but, to provide insight, know that I moved
all groupings that were NOT keystore specific.  That they're somehow
overly robust was not a factor in that decision making process.  Yes,
I do want to "boost" local keys, per my comments above.
 
I was about to write that, if we remove "ks:local-or-keystore-end-
entity-certificate-grouping", we could remove "ct:end-entity-cert-
grouping", but then notice that "ct:asymmetric-key-pair-with-certs-
grouping" is using it too.  Hmmm....

I presume that you're not picking on ct:trust-anchor-cert-grouping
only because it doesn't define a notification, but know that I went
back and forth on that, and I think I made a mistake.  I now think
that it should define a notification and that the trust-anchors 
draft should move to using it, with a refine statement setting 
"max-elements 1".

Regards,
Kent