Re: [Netconf] LC on subscribed-notifications-10

"Eric Voit (evoit)" <> Wed, 13 June 2018 22:34 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 497AD130DC9 for <>; Wed, 13 Jun 2018 15:34:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -12.521
X-Spam-Status: No, score=-12.521 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id wUXtiMVz86cc for <>; Wed, 13 Jun 2018 15:34:02 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id D38A5130FE2 for <>; Wed, 13 Jun 2018 15:34:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;;; l=54082; q=dns/txt; s=iport; t=1528929241; x=1530138841; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=bNhqcsG+bJWPuP4uXlxmxEYkxv9qElvIlNc/Bxpv6wU=; b=fAexwYX4TclfwMLuQmOs+AM7vx5aXVrnKru/c56ShCf0oluCjjsv4/mt FIGAx+opg1CyrP7ojbsYkiFcCiEqFY33T36x+c4ozAZWaUZj/hxlFIE4i d5C9vjxo2/lqAJf8M36uVT6+TYCH5uJyGP9wop4MprwPVV9Ly9DT3eddY w=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CbAABsmyFb/4oNJK1TChkBAQEBAQE?= =?us-ascii?q?BAQEBAQEHAQEBAQGCU3ViTTIoCoNvgV+GJY5nlGmBeAskhEgCF4IgITQYAQI?= =?us-ascii?q?BAQEBAQECbRwMhSgBAQECAhoJCkoCEAIBCA4EAxATAQkCAgIwFw4CBA4NE4M?= =?us-ascii?q?JgRtkD60jghwfiCmBYwWHNIEID4FUP4EPgwyDEQEBAQEYgRsEARAdByqCSYJ?= =?us-ascii?q?VApkKCQKFcoh/gUeDfoJohQ+KCocMAhETAYEkHTiBUnAVgn6BcYQMilJvAQE?= =?us-ascii?q?BjhMBJYEIgRoBAQ?=
X-IronPort-AV: E=Sophos;i="5.51,220,1526342400"; d="scan'208,217";a="191925767"
Received: from ([]) by with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 22:34:00 +0000
Received: from ( []) by (8.14.5/8.14.5) with ESMTP id w5DMXxWV023241 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 13 Jun 2018 22:33:59 GMT
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 13 Jun 2018 18:33:58 -0400
Received: from ([]) by ([]) with mapi id 15.00.1320.000; Wed, 13 Jun 2018 18:33:58 -0400
From: "Eric Voit (evoit)" <>
To: Kent Watsen <>
CC: "" <>, Alexander Clemm <>
Thread-Topic: [Netconf] LC on subscribed-notifications-10
Date: Wed, 13 Jun 2018 22:33:58 +0000
Message-ID: <>
References: <> <> <040a01d3be9f$09700490$1c500db0$> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_b94935c9fbbb4ced8b7393ea42457471XCHRTP013ciscocom_"
MIME-Version: 1.0
Archived-At: <>
Subject: Re: [Netconf] LC on subscribed-notifications-10
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Network Configuration WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 13 Jun 2018 22:34:10 -0000

Now <Eric10>

From: Kent Watsen, June 12, 2018 6:38 PM

Please look for <Kent9> below.

Next, I view this as a Security Consideration, since nefarious things can happen when a device reboots and note that a DoS could extend the gap to hours or days.  I think that this draft (the text above) is watering down the issue.  In my view, this is a huge consideration, along the lines of a receiver really MUST always try to use a dynamic subscription to fill in any gaps.

<Eric6> I agree this is a best practice, but a MUST would require telemetry receivers to have to support dynamic subscriptions.  I can see IoT receiver implementations where this wouldn’t be likely.

<Kent6> Good point, but I don't see in the YANG module establish-subscription being optional to implement.  Is that an oversight?

<Eric7> This is ok.  It is totally fine for a publisher to support dynamic subscriptions.  But a receiver need not.  Perhaps a lightweight IoT client just will just be a configured subscription receiver.

<Kent7> I think you misunderstood me.  Using your IoT example, even though a device (or the entire IoT space) only uses configured subscriptions, the current module doesn't enable a server to not support dynamic subscriptions.   For constrained devices, having to implement something never used could be a problem…

<Eric8>  The requirement is that a publisher must support a dynamic subscription.  There is no requirement for that on a configured receiver.   To clarify this, I have tweaked early “Configured Subscriptions” section text to say:

On the publisher, supporting configured subscriptions is optional and advertised using the "configured" feature. On a configured receiver, support for dynamic subscriptions is optional except where replaying missed event records is required.

<Kent8> I understand that supporting dynamic subscriptions is currently a requirement.  I am challenging that requirement.  Why is it a requirement?  Does it have to be a requirement?

What if an IoT device only wants to support configured subscriptions and having code to support dynamic is wasting space?    FWIW, I realize that not supporting dynamic subscriptions also means that it would be impossible to filling in gaps introduced by a reboot, but maybe that's a decision that the vendor can/should make for themselves?

<Eric9> In RFC-5277, all you have is dynamic subscriptions.  So support for that older spec by definition makes dynamic subscriptions mandatory.  Beyond that, newer specifications like RFC-7923 as well as sections of other documents like RFC-7921, section 7.6 identify dynamic subscriptions as mandatory for a subscription service.  So at least some use cases exist where such dynamic support is mandatory.

<Kent9> Does it?   I mean, this draft doesn't obsolete 5277, so it seems that server can optionally support one or the other or both, and when it supports this draft, can't it use a feature statement to limit dynamic subscriptions?

<Eric10> Per below, I am ok to make dynamic subscription support optional (even if I don’t believe this is the right decision).  Part of the fix in the YANG Model description text would be to note that either dynamic or configured must be supported.

With your IoT publisher use case above you are asserting that dynamic subscriptions are not needed for configured subscription only publishers – i.e., there are a class of publishers which have been driven by use cases not considered by the documents referenced above.  So who has documented the need configured subscription only publishers?   I can’t point to such documentation (beyond IoT case above).  Is such a possibility worth slowing down this spec?     In the end making the fix for this specification which you seem to want is itself really quite trivial: we can make both dynamic and configured subscriptions optional.  The reason I have been resisting it is that this solution (a) leads to more complexity for implementers as yet another feature would have to be advertised as optional, (b) this waters down the mandatory capabilities support of the YANG module, and (c) we would need to include some a constraint that at least one of the two optional features needs to be supported.  Also for (c) AFAIK, features don’t support the application of such constraints, so it would have to be done in the feature descriptions themselves.

I guess the text above is a long way of saying that if you assert the optional dynamic subscription is mandatory to progress the document, I will make the change.  But the change will impose complexity costs which to me are hard to justify.

<Kent9> that's a reasonable answer, but mind you that it was your IoT use-case originally.   I'd like to get other opinions.  Yes, trivial to add now, hard to add later, more flexibility for servers, almost no additional effort for clients.  FWIW, I'm planning to add a feature statement for "periodic connections" in the ietf-[net|rest]conf-client-server drafts for similar reasons, that the server just might not want to support them, and I don't want the minimal bar to be higher than needed.

<Eric10> Lets go with whatever opinions people have.  I will adapt accordingly.   Do you want me to start an independent thread?


<Kent4> this I agree with, but I really don't like the fact that receiver MUST do a short-lived dynamic subscription to scoop-up any possibly-missed logs, for which there may be none.  Perhaps we could add more values into the "subscription-started" notification message that would enable to receiver to make a local determination if such a dynamic subscription would be  helpful?

<Eric5> I recommend against providing extra objects/reasons in the “subscription-started” at this time.  Publishers might not want to advertise a reboot, and they might not want to advertise why there was loss in event continuity.   All that should matter to a receiver is that such a discontinuity existed, and they have a way to try to fill event the gap should they care.  If the need for more data and the cause of the discontinuity turns out to be required, we can always augment here with future objects.

<KENT5> first, I'm still not 100% sure if this is just a reboot problem, or any time the subscription is restarted/resumed.

<Eric6> Per above: retrieving missing event records is not a reboot specific problem.  But unintentionally replicating event records is reboot specific.  (Otherwise the configured replay-start-time would drive a repeat of everything on each and every reboot.)

<Kent6> okay, I think I got it this time.  Having a *configurable* replay-start-time is so confusing.  Is it really worth having?

<Eric7>   Yes it is worth having.

(a) In many environments, reboot is very infrequent.  Without configurable start time, an operator setting up a configured subscription would not have the ability to designate what to send.  It could only send the full log (at whatever size).

(b) on-publisher security or troubleshooting diagnostics might identify a breach or some event where streaming recent historical event records is a MUST.  As a result, it might want to stream a subset of event records off a box going back in time to potential events which might have been evidence or contributing factors.

<Kent7> Let me come at this another way.  Assume we drop all support for *configurable* replay-start-time.  As such, configured subscriptions always start with the next-generated event (no replay at all).   This covers most use-cases, right?   For those receivers that really wanted the older logs, can't they just do a dynamic subscription to collect them, same as we've been discussing above?

<Eric8> Some reasons this might not always be practical:

(a) IoT devices just might want to passively listen to event streams of Telemetry.  (I.e., this would force configured receivers to support dynamic subscriptions.)

(b) This forces complexity onto applications which only ever need to track what has happened since boot.  (E.g., per above, continuous Integrity Measurement Architecture (IMA) boot log streaming and evaluation.)

(c) Publisher access permissions for who can use the establish-subscription RPC might have to be expanded to include lots of configured receivers.  This might open up a vector to control plane DDoS.  Right now the access permissions would just have to allow the receiver read access to the event records.

(d) A publisher may choose to firewall classes of receivers (or locations of receivers) into a listen-only mode without the ability to establish subscriptions.

<Kent8> This response seems to address the "can't they just do a dynamic subscription" aspect of my comment, but doesn't really address the "why is it important" (I paraphrase) part.  My contention is that the concept of a *configurable* replay-start-time seems confusing and of low value.   I acknowledge that there is some value, but it seems like the value is limited to a one-time start-up optimization that can be alternatively addressed by a dynamic subscription to fetch earlier events (assuming it's allowed, per your points b-d).   Additionally, FWIW, I've never seen such a feature implemented before, and logging mechanisms have been around for decades, so this makes me think that this is something that probably isn't worth having.

<Eric9> As you point out, the why "can't they just do a dynamic subscription" is covered, and we shouldn’t always assume away (b)-(d) as they can matter in some scenarios.  So if we want to support the use case of streaming log entries made after boot, but before the transport session is available, the only alternative I see is to have a configured replay-flag rather than a configuring a start-time.  Are you ok with a flag instead?  Or do you have an alternative suggestion?

<Kent9> see below.

In terms of using this configured replay capability, Cisco’s Integrity Verification application<>

does do a shell access event log fetch of the full log after boot, and then just does incremental fetch the deltas of the log (based on log line numbers).  This application is interested in configured subscriptions subsequent to boot for this purpose.  So such incremental streaming of portions of syslog after boot seems like a typical/common need to me.

<Kent9> it might be typical/common desire, but it's still once in the lifetime of the configured subscription.  It seems like, if the device supports dynamic subscriptions, after receiving subscription-started, the client could a) pause the configured subscription, b) use a dynamic subscript to fetch the missing logs, and then c) resume the flow of logs from the configured subscriptions.

<Eric10> Your proposal still precludes (b)-(d) above.   In addition for your step a), there is no RPC or action which allows the event records from a configured (or dynamic) subscription to be paused.  The solution also adds complexity into the client to recognize that early events might be missing, to issue an establish-subscription, and then to tie the results of the independent subscriptions together.

Supporting a “replay” flag on a configured publisher is simpler.



<Eric4>  Tweaked a Section sentence to say:

This document puts no restrictions on the size or form of the log, where it resides within the publisher, or when event record entries in the log are purged.

I suggest adding text that clarifies this, and details the need for a short-lived dynamic-subscription.

<Eric4> The tweak above, with the suggested text in the Implementation Considerations section above hopefully covers this.

<KENT5> the "purged" part helps, but whyis this information buried inside a section titled "Requesting a replay of event records"?

<Eric6>   This is the second paragraph of the first section which discussed replay.  It is the sentence after the optional feature of replay is introduced.

<Kent6> I understand how it fits into this section, but it seems like it should be in a section called something like "replay log", since it's equally applicable for configured subscriptions (and s2.4 is about dynamic subscriptions).  Of course, if we remove replay from configured subscriptions, then leaving it here makes sense…

<Eric7> Per above, there is lots of value in configured replay.

<Kent7> Yes, but see again my challenge to that assertion.  I'm leaving this here in case the decision is flipped…