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

"Eric Voit (evoit)" <evoit@cisco.com> Tue, 15 May 2018 15:54 UTC

Return-Path: <evoit@cisco.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 281BB12D94E for <netconf@ietfa.amsl.com>; Tue, 15 May 2018 08:54:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -12.52
X-Spam-Level:
X-Spam-Status: No, score=-12.52 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, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 HIfOVirMkNxs for <netconf@ietfa.amsl.com>; Tue, 15 May 2018 08:54:40 -0700 (PDT)
Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EAFE5124207 for <netconf@ietf.org>; Tue, 15 May 2018 08:54:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=81250; q=dns/txt; s=iport; t=1526399679; x=1527609279; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=PnhjnieLgNRxPHq2wU0nJVT+/SEzLGdRSn88pwDb8dU=; b=eSGT2xr0PSysymOn/tDzEPrlazeWEd7uBIpYu4i9UqQQ/s+de6EYlZ00 tmnJhcjT63dIIkR4Qw+0O1wt4V1XADq7xgLEC4SS8IhpfEWGk7oajAlss BmtcN1vrquIUbCamfenzccapDHHLTnTQt8cOCa1EW+JhQhHJYetQuJkQ5 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AdAQAVAvta/5NdJa1SChkBAQEBAQE?= =?us-ascii?q?BAQEBAQEHAQEBAQGCTUsrYXwoCoNqgV+GJYxzgXl1GpMygXgLIoRKAhqCfiE?= =?us-ascii?q?0GAECAQEBAQEBAmwcDIUoAQEBBBoBCApKEgIBBgIOBAMQEwEGAwICAjAUAw4?= =?us-ascii?q?CBAESCBODCoEbZA+PaJtBghwfiCqCIgWIFg+BVD+BD4IMSjWDEQICGIEbBC4?= =?us-ascii?q?HKAKCSIJUAoU+gXOGCINRhy8JAoVlhTmDKox5iVeGZwIREwGBJAEcOIFScBW?= =?us-ascii?q?CfoFwgUEBAoJIilJvAQGNAgIFHwMEgQGBGAEB?=
X-IronPort-AV: E=Sophos;i="5.49,403,1520899200"; d="scan'208,217";a="115182750"
Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2018 15:54:38 +0000
Received: from XCH-RTP-012.cisco.com (xch-rtp-012.cisco.com [64.101.220.152]) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id w4FFsc4c011085 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 15 May 2018 15:54:38 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-012.cisco.com (64.101.220.152) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 15 May 2018 11:54:37 -0400
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1320.000; Tue, 15 May 2018 11:54:37 -0400
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: Kent Watsen <kwatsen@juniper.net>, Alexander Clemm <ludwig@clemm.org>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] LC on subscribed-notifications-10
Thread-Index: AQHTvAAnP4UPxNeFY0CSJ8tCCoPN1aPROUcQgATP1QCAHwQrAIADjkNQgA1teoD//750sIAJjRkA///cqgCAA11fAIAAqbKwgBOiSQCAARvxAIAIk/4AgACP9NA=
Date: Tue, 15 May 2018 15:54:37 +0000
Message-ID: <3b4744f4e2144ee18b9bfd5225360bf4@XCH-RTP-013.cisco.com>
References: <17B884BF-0BB8-4B7C-BFBB-0AAFBEA857F6@juniper.net> <aedeb7390d0b4faa9f2bf12c2fe45cd2@XCH-RTP-013.cisco.com> <040a01d3be9f$09700490$1c500db0$@clemm.org> <2089023D-DA09-48E9-8F37-8FE459DC4F49@juniper.net> <dfc78f2b1062498388824b1f6dd97ff6@XCH-RTP-013.cisco.com> <1EC2E732-C524-4552-A3AD-27507239F763@juniper.net> <2b788c22f7ee4af889813b805348d69a@XCH-RTP-013.cisco.com> <9E7F3A66-98B9-4528-882C-43AAD19F0AEC@juniper.net> <96615f0331cd455182901ddf3e6ece23@XCH-RTP-013.cisco.com> <7F8F2AF4-28A5-4016-B727-10CAF6A093AF@juniper.net> <87fbe3cb907a473f816295c4545bd7fa@XCH-RTP-013.cisco.com> <CEE5B81C-31AE-40C6-B2F0-23D93C644D85@juniper.net> <fd172bddff134db6aeda49b7e8bfd3e9@XCH-RTP-013.cisco.com> <B112DC20-D6FC-44BA-AACE-0E641D49C5C3@juniper.net>
In-Reply-To: <B112DC20-D6FC-44BA-AACE-0E641D49C5C3@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.228]
Content-Type: multipart/alternative; boundary="_000_3b4744f4e2144ee18b9bfd5225360bf4XCHRTP013ciscocom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/fe8INnPBqdKDfhxXnjyW2RGnvi4>
Subject: Re: [Netconf] LC on subscribed-notifications-10
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: Tue, 15 May 2018 15:54:44 -0000

Hi Kent,

Now <Eric7>

Eric

From: Kent Watsen, May 14, 2018 8:00 PM

Hi Eric,

Now <Kent6>

Kent


On 5/9/18, 5:39 PM, "Eric Voit (evoit)" <evoit@cisco.com<mailto:evoit@cisco.com>> wrote:

Hi Kent,

See <Eric6>.  Current version can be seen at:
https://github.com/netconf-wg/rfc5277bis/blob/master/draft-ietf-netconf-subscribed-notifications-13.txt<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_netconf-2Dwg_rfc5277bis_blob_master_draft-2Dietf-2Dnetconf-2Dsubscribed-2Dnotifications-2D13.txt&d=DwMGaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=RZ_qNzuDRX0D4rDeJJ8fe76NaiVfDiQLNf2edHaFvnI&s=cjTkob7LnjltmMqskx_dCrJN1h-qlRRBc2KUblzNNGg&e=>



[further trimming]


<Eric3>  Added the descriptive paragraph requested in the middle of the three paragraphs below...

It is possible to place a start time on a configured subscription.  This enables streaming of logged information immediately after restart.

Replay of events records created since restart can be quite useful.  This allows event records generated before transport connectivity was supportable by a publisher to be passed to a receiver.  In addition, event records logged before restart are not sent.  This avoids the potential for accidental event record duplication.  Such duplication might otherwise be likely as a configured subscription’s identifier before and after the reboot is the same, and there may be not be evidence to a receiver that a restart has occurred.  By establishing restart as the earliest potential time for event records to be included in notification messages, a well-understood timeframe for replay is defined.

Therefore, when configured replay subscription receivers first become ACTIVE, buffered event records (if any) will be sent immediately after the "subscription-started" notification.  And the leading event record sent will be the first event record subsequent to the latest of four different times: the "replay-log-creation-time", "replay-log-aged-time", "replay-start-time", or the most recent publisher boot time.

<Kent3> Hmmm, I'm having a negative reaction to the "event records logged before restart are not sent" bit.  I know what you are trying to do, but I worry that this behavior might drop important logs, perhaps to the advantage of an adversary.  Note that some devices implement an <edit-config> with a restart.  Maybe the solution should require publishers to maintain a per configured-subscription awareness of (roughly) which log was sent last?   - and notify the receiver when a restart has occurred, or when the replaying of events occurs, so that they can be aware that there might be some duplicates?

<Eric4>  The current solution guarantees no duplicates, and also informs the receiver of each new “start-time”.  This allows the receiver to attempt to reconstruct any gaps from the last event previously pushed, should the choose to attempt such reconstruction.   As a dynamic subscription has no such boundary constraints on replay and boot time, all a subsequent dynamic subscription needs to do is to request the events between the last received event previously received from that configured subscription and the new replay-start-time.

<Kent4> So, the receiver is informed of each new "start-time" via the "subscription-started" control message, and then MUST do a short-lived dynamic subscription to scoop-up any possibly-missed logs, for which there may be none?   If we choose to keep this behavior, the draft should say this more clearly, perhaps in the Security Considerations section…

<Eric5> Added the following text as the last paragraph in the Implementation Considerations Section...

For configured replay subscriptions, the receiver is protected from duplicated events being pushed after a publisher is rebooted.  However it is possible that a receiver might want to acquire event records which failed to be delivered just prior to the reboot. Delivering these event records be accomplished by leveraging the “eventTime” from the last event record received prior to the receipt of a “subscription-started” state change notification.  With this “eventTime” and  the “replay-start-time” from the “subscription-started” notification, an independent dynamic subscription can be established which retrieves any event records which may have been generated but not sent to the receiver.

 <KENT5> Is this really limited to reboots, or any restarting of a configured subscription?

<Eric6> The protection from event replication is just for reboots – this is because the configured replay start time might duplicate events already sent from a previous boot.

<Kent6> So, in the case of a suspend/resume, the device picks up where it left off?   Or is it also just starting with "current"?  (strangely, I'm having trouble finding this answer in -13).  If it picks up where it left off, does this mean that the device has index of some sort and, if so, why can't that state be persisted in the case of a graceful shutdown/restart?

<Eric7> It would be *very* difficult to persist on the publisher which event actually was received last by a receiver.  However the receiver can make that determination, as it does maintain that state.  Look for my proposal below on how to handle this with a new leaf in “subscription-started” “replay-previous-event-time”

But the mechanism to retrieve lost events is common between reboots and restarts.  I.e., using this solution, a receiver never needs to know a reboot occurred.  It just knows that a subscription restart occurred, and there might be a gap in events which should be retrieved via a dynamic subscription.

By having the receiver follow the same process for both reboots and restarted subscriptions, it simplifies recovery procedures.

<Kent6> I'm unsure about the "same process" (mentioned in my previous comment).

<Eric7> It is the same process.  Note that below, the “replay-previous-event-time” tweak allows a receiver to determine if there are events missed.  And with the tweak, the fact a reboot has happened is still not explicitly exposed.


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.

To cover your desire to highlight this in security, I have added the following requirement to the Security Considerations Section:

When a configured receiver gets a new “subscription-started” message for a known subscription where it is already consuming events, the receiver SHOULD retrieve any event records generated since the last event record was received.  This can be accomplish by establishing a separate dynamic replay subscription with the same filtering criteria with the publisher.

<Kent6> that's helpful.  Perhaps tack onto the end of the last sentence something like ", assuming the publisher supports the ['dynamic' and] 'replay' feature[s]"?

<Eric7>  Added
“, assuming the publisher supports the "replay" feature.”
As dynamic isn’t an optional feature.

It almost begs the question for why configured subscriptions are supported at all.

<Eric6> Because there have been lots of industry requests.  And lots of implementations with non-IETF solutions.  Personally I prefer dynamic subscriptions.

<Kent6> I can see the appeal of configured subscriptions, but if each receiver of a configured subscription SHOULD always do a dynamic subscription on every publisher reboot, it is already being coded to support dynamic subscriptions, at which point it seems that maybe it should've just been implemented to support dynamic subscriptions from the start (on top of the publisher-initiated call-home transport, of course).   Can you say some more about these industry requests and, in particular, if the requests are still strong even when made aware of the need to also do dynamic subscriptions?

<Eric7>  Here is an industry request:  stream event record entries being placed into security logs (e.g., Integrity Measurement Architecture audit events).   These events are only relevant starting at boot time.  Losing events means a system cannot be validated.  And days after a boot, streaming all the events since boot would result in too many events.   So in this environment, doing a dynamic subscription to fill the gap is acceptable.



<snip/>



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



Next, can you explain what info could be provided that might allow a client to make a local decision as to whether a dynamic subscription is needed of not, and does the "replay-start-time" node provide it?



<Eric6> The local decision is easy.   As a configured receiver, I have just received a new subscription-started state change notification for a subscription I am tracking.  If I *need* to know about any events which occurred since the last event record I received for that subscription-id, then create a separate replay to cover that time gap.



<Kent6> it's not "if I need to know" so much as "I *know* that I'm missing some events because X and Y and, therefore I will create a dynamic subscription otherwise, since I know that I didn't miss any events, I will not create a dynamic subscription."   I'm trying to figure out what X and Y might be…



<Eric7>  Right now the evidence a configured receiver has is:

X = A subscription #3333 exists, the last event record came in at 2:01:55UTC.  I never got a “subscription-terminated” or “subscription-concluded”.

Y = a new “subscription-started” arrives.



Thinking about how to accomplish what you are asking, I do think there might be a possibility.   We could place a new object “replay-previous-event-time” in the subscription-started notification:



       +---n subscription-started {configured}?

          +--ro (target)

             +--:(stream)

            +--ro replay-start-time?       yang:date-and-time        {replay}?

            +--ro replay-previous-event-time?       yang:date-and-time        {replay}?



What this object would do is to provide the timestamp of the event record just prior to the “replay-start-time” in the event buffer (should such a previous event exist).   If this timestamp doesn’t match the last event a receiver got (e.g., 2:01:55UTC), then a dynamic subscription could be established to fill the information gap.





<Kent3> Going back to my original comment, the new paragraph helps, it certainly caught my attention regarding reboots wiping out the replay log buffer.



<Eric4>  There is no requirement that the reboot wipe outs out the buffer (the solution is agnostic to that).   The only requirement is that a configured subscription replay start no earlier than the last reboot time.



<Kent4> I'm glad to hear that the logs before restart aren't lost, just rather that there is no attempt to send them by default.   This wasn't all that obvious to me from what you wrote before.



<Eric4>  Tweaked a Section 2.4.2.1 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.



<snip/>

<snip7>



<Eric5>  Move to a new section just before Security Considerations.   Added the last sentence:



Additional transport requirements will be dictated by the choice of transport used with a subscription. For an example of such requirements with NETCONF transport, see [I-D.draft-ietf-netconf-netconf-event-notifications].



<KENT5> This new section "Transport Considerations" seems to be a mashup of requirements, security considerations, and recommendations and, as such, is a bit confusing.  I recommend ensuring the right info is in the right sections.



<Eric6> Look at <Kent4>.  My attempt was to do exactly what you requested.



Per the above, there simply are not many common transport requirements.    If you want me to split them up, that is fine.   If you want me to house them in “transport considerations” that is fine too.   I think that collapsing everything back to Security Considerations is the cleanest approach.    But a consistent target would be help us close this questions.   If you have cycles to propose a specific distribution, that would be great.



<Kent6> sorry, I wasn't clear before.  Requirements are having MUST and MAY.  Security Considerations are more SHOULD and RECOMMENDED.  I'm seeing a mix in this section.  I think that all the SHOULD and RECOMMENDED statements should be moved to the Security Considerations section (assuming they are indeed Security related).



<Eric7>
Renamed section to “Transport Requirements”



Moved the SHOULD NOT requirement back to the security considerations section.



Moved the “One subscription identifier can be used for two or more receivers” statement back to the security considerations section.



<Kent5?>It only mentions the need for one-way authentication, is that correct?



<Eric6>: One way authentication is needed before pushing events from the perspective of the publisher.   The receiver certainly might want to verify the publisher.  Mechanisms to accomplish that can be transport dependent.  If you want to add a simple statement “A receiver MUST authenticate a publisher”, that can be done as generic guidance.



<Kent6> Yes, exactly, if it is true.   Perhaps have the two statements and then say something about "mutual authentication" so that it is crystal clear.



<Eric7>  Now Says:

For both configured and dynamic subscriptions the publisher MUST authenticate a receiver via some transport level mechanism before sending any event records for which they are authorized to see.  In addition, the receiver MUST authenticate the publisher at the transport level.  The result is mutual authentication between the two.



<Kent5?> The first paragraph's use of the word "authorize" confuses me, especially in context of the 2nd paragraph, what would the "transport" authorize?



<Eric6>  Tweaked the wording to:



For both configured and dynamic subscriptions the publisher MUST authenticate a receiver via some transport level mechanism before sending any event records for which they are authorized to see.



<Kent6> better, thx.





BTW, maybe this section needs to more clearly specify that it only regards the transport for dedicated notification channels (not the transport for NC or RC).



<Eric7>   Tweaked the section lead-off to:

This section provides requirements for any subscribed notification transport supporting the solution presented in this document.



<Eric6>  Added the sentence at the beginning of the section:



This section provides requirements which must be supportable via any transport technology supporting this solution.



<Kent6> perhaps s/this solution/the solution presented in this document/???



<Eric7>

Change made.