Re: [Netconf] WG LC for zerotouch

Kent Watsen <kwatsen@juniper.net> Fri, 29 September 2017 01:44 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 388AD1344C3 for <netconf@ietfa.amsl.com>; Thu, 28 Sep 2017 18:44:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.801
X-Spam-Level:
X-Spam-Status: No, score=-4.801 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_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 Rl8BpdTnKnz1 for <netconf@ietfa.amsl.com>; Thu, 28 Sep 2017 18:44:20 -0700 (PDT)
Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0102.outbound.protection.outlook.com [104.47.42.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ABF86134493 for <netconf@ietf.org>; Thu, 28 Sep 2017 18:44:20 -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=79yYjt5kh0q6m/H1InJ12FgXBD51AyvYd/qfaT755nM=; b=gwwX+nykZttI4Q/iPZ4VFp5xNRUAQoPTSh3ztKlqGJNim51iCATGs+jVXdyOKROnGiXtTrxz/MbIRCdXKUxow5WvXKLFkM7YSikby2xa0lYQmDyXkMroQSrn3L+CC/f3PJpVAQexAOp8X8LLMcW2TSz24GK5UHzedc61zWL9/ic=
Received: from BLUPR05MB275.namprd05.prod.outlook.com (10.141.22.149) by BLUPR05MB273.namprd05.prod.outlook.com (10.141.22.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.3; Fri, 29 Sep 2017 01:44:16 +0000
Received: from BLUPR05MB275.namprd05.prod.outlook.com ([10.141.22.149]) by BLUPR05MB275.namprd05.prod.outlook.com ([10.141.22.149]) with mapi id 15.20.0035.010; Fri, 29 Sep 2017 01:44:16 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] WG LC for zerotouch
Thread-Index: AQHTNmkgNr3NKKCDrEalHAYIEUO5aqLHbIGAgAH3n4CAAIp+AIAA6muA
Date: Fri, 29 Sep 2017 01:44:16 +0000
Message-ID: <36B6D286-F8B6-4423-8DD2-4DF74943F2A1@juniper.net>
References: <9F33F0C4-7697-4774-B7F1-A8556A6A73A1@gmail.com> <20170926.192701.1726303533240950350.mbj@tail-f.com> <B08CEFF5-8E7E-4D67-A7E4-9C8992114623@juniper.net> <20170928.094514.526215195914925651.mbj@tail-f.com>
In-Reply-To: <20170928.094514.526215195914925651.mbj@tail-f.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.13]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BLUPR05MB273; 6:FVpiZng7PBpSrpjqWHSuq0JqX+iVB+wsVu0yEK8R+AJNc59UZ4MUvqToh53x6r/JQpxP0Nkt+zFyhG3k5WmbA1+DoUVQ0UdlfjOstkxW1OM/n3PGMeSmJOH2V3hR5g9syFw82r9kf2Ej321XVFlOHMsfnwIYePSs+nVCCzq6WptloTMCXRpptQWNyRuyuuZpN3scrTyEM4U12KQWsyo2/gqRZgIXd969MY8GFyzqPy9aNHIcUoBUU0LUETmb7jcbK2rmhI0waIUKLY0/vaOsvZa1swBUTGHJBSNQNG8YW32kU0NYCLZ9a+6hCBqefMd3AjZLM6pImwMAlvnbvs9YeA==; 5:7h6m0iEFp+F89SOo1bLeigBlsp5OoQLCuWvOJaeLrbmcM8R2JtPyiEzZSZB1jjAnR9C+wReLJVJZ0LOTEW+9edQu0DRikVuT4RYe/ms8Tvcmqrw42+hsZYNSRG8FTtODunzFk3RhuxalJwfebWcQwGT88lfBM6cfj4FqsxwKXjc=; 24:ypVUzrPecW+rWEjMFsRkFfXT6aU1StdaGjd88kh/4/kyblZeyS2wv5bjpuMjbTK88ba1KnqVQ1FkwIJEbFloT8/Pqxubd2njbNDnf83wYg0=; 7:SuPKfmTV/5FtwocYTB7k30NNjmWTjFE52Pov5CbmRWMOANj+rUw8+ZLdFiZdkNL7ksv1vgU0vUPuYdL9bZX0bKwq1nk7goQwZwWHs343RwhcJJfoVbXQspjqn9PacRIpBpQjfEVQJ5H5eC01uiLKJ7HP6X/fLCyUb3krzU3DLWQ1HxW/TkMlew2iDl+x5WJnbTdA3INNgDtQKcZQyfQTm72yPbh0+vQrk7RPhnBaxbA=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 816dc892-23e6-477f-d2fb-08d506db9821
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR05MB273;
x-ms-traffictypediagnostic: BLUPR05MB273:
x-exchange-antispam-report-test: UriScan:(158342451672863)(192374486261705);
x-microsoft-antispam-prvs: <BLUPR05MB273D85AB145128C67E9B5A7A57E0@BLUPR05MB273.namprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(12181511122)(6055026)(6041248)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR05MB273; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR05MB273;
x-forefront-prvs: 0445A82F82
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(346002)(376002)(39860400002)(51444003)(43784003)(40224003)(189002)(57704003)(199003)(81166006)(53936002)(93886005)(102836003)(76176999)(6436002)(6506006)(6116002)(2906002)(99286003)(6246003)(3280700002)(189998001)(6512007)(316002)(14454004)(478600001)(83716003)(86362001)(97736004)(58126008)(3846002)(6486002)(77096006)(2900100001)(50986999)(54356999)(83506001)(81156014)(25786009)(105586002)(305945005)(106356001)(4326008)(8936002)(33656002)(5660300001)(7736002)(2950100002)(101416001)(8676002)(82746002)(66066001)(3660700001)(68736007)(6916009)(229853002)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR05MB273; H:BLUPR05MB275.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kwatsen@juniper.net;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <8711C489189E9344B089A533EFC54A9B@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2017 01:44:16.1657 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB273
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/_fdahdpx8-ef_D4MAFq2aIa6jx0>
Subject: Re: [Netconf] WG LC for zerotouch
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
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, 29 Sep 2017 01:44:24 -0000

Hi Martin,

I trimmed the discussion down to just the open threads.


>> > o  Section 7.2
>> >
>> >  Adding custom query parameters like this breaks the normal YANG
>> >  contract.  If I understand this correctly, the instance data tree
>> >  presented to the client is supposed to change based on these query
>> >  parameters.
>> 
>> Correct.  The idea is that the response could vary based on the input
>> query params.  Of course, in case there was any doubt, the response 
>> would always conform to same YANG schema.
>
>See below.
>
>> >  If you really need to have that functionality, it would better to
>> >  model the device-specific data as an action; input would be the
>> >  os-name, os-version etc, and output would be the
>> >  zerotouch-information and voucher etc.
>> 
>> I thought of this as well, but didn't do anything about it as my 
>> last message to the list said that we'd add "query parameters"
>> and I wanted to follow through on that statement.
>> 
>> But what is the issue?  Is it primarily that using query params 
>> on GET should be limited to returning different representations
>> of a resource, and this use seems to be returning different 
>> resources altogether?
>
> Yes, this is my concern.  A normal RESTCONF / YANG server has *one*
> single instance of the operational state, and it just provides an API
> to this data.  It can be filtered and pruned based on access rights,
> but not modified from the outside based on query parameters.

I agree, it seems more proper.  Okay, let's make this change.  No
objections from the WG, right?  As a heads-up for those following
along, this change doesn't affect the essence of the solution, but
the diff will appear somewhat big...


>> FWIW, if we were to do this, we might also consider moving the 
>> 'serial-number' field from the URL to an input field
>
> Hmm, did you mean 'unique-id'?

Yes. But what about the idea, moving 'unique-id' from the URL path
to an input param?  Or, even more dramatically, we could remove 
'unique-id' altogether, relying instead on the RESTCONF username
extracted from the DevID certificate?

If relying on the extracted username, note that none of the 
'cert-to-name' identities defined in RFC 7407, which is also
used in draft-ietf-netconf-restconf-client-server, would work.
The 'common-name' identity is closest, but what is really needed
is a combination of a 'serialNumber' attribute and an optional
'hardwareModuleName' attribute (not all DevID certs define it).
I suppose that this is an issue for the afore-mentioned restconf
client/server draft more so than this one though.  Still, since
we're talking about it, assuming we did this, would that draft
add said identities, or would a 7407bis be better?


>> , and make
>> a similar change to the 'update-progress' action.  But that then
>> would mess up your NACM rule below.  Thoughts?
>
>We can have:
>
>  list device {
>    key unique-id;
>
>    leaf unique-id { ... }
>
>    action get-bootstrapping-data {
>      input {
>        leaf os-name { ... }
>        leaf os-version { ... }
>        ...
>      }
>      output {
>        leaf zerotouch-information { ... }
>        leaf ownership-voucher { ... }
>        leaf owner-certificate { ... }
>      }
>    }
>
>    action report-progress {  // I like this name better :)
>      ...
>    }
>  }

Yes, this is roughly what switching to an action statement would look
like though, pending on the above discussion, we may use top-level RPCs
instead of actions, if relying on the RESTCONF username.

I agree, 'report-progress' does seem better.  It's a minor thing, but
happy to oblige.  (no objections from the WG, right?)


>> > o  Section 4.4
>> >
>> >     When a device is
>> >     not able to trust a bootstrap server, it MUST NOT send its IDevID
>> >     certificate in the form of a TLS client certificate
>> >
>> >  How will the server authenticate the client in this case?
>> 
>> The idea is that the server doesn't auth the client in this case.
>> The goal behind not sending the IDevID certificate was so a rouge
>> bootstrap server wouldn't be able to discover the device's serial
>> number, which is why Appendix B suggests also masking the serial
>> number the device sends in the URL.  That said, we might need to
>> rethink this, especially in conjunction with your next comment.  
>> (continued below)  
>> 
>> 
>> >  I see that in section 7.3 you have:
>> >
>> >   Note that the bootstrap server MUST NOT process a progress update
>> >   from a device without first authenticating the device.  This is in
>> >   contrast to when a device is fetching data from the server, a read-
>> >   only operation, in which case device authentication is not strictly
>> >   required (e.g., when sending signed information).
>> >
>> >  But the server is a normal RESTCONF server, so it will follow
>> >  section 2.5 of RFC 8040; it will require clients to be
>> >  authenticated.
>> 
>> I was hoping that the draft could suppress this auth requirement
>> for this specific "untrusted" interaction.  In essence, reducing
>> the bootstrap server to a simple file server providing anonymous
>> read-access.
>> 
>> But in the security analysis of things, it comes down to what's 
>> more important to prevent:
>>  a) a rogue server discovering a valid device's serial number,
>>     while not being able to provide the device a response the
>>     device can trust, or
>>  b) a valid server giving signed redirect information to a
>>     rogue device, where the information given doesn't provide
>>     the device any more information than the device must have
>>     already had to make the request in the first place, other
>>     than a confirmation that indeed that serial number is one
>>     that the server is expecting.  
>> 
>> Looking at it this way, (b) is more important to prevent and, 
>> besides:
>> 1) there is already a Security Consideration related to the use
>>    of serial numbers in the solution, so (a) seems to be just
>>    more of the same, 
>> 2) rogue connections could play havoc with the server's logs, and
>> 3) (to your point) it would be tricky business to define an
>>    exception for the standard RESTCONF server to follow.
>> 
>> All this is to say that I think we should go back to the device
>> always sending its IDevID cert and, of course, the server always
>> authenticating the device.  But I also think that a device should
>> continue NOT sending any other information (i.e. query params,
>> progress updates, etc.), beyond its serial number & IDevID cert,
>> until it can fully authenticate the server.
>
> Ok.

Okay, it seems that we agree.  Any objections from the WG?  In case it's
unclear, this change is fairly significant from a solution-perspective.
It will also have a non-trivial impact from a draft-diff perspective.
Please chime in now with any opinions now.

 
>> > o  Section 5.6
>> >
>> >     Upon rebooting, the device MUST still be
>> >     in its initial state, causing the bootstrapping process to run again,
>> >     which will eventually come to this very point,
>> >
>> >  Why this MUST?  What if the new boot image contains other factory
>> >  defaults that does not enable ZTP, would that be illegal?
>> >
>> >  I would think that implementations are free to do whatever they want
>> >  in case of errors.
>> 
>> Maybe not *illegal*, but it would certainly brick the device at that
>> point.  Would just reducing the "MUST" to a "must" suffice, or should
>> we add a qualifier along the lines of "in order for the solution to
>> work..." ?
>
> I would just say something like 
>
>     Upon rebooting, if the new image also enables zerotouch, the
>     device will still be
>     in its initial state, causing the bootstrapping process to run again,
>     which will eventually come to this very point,

Okay.


>> >    In the case of errors, the device MUST reset
>> >    itself in such a way that forces a reinstallation of the boot image,
>> >    thereby wiping out any bad state the script may have left behind.
>> >
>> >  Is this also required?  Why can't stop and wait for manual
>> >  intervention be allowed?
>> 
>> It could, but again, it would brick the device.  Same question as above,
>> would reducing the "MUST" to a "must" suffice, or should we add a 
>> qualifier along the lines of "in order for the solution to work..." ?
>
> Well, this depends if the error is transient or not.  If it is not
> transient, it will just happen again and again.

Maybe, maybe not.  The device could potentially land onto another/different
source of bootstrapping data that works the next go around.  The hope is
that the device keeps trying (and posting progress-updates regarding its
errors) ad infinitum until things eventually clear up.  For instance, an
admin eventually takes notice and administers corrective action.

> I don't have a strong opinion, but I would probably be silent about
> what to do in case of these kinds of errors.  Leave that to the
> implementation to figure out.

I feel that it's critical that manual intervention is never required.
Yes, a manual step could be employed, but it should be a rare step.  I
think it's best to say something along these lines.  I'll try to state
this more clearly.


>> >  I suggest you shorten the lines of the examples even more, so that
>> >  the examples are properly indented in the draft (they are currently
>> >  outdented)
>> 
>> It's hard to make the lines much shorter with the URN being so long.
>> Options are 1) don't indent just the xmlns line or 2) move from two-
>> space indent to single-space indent.  Do you have a preference?
>
> In the second example you use (1).  You can also use "\", which you
> are also already using.

So I do, albeit only in the HTTP-header parts, not the HTTP-body parts.

FWIW, my build-script inserts source files in situ as directed by
processing instructions. I can modify the build-script to do the 
auto-'\' insertion logic on some column-boundary, but it may need
a complimentary update on the extraction tools.  Do we need some 
sort of standard around this?

I'm aware that here you're only talking about examples, which 
currently are not extracted via tools, but the same auto-'\' 
insertion logic could also help with the YANG modules, as they
could become unwieldy too...though I suppose liberal use of 
groupings could always be employed to keep line-lengths in
check.  Okay, but still, a YANG Doctors discussion at IETF 99
suggested introducing the ability to auto-extract and validate
examples in drafts too, to automate as much of the YD review
process as possible, so still I think there may be a need for
a '\' standard of some sort here.  Thoguhts?



> I just found another outdented figure in section 5.3, which probably
> is easier to fix.

Huh?  I don't see it.  The figure in 5.3 looks okay to me...


>> > o  Section 9
>> >
>> >  Should you also mention that /device list should be protected by
>> >  nacm rules?
>> 
>> Yes, indeed, I left out the standard security template for the bootstrap
>> server YANG module.  Will add.
>> 
>> 
>> >  If the RESTCONF user name is the device's unique-id, then a single
>> >  NACM rule can be used:
>> >
>> >       <rule>
>> >         <name>allow-device</name>
>> >         <path xmlns:ztbs="urn:ietf:params:xml:ns:yang:\ietf-zerotouch-bootstrap-server">
>> >           /ztbs:device[ztbs:unique-id=$USER]
>> >         </path>
>> >         <access-operations>read</access-operations>
>> >         <action>permit</action>
>> >       </rule>
>> 
>> Yes, but would you expect this to appear in the draft?  Typically, the specific
>> NACM rule syntax is left as an exercise to the reader...
>
> In order to do this, the "username" must be the same as the
> "unique-id".  This requires the client cert to be constructed
> properly.

Agreed.  In this case, the client cert is a DevID cert, and  802.1AR 
governs its construction.  Not too many options there.  Of course, 
the mapping of said cert to username is being discussed above wrt the
cert-to-name mapping logic... 


>> Since the NACM rule is not obvious, and due to the cert implications,
>> I think it would be very helpful with an appendix that describes how
>> this can be set up.

I think that this will depend on if we go with an action or a top-level 
RPC. If an action, then NACM may have a place and an example may help.
But, if using a top-level RPC, then it seems that the server has no 
option but to auth the DevID cert and provide a RESTCONF username-specific
response - NACM can't constrain it any further, right?  (note: this seems
more secure to me - I like it)


>> > o  Other comment
>> >
>> >  Is it assumed that there will be a vendor-specific YANG module to
>> >  enable the zero-touch process?  Did you consider an
>> >  ietf-zerotouch-device module for this purpose?  Such a configuration
>> >  must be carefully designed to allow for a "merge" configuration file
>> >  to actually disable the zero touch process.
>> 
>> It is assumed to be vendor-specific currently.  I have not thought to
>> define a ietf-zerotouch-device module as of yet that, presumably, would
>> contain a boolean or an enum (but not a p-container) for enabling the
>> service.  Do you think we should add such a module to the draft, or just
>> put a note somewhere about it?
>
> I don't have a strong opinion, but if there's not a standard module
> for this, the text should mention that it is assumed that vendors
> define this themselves.   Hmm, I think I would prefer a standard
> module; it would make the solution more complete.

We can add a module, but maybe it should be called something like
ietf-zerotouch-bootstrap-client, to mirror the ietf-zerotouch-
bootstrap-server module? - though this may be a mismatch as the
former regards a southbound protocol and the latter regards a
configuration model...

Maybe we can discuss what would be in this model.  I'm not sure if
I'm oversimplifying it, but I think the module might be just a single
config true leaf called something like "enabled".   There might also
be some config false leafs for the stuff mentioned in section 5.1, 
though it doing so is not so important since the bootstrapping only
occurs once (not ongoing management).  So a module would primarily
be for the "enabled" leaf.  Anything else?  Still think it's worth it?


Thanks again,
Kent