[core] Re: Coreconf Notifications

Thomas.Graf@swisscom.com Wed, 24 July 2024 19:28 UTC

Return-Path: <Thomas.Graf@swisscom.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0F42CC14F6E9; Wed, 24 Jul 2024 12:28:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.404
X-Spam-Level:
X-Spam-Status: No, score=-4.404 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_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 (2048-bit key) header.d=swisscom.com
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 3qzJmkEfxSsv; Wed, 24 Jul 2024 12:27:57 -0700 (PDT)
Received: from mail.swisscom.com (mailout120.swisscom.com [138.188.166.120]) (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 97742C14F6E1; Wed, 24 Jul 2024 12:27:56 -0700 (PDT)
Received: by mail.swisscom.com; Wed, 24 Jul 2024 21:27:49 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=swisscom.com; s=iscm; t=1721849269; bh=e3KB52GLeuBgk0sqFXLTVEBDiJtT4vgDDxXDYMVvaYw=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=DbpGU0hGRZDkXl73GfUsByJ6fnW0P94IsH3NS6baqMFuUPxB9r4R5UbK1N8vyKBFL hRt9UNLnwBtvNGPwer80BZCQ+DlofjSgVNhpwxkRwbROo0ERKunSI4OKs7yE8qsF9l x2P2UWpAHTou2+KsRArBdvvGkzdCiwZLN5coR7P/ds/o9rLcZATnm19o/KNcMddYD3 oixh44SaFjRcednEKbaJ9JyhpBmnIAB849q4mOmLEKt20AkS4UYfeLmWU/wYybFv3+ NnF5lUWvEi5lKDw/PC6PEMTVxbW28gj7fzfvFTR0eW/+dMXobDkv08anqeB0Py3gr3 fJV00MnY7ZFtA==
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="----=_Part_511017_2086582405.1721849268764"
X-Mailer: Totemo_TrustMail_(Notification)
From: Thomas.Graf@swisscom.com
To: andy@yumaworks.com, alex.huang-feng@insa-lyon.fr
Thread-Topic: [core] Coreconf Notifications
Thread-Index: AQHa2SsThgXVwBWCxkCBE1ZgPPD4AbH82pqAgAGqIICAAR5LAIAGdtIAgAAHyICAACbb4A==
Date: Wed, 24 Jul 2024 19:27:45 +0000
Message-ID: <0e37cbe90758409fae2a8f6763ffc986@swisscom.com>
References: <E2DFFA8E-9766-4CB4-BCAA-6897402B8FB2@insa-lyon.fr> <5C0595E7-2071-4A6F-A0C8-6F9DE138535F@tzi.org> <C4AE55E1-0907-4BBD-A2BA-802063E10B50@insa-lyon.fr> <397772B6-6DAE-4A2D-BFD0-7A77ABE1415E@tzi.org> <E0D2CFE6-B0BD-4F0A-9F5C-4C29ADF16861@insa-lyon.fr> <CABCOCHT6B+9fjJL_UBArfcV1KO9SJBoV+588goWsDJ5_x_1x0A@mail.gmail.com>
In-Reply-To: <CABCOCHT6B+9fjJL_UBArfcV1KO9SJBoV+588goWsDJ5_x_1x0A@mail.gmail.com>
Accept-Language: en-US, de-CH
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_ActionId=ab9c2f8f-dd83-446d-953d-4ea6c8bf7274;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_ContentBits=0;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_Enabled=true;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_Method=Standard;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_Name=C2 Internal;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_SetDate=2024-07-24T19:12:20Z;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_SiteId=364e5b87-c1c7-420d-9bee-c35d19b557a1;
x-originating-ip: [138.188.161.184]
X-CFilter-Loop: Reflected
X-Trustmail: processed
Message-ID-Hash: T5UTTFJGMSSLE7P52JCMTHHDWFY5GPDT
X-Message-ID-Hash: T5UTTFJGMSSLE7P52JCMTHHDWFY5GPDT
X-MailFrom: Thomas.Graf@swisscom.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-core.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: draft-ietf-core-comi@ietf.org, core@ietf.org, pierre.francois@insa-lyon.fr, vivekananda.boudia@insa-lyon.fr, benoit.claise@huawei.com
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [core] Re: Coreconf Notifications
List-Id: "Constrained RESTful Environments (CoRE) Working Group list" <core.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/QxyCIA15b1OHFTOpvYjpOaXLeaw>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Owner: <mailto:core-owner@ietf.org>
List-Post: <mailto:core@ietf.org>
List-Subscribe: <mailto:core-join@ietf.org>
List-Unsubscribe: <mailto:core-leave@ietf.org>

Dear Andy,


  *   I have implemented notifications in XML, JSON, and CBOR with no problems adapting the XSD in RFC 5277.

The worry is on "adapting". I prefer to have normative machine readable semantics describing that to ensure interoperability.


  *   I am strongly opposed to declaring RFC 5277 obsolete.

I pointed out during the core working group session that the netconf working group has in its charter 19 the objection described to obsolete RFC 5277 with the introduction of RFC 8639/8641.

https://datatracker.ietf.org/doc/charter-ietf-netconf/19/

Provide a set of documents enabling advanced notification/subscription capabilities, which gracefully co-exist with deployments of NETCONF Event Notification (RFC 5277<https://datatracker.ietf.org/doc/rfc5277/>) The new capabilities include transport independence and multiple dynamic and configured subscriptions in a single transport session. RFC 5277<https://datatracker.ietf.org/doc/rfc5277/> will be obsoleted in parallel with the publication of the new document set. The following specifications will be published:
- A protocol-independent notification framework, explaining the concepts of subscriptions, filters, subscription state notifications, replay, etc. and defining the associated YANG data model, RPCs, etc.
- Definition of notifications sent over NETCONF and HTTP. Examples for the encoding of YANG notifications in XML and JSON will be given and considerations for parallel support and implementation compatibility with RFC 5277<https://datatracker.ietf.org/doc/rfc5277/> will be included.
- Definition of notifications sent over RESTCONF and HTTP2 and of how YANG notifications are encoded in XML and JSON, including specifics of call-home and heartbeat for subscriptions.
- The subscription and push mechanism for YANG datastores allowing subscriber applications to request updates from a YANG datastore.
- Definition of transport agnostic notification headers and of a mechanism for bundling multiple YANG notifications into a single message.

We are proposing with https://datatracker.ietf.org/doc/html/draft-ahuang-netconf-notif-yang to define the transport agnostic notification header as mentioned in the last line of section 5 of charter 19.

I believe this is also in line what is proposed in netmod with https://datatracker.ietf.org/meeting/120/materials/slides-120-netmod-9-rfc7950bis-and-friends-01.pdf. Separating the YANG definition with the encoding.

I agree that it is to early to obsolete RFC 5277, however I worry with new documents with new implementations referencing RFC 5277 that we can't make the transition.

Best wishes
Thomas

From: Andy Bierman <andy@yumaworks.com>
Sent: Wednesday, July 24, 2024 11:53 AM
To: Alex Huang Feng <alex.huang-feng@insa-lyon.fr>
Cc: Carsten Bormann <cabo@tzi.org>; draft-ietf-core-comi@ietf.org; core@ietf.org; Pierre Francois <pierre.francois@insa-lyon.fr>; Vivekananda Boudia <vivekananda.boudia@insa-lyon.fr>; Graf Thomas, INI-NET-VNC-HCS <Thomas.Graf@swisscom.com>; Benoit Claise <benoit.claise@huawei.com>
Subject: Re: [core] Coreconf Notifications


Be aware: This is an external email.




On Wed, Jul 24, 2024 at 11:25 AM Alex Huang Feng <alex.huang-feng@insa-lyon.fr<mailto:alex.huang-feng@insa-lyon.fr>> wrote:
Dear Carsten,

My apologies, checking again, you are right, tags are needed for RFC9254.

What I want to raise (and discuss) in this thread is NOT how the datetime specified in the leaf “eventTime” is encoded in CBOR.
I agree with Carsten that draft-bormann-cbor-yang-standin-00 can be used in draft-ahuang-netconf-notif-yang for better encoding the datetime.

As I said on the mic during the WG meeting, there is a gap on how YANG notifications are currently encoded in the different YANG encodings (XML, JSON, CBOR).
Having a common structure for such notifications is beneficial to YANG tooling (such as the integration of YANG into the Kafka Schema registry https://github.com/network-analytics/draft-daisy-kafka-yang-integration/blob/main/schema-registry-yangkit-integration-03.pdf)

What I am referring to as a structure is the metadata that needs to be present in the notification header.
The current understanding at NETCONF WG is that the notification header MUST have a eventTime leaf, as specified in RFC5277.
RFC5277 was dedicated to XML, but YANG notifications have been generalised with YANG-Push [RFC8641].


I have implemented notifications in XML, JSON, and CBOR with no problems adapting the XSD in RFC 5277.
The XSD describes an XML element but it is easy to construct this pattern in JSON or CBOR.

RFC 5277 is widely deployed and in constant use.
RFC 6241, 8639, 8641 and others have normative references to this RFC.
I am strongly opposed to declaring RFC 5277 obsolete.


Andy

The current understanding is that in XML, a notification is encoded as follows:

<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
    <eventTime>2007-07-08T00:04:00Z</eventTime>       <— eventTime present
    <event xmlns="http://example.com/event/1.0">
        <eventClass>fault</eventClass>
        <reportingEntity>
            <card>ATM1</card>
        </reportingEntity>
        <severity>minor</severity>
    </event>
</notification>

JSON as:

{
    "ietf-notification:notification": {
        "eventTime": "2023-02-10T08:00:11.22Z”,     <—eventTime present
        "yang-defining-notif:event": {
            "eventClass": "fault",
            "reportingEntity": {
                "card": "ATM1"
            },
            "severity": "minor"
        }
    }
}

And CBOR (diag-notation) I would expect:
{
    "ietf-notification:notification": {
        "eventTime": "2023-02-10T08:00:11.22Z”,    <— eventTime present
        "yang-defining-notif:event": {
            "eventClass": "fault",
            "reportingEntity": {
                "card": "ATM1"
            },
            "severity": "minor"
        }
    }
}

That is what we are trying to solve with https://datatracker.ietf.org/doc/html/draft-ahuang-netconf-notif-yang-05; having a common schema for all the YANG notifications and having a YANG module defining such structure.

That is why I was suggesting to the authors of draft-ietf-core-comi-18 to use this draft as reference rather than RFC5277 (as Thomas Graf was saying, RFC5277 is expected to be obsoleted)

On a second note, I’d be happy to hear any feedback from the CORE WG whether updating RFC9254 is the way to go to solve this issue with CBOR notifications in https://datatracker.ietf.org/doc/html/draft-ahuang-netconf-notif-yang-05.

Cheers,
Alex


On 20 Jul 2024, at 08:42, Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>> wrote:

Hi Alex

On 2024-07-20, at 00:37, Alex Huang Feng <alex.huang-feng@insa-lyon.fr<mailto:alex.huang-feng@insa-lyon.fr>> wrote:


Thanks for the pointers, will check out this draft. My text does not state that the timestamp needs to be encoded as text-encoded date-time.

I would expect that you would want to encode these using standard YANG means, and (without YANG-CBOR with stand-in tags) that would be the RFC 3339 date-times used in RFC 6991.
(Which resolution do you need in practice for eventtime, by the way?)



Are you suggesting that the draft should state the usage of tags for date-times? For implementations that does not support tags, isn’t it contra-productive?

You cannot do YANG-CBOR without CBOR tags, so I don’t think there is an actual problem.

By the way, you may want to look at the CoRE telemetry spec [1].
This is six years old (we just didn’t have the RFCs in place for YANG-CBOR and YANG SID at the time, so the draft was a bit premature), but it solves many of the problems being discussed right now.
(Henk will be at the Hackathon, so please talk to him about that.)

Grüße, Carsten

[1]: https://datatracker.ietf.org/doc/html/draft-birkholz-yang-core-telemetry-01