Re: [netconf] Roman Danyliw's Discuss on draft-ietf-netconf-keystore-34: (with DISCUSS and COMMENT)

Roman Danyliw <rdd@cert.org> Mon, 11 March 2024 12:09 UTC

Return-Path: <rdd@cert.org>
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 B0F81C14F710; Mon, 11 Mar 2024 05:09:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cert.org
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id llaIaKIHPHZM; Mon, 11 Mar 2024 05:09:02 -0700 (PDT)
Received: from USG02-BN3-obe.outbound.protection.office365.us (mail-bn3usg02on0083.outbound.protection.office365.us [23.103.208.83]) (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 6FAB6C14F6F4; Mon, 11 Mar 2024 05:09:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector5401; d=microsoft.com; cv=none; b=VjFgZ0a+niyhWAhjcDSMsG4r6cjUFXCYNIwfdZ6lQXbDf5T5gHhMk5VMUk8XW26UTosd0X6jsDWae6dWHargvN85IWuMqfeXLiK1Ww6KnjcmZDPN+Jog/L/AdUa+I005XIZ9yJfViMszgCV+Y8RWnq/asxje/6kmDFmTnitm93X5pLrKJqP09uyDGtDTwA4aYncrsznQUzJ/L+5FNOBrIpjRRUqfHGJL0B7qfjXNl6DslqifIDDfMM5Iejo6FcNGV2vGTZjkfj6Pt+btDB26JEVu/aDf8PzvUuuALL8wmeuZmdk8PRvXdkyh/NAtk6bHSYUEK07hYFomxbh+NrBUBQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector5401; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dpbTMVL/nwY7KymRZ5qpZirztx6pcagnEl27jMslqpc=; b=DPEJyfcfTFwohhG4XS4wZ1xsvhg8mHO+pv8FlLy1+z0aqpAP/3bMD0Va1dXPuXXhjdFWP8FslwIzJiMupUxPuInJbknnQl13P3UNWM/hKfV259h8N6lUclfq39rF7Aaw6BnZOxx0MvgShy6+7c4g8Aq8yt97W8djlQPB58pJaQcOL5DfhydWoU1VTapHJ8INz5kwnCOOg7OiTOWS2v9NGgLNEouwJmBqBgpksXN9nKn23oPF1rDWDJOtm7lrwgWBkdEMdEODj4nQgjmHuntl8rCk6oGeSlMMLTeVQz9bsTdnXX2SiC/yZW0aqNiy/38ehYso4YGGh04NQzjug+KTkA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cert.org; dmarc=pass action=none header.from=cert.org; dkim=pass header.d=cert.org; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cert.org; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dpbTMVL/nwY7KymRZ5qpZirztx6pcagnEl27jMslqpc=; b=nIojHjbR/zL7xvZ6OOhJhGJC/bw+OgK9rTO/8s8vDCPwjgyWNNYUBIGyTWLEnPP2//QC+UtKPGQQbmOEdZiM26L4farxVNrrif2iEeY9jorr5tjH9DGYzh2cJAau2OdA9sPClSnA+XMZmgFRRhbaQETqKY3sp/Hho6HUrBKo1gc=
Received: from BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM (2001:489a:200:168::11) by BN2P110MB1057.NAMP110.PROD.OUTLOOK.COM (2001:489a:200:16b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.54; Mon, 11 Mar 2024 12:08:57 +0000
Received: from BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM ([fe80::acd1:6591:c445:e0b]) by BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM ([fe80::acd1:6591:c445:e0b%5]) with mapi id 15.20.7316.054; Mon, 11 Mar 2024 12:08:57 +0000
From: Roman Danyliw <rdd@cert.org>
To: Kent Watsen <kent+ietf@watsen.net>
CC: The IESG <iesg@ietf.org>, "draft-ietf-netconf-keystore@ietf.org" <draft-ietf-netconf-keystore@ietf.org>, "netconf-chairs@ietf.org" <netconf-chairs@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>, Qin Wu <bill.wu@huawei.com>, Mahesh Jethanandani <mjethanandani@gmail.com>
Thread-Topic: Roman Danyliw's Discuss on draft-ietf-netconf-keystore-34: (with DISCUSS and COMMENT)
Thread-Index: AQHacnRzkL1ThifI8kalP17+TSA+ZrExdmEAgAD9QiA=
Date: Mon, 11 Mar 2024 12:08:57 +0000
Message-ID: <BN2P110MB11070B188B74C48FCBE4D587DC24A@BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM>
References: <171002473443.48083.16449488482146802214@ietfa.amsl.com> <0100018e2a288eb9-9d28b734-a44e-455f-86b2-fa4a59fc2550-000000@email.amazonses.com>
In-Reply-To: <0100018e2a288eb9-9d28b734-a44e-455f-86b2-fa4a59fc2550-000000@email.amazonses.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cert.org;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BN2P110MB1107:EE_|BN2P110MB1057:EE_
x-ms-office365-filtering-correlation-id: 44654b44-f9ea-402e-669a-08dc41c407b0
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 3j03/iJJ7quomCJOoxgrQ+4v0Mo7hAQl9DYVeQk45nGnfPSEXbhgUTmLGEgtU8qL665SPgUvElrjZYBTLzf5wFj07Xf8HuBOrY24w4AeBFM5bnBftAa0ZMJ7/XrOywuyvbs46HW2Tk/HuL0KzcY0sZhGk8YQqOXlM43HpF3pAk+9XJ2fXSupxUHEFYo5yx4Cu+BrasdImrZzM6bWhZknC6Lmma7IjroFQll+kg5skw83I6DTIdOSHmajsyV4KM+MByQ7CMONQ0FioxhnzPABaj+P+1gU30mQ7cpY6mVzor1xhoZtaO2fyAXw6F4DBI4ivJv4ODB3hbIc6VjRtiSDNQ3sqvdqC0Noy+HuhqwdDMSzPI1vtmhwMNzmypyZc3nxHbPzdRxQnOWxr63foKPDFh1Mp/xBl5od9TTX29vRFhUXDPKxhst4fTINwxKuI9BOi2vaGECZX5PFs13zKVTPxledqzwi5yjT1NPb/UMCvMKHlOJSTh9kAPtxeSioz4mq3pgpSm6W1pVD6OB3ZKZTfcNhBCXcHpGhGCH8IUCVmDRvDpd3sqNK/i+lYxa2AJblhc6OxvbgnihspO9khtUDpckZUI2K3wa7yOdOiDCPzf/3fs1Qqhp8XSd96aspY72jtT1N/V8aME0Jin34Uy7rHMRuQxzjgDiqqH7gdTXvalg=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(41320700004)(1800799015)(38070700009); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 1Ho1Xz9lFnI6NxrKp5/5QbI2aSdpYIGOl7hi36vQVIGUZpNOAZxo+YAHHZ63dO8Gp4IkaXZZ5aktDo8+2LWkzflFiGiKCzzXklERu8V8ZxeO1oICoFstfRQbVm3+F6H6fHVTeoqYSrkBay51IjxLjrLNvXg0ULcjpfIkdP+AU8BldKz3wBQ0fVinzE4wUiv8IoauPG7P6auoiqd90Dg8CTQld1Pph08FdZFu1Yj2lQmQ0WYvkvWSNEbX+Z3D4cqAlGpSnZYzHL9lqbA5xYt6lfQskiG3wkySJjAuvyE3oHNntDhuTXojSM3eZLEjggOeuW9WwWfi+PwxBDeoHg94KwyAhOBNClEwqwiaI84Pd4pfaj3oOISeRjtzKcmYFOqYkxASX8IA4PUVUvvuQ6985LudYtRcaOzTW11RNg6qlF7vablfL36yVezKJeKdsFujZh2wnQW2TlkCxYYqCkdOu85CaPGNFCeUFnpjXdBBJCTq6ANpeJ/eZLMOnDsNeglTdr7cmAOd+CSQ2V54n+yzq01Nz8vOTCcRgIRMR/+ByWwfy/7d9ZsSpm2zy++z4YJb6wViXyx1HU9yoHWmHtda1kY2nbLSE2JaARzKe0jjw0Iq/hoIswDBFyKvhWUBZn0K4yJQzpgccSydA1DKvbHn39hdvUoc98gukjc/GlgAohSkiA7LrYG5q4l4VdzH2jHvHMS3qqDKXpBZk+LdbZI0tSWPUPN3cjky/nhurHdN+sFj/iRCFd1g72aFE3RX8w9vc9lIaVInXXmUWi4HN8ME4TWAh3yjKApZtVsc4xea4mUyM1YLb/UqGIvVr/rKAmWV95sDFOfX3Rjd373ojpJNmO8iSA6ac6eO1mNtcoiBvgZ5vGYbFaV0ecqbrs1K7Tv0WlPd+rv28eCyASTnAz4V2xJLtHAwdr+VfyqXWmiUlHTWMRQXLS9pGkneaFWO+4luuu0bGRB3q62MQzpNCi6lW37+3UPXMAx2/lc6OWdYCyyhFC860Xg6zRl9VdusfD6via79CGxfznE87KOPtOhIS2GRYOm4VoSGa1A/OHXXtENerPEhXdVh/k8IRlZFOVbE+8PB9e+liYsJ/JkYcMNIn821L9r7WbQrCi3j5SG40o2dfqaRKpLb68vOHxRPUfNgJZjf6hYXJhCYfk69W5DhijgMqX1m6jfF0x4aRdZEJYPGG4YYmzEEwsVACN1wwqIl/PGOIAOE8La3F3IoGwOK3FVbPRHSKz+uvZOLN0Abjm7WT1gfT6f9UjUoWpIh3DUlcfQ5Kc7jzLnwaVQIhqOpnb9NExrfIXcwVu9GZuT13H4QCVT2FHArh4n340ATmlKzlF0FLq7jrwBeHz0bCS31SR3MMZNbOzstsTsGbuUESgJBgnCplGdNPjbqeRiCLgSc0MV0nvXMfZk+Y+MGu//IOCcqTs3xLWLPV1+ZH7Yof9JZb3kfVJB2ncoWiPG1gJhINR9Va6EQmFpVWvXKKso75SNUVmJv0wVPjwe3OBeebuc=
Content-Type: multipart/alternative; boundary="_000_BN2P110MB11070B188B74C48FCBE4D587DC24ABN2P110MB1107NAMP_"
MIME-Version: 1.0
X-OriginatorOrg: cert.org
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BN2P110MB1107.NAMP110.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 44654b44-f9ea-402e-669a-08dc41c407b0
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2024 12:08:57.7815 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 95a9dce2-04f2-4043-995d-1ec3861911c6
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN2P110MB1057
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/scRoMGTTLzGqwdBZRDjCBgZNf6I>
Subject: Re: [netconf] Roman Danyliw's Discuss on draft-ietf-netconf-keystore-34: (with DISCUSS and COMMENT)
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 11 Mar 2024 12:09:07 -0000

Hi Kent!

Thanks for checking.  You are observing “user error” on my part.  I forgot to clear the DISCUSS text in the interface when adding my new COMMENT text, and I had to reissue my ballot.  The Datatracker correctly reflects my COMMENT-only position.

Roman

From: iesg <iesg-bounces@ietf.org> On Behalf Of Kent Watsen
Sent: Sunday, March 10, 2024 4:58 PM
To: Roman Danyliw <rdd@cert.org>
Cc: The IESG <iesg@ietf.org>; draft-ietf-netconf-keystore@ietf.org; netconf-chairs@ietf.org; netconf@ietf.org; Qin Wu <bill.wu@huawei.com>; Mahesh Jethanandani <mjethanandani@gmail.com>
Subject: Re: Roman Danyliw's Discuss on draft-ietf-netconf-keystore-34: (with DISCUSS and COMMENT)

Warning: External Sender - do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi Roman,

Thank you for clearing your DISCUSS ballot on all 4 drafts.  Your response for three of the drafts contained no additional comments (and hence I won’t reply to them).  But, for the “keystore” draft, two responses came…

The first response (below) had more DISCUSS comments.   The second response contained just one COMMENT, which was/is the same COMMENT contained below.

IDK if you changed your mind on the new DISCUSS comments but, in any case, they are good comments, so please find my responses below.

PS: I'll post updates to the drafts ASAP.   I may ask for special permission to post before the window opens again.  That said, I’m still hoping to hear back from Murray, to clear his DISCUSS positions, so that may cause a delay...

Kent // author





On Mar 9, 2024, at 5:52 PM, Roman Danyliw via Datatracker <noreply@ietf.org<mailto:noreply@ietf.org>> wrote:

Roman Danyliw has entered the following ballot position for
draft-ietf-netconf-keystore-34: Discuss

When responding, please keep the subject line intact and reply to all
email addresses included in the To and CC lines. (Feel free to cut this
introductory paragraph, however.)


Please refer to https://www.ietf.org/about/groups/iesg/statements/handling-ballot-positions/
for more information about how to handle DISCUSS and COMMENT positions.


The document, along with other ballot positions, can be found here:
https://datatracker.ietf.org/doc/draft-ietf-netconf-keystore/



----------------------------------------------------------------------
DISCUSS:
----------------------------------------------------------------------

** Section 4.  This section seems to define a workflow and mandatory server
capabilities above and beyond what is typically done by a RESTCONF/NETCONF
using a YANG module.  The introduction of this section says it applies to
backup and restore.  I’m having some trouble a few of the details.

Yes, this section is different.  But it answers one of the most asked questions.  I added this as the second paragraph to Section 4:

    The approach presented in this section is not normative.  This section
    answers how a configuration containing secrets that are encrypted by a
    built-in key (<xref target="built-ins"/>) can be backup'ed from one server
    and restored on a different server, when each server has unique master
    keys.  The API defined by the "ietf-keystore" YANG module presented in
    this document is sufficient to support the workflow described in this section.



Section 4.1, “If a KEK is a symmetric key, then the server MUST provide an API
for administrators to encrypt other keys without needing to know the symmetric
key's value.”

-- When in the backup and restore process is the administrator using this API
and what is the relationship between it’s use and the YANG module?  I observe
that the API in question isn’t labeled (in a way I recognized) in the workflow
diagram in Section 4.3.  Perhaps the administrator is constructing a YANG-based
configuration by hand and using this API to encrypt a key?

-- Is the expectation that this API is accessible over the network?  Can the
admin only invoke it locally?  Are there any controls expected to govern who
gets to invoke this mandatory API?

-- Is the “server” here the NETCONF/RESTCONF server?  Does it have to be?  I
ask because this text says, “the server”.  However, Section 4.2 allows for
generation+encryption “outside of the server”

My previous response leans into this a bit saying "The API defined by the
'ietf-keystore' YANG module presented in this document is sufficient…”.  But
For clarity, the sequence of steps might be:

- Crypto officer generates a clear-text private key
- both the “ssh-client-server” and the “tls-client-esrver”
  drafts define a `generate-asymmetric-key-pair()` RPC
  enabling this creation.
- Crypto officer stores the clear-text private key in a safe
- e.g., on a dedicated air-gapped laptop

- Regular admin decides to bring Server1 online
- Regular admin sends Server1’s MK pub-key to Crypto officer
- Crypto officer encrypts the clear-text private key using Server1’s MK
- using CMS’s “EnvelopedData” (per the “crypto-types” draft)
- this is a local operation (no NETCONF or RESTCONF API used)
- Crypto officer sends the encrypted private key to Regular admin
- this is KEK1

- Regular admin configures KEK1 on Server1
- using the “keystore” API defined in this draft
- Regular admin configures the rest of Server1’s config,
- including other keys encrypted with KEK1
- using a combination of standard NETCONF/RESTCONF
  commands and the “keystore” API defined in this draft
- Regular admin backups Server1’s configuration
- using standard NETCONF/RESTCONF commands

- Server1’s power supply shorts, frying the board, it’s dead.


- Regular admin decides to bring Server2 online
- Regular admin sends Server2’s MK pub-key to Crypto officer
- Crypto officer encrypts the clear-text private key using Server2’s MK
- using CMS’s “EnvelopedData” (per the “crypto-types” draft)
- this is a local operation (no NETCONF or RESTCONF API used)
- Crypto officer sends the encrypted private key to Regular admin
- this is KEK2

- Regular admin restores Server1’s configuration on Server2
- using standard NETCONF/RESTCONF commands
- but this doesn’t work since Server2 can’t decrypt KEK1
- Regular admin configures KEK2 on Server2 (overwriting KEK1)
- using the “keystore” API defined in this draft
- now Server2 can decrypt KEK2 and the device works again

Makes sense?

Yes, “server” is always a NETCONF or RESTCONF server.  The “outside
the server” bit regards local operations that a Crypto Officer performs (e.g.,
using the OpenSSL API).



Section 4.2, “Implementations SHOULD provide an API that simultaneously
generates and encrypts a key (symmetric or asymmetric) using a KEK.

-- (related to the above) Implementations of what?  Is this normative guidance
for NETCONF/RESTCONF server now provide additional functionality?


A couple small updates:

    OLD: Implementations SHOULD
    NEW: Implementations of servers implementing the "ietf-keystore” module SHOULD

I also added to the end of that paragraph this (hopefully helpful) forward-reference:

     Such API is defined in the "ietf-ssh-common" and the "ietf-tls-common"
     YANG modules defined in <xref target="I-D.ietf-netconf-ssh-client-server"/>,
     and <xref target="I-D.ietf-netconf-tls-client-server"/>, respectively.




** Section 5.1.
 In order to satisfy the expectations of a "keystore", it is
 RECOMMENDED that implementations ensure that the keystore contents
 are encrypted when persisted to non-volatile memory.

If this recommendation is NOT followed how would this expectation be satisfied.
Wouldn’t ensuring that the keystore is encrypted be mandatory?  Especially if
cleartext passwords are used?

Good point.  I added these two paragraphs the the end of Section 5.1:

   The keystore contents may be encrypted either by encrypting
   the contents individually (e.g., using the "encrypted” value
   formats) or, in case cleartext values are used (which is NOT
   RECOMMENDED per <xref section="3.5" target="I-D.ietf-netconf-crypto-types"/>),
   then, e.g., disk-level encryption may be used.

   If the keystore contents are not encrypted when persisted,
   then server implementations MUST ensure the persisted storage
   is inaccessible.

Clearer?


----------------------------------------------------------------------
COMMENT:
----------------------------------------------------------------------

Thank you to Sandra Murphy for the IETF LC SECDIR review and Magnus Nyström for
the early SECDIR review.

Thanks for the explanation on the Section 4.* crytpo API.  I recommend adding
clarifying language to the effect of the details and authorization model
associated with this API is out of scope for this document.

I’m trying to understand this comment.  I even went back to my response I sent to you on Jan 31.  I don’t understand.

Perhaps this comment is a hold-over from the misunderstanding expressed above regarding the needed API.  My impression is that you thought it was an API defined outside of this document when, in fact, it is the API defined by this document (in YANG) and, as such, subject to the authorizations given by the NACM layer.

With that misunderstanding resolved, do you see how I’m unsure how your comment applies?

On a side-note, I did update the "generate-asymmetric-key-pair" RPCs to return the location to where hidden keys are created.  This was the “bug” I reported finding in my Jan 31 email.



Thanks for addressing my other DISCUSS and COMMENT feedback.


Thank you!
Kent