Skip to content

Commit

Permalink
Define the YANG module for the annotation enclosing method
Browse files Browse the repository at this point in the history
  • Loading branch information
dr2lopez committed Jul 6, 2024
1 parent c041208 commit 5df6d42
Showing 1 changed file with 66 additions and 5 deletions.
71 changes: 66 additions & 5 deletions draft-lopez-opsawg-yang-provenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ The specific YANG content to be processed SHALL be generated by taking the conte

### YANG Module

This module defines the provenance signature element to be included as metadata of a YANG data instance.

TBD: YANG module derived from {{RFC9195}}, named "ietf-yang-instance-data-provenance"

## Including Provenance in YANG Annotations
Expand All @@ -451,7 +453,66 @@ The specific YANG content to be processed SHALL be generated by eliminating the

### YANG Module

TBD: YANG module based on {{RFC7952}}, named "yang-provenance-metadata"
This module defines a metadata annotation to include a provenance signature for a YANG element.

~~~
<CODE BEGINS> file "ietf-provenance-annotation@2024-06-30.yang"
module yang-provenance-metadata {
yang-version 1.1;
namespace "http://telefonica.com/temporary-ns-yangpmd";
prefix "ypmd";
import ietf-yang-types {
prefix "yang";
}
import ietf-yang-metadata {
prefix "md";
}
organization "IETF OPSAWG (Operations and Management Area Working Group)";
contact
"WG Web: <https://datatracker.ietf.org/wg/opsawg/>
WG List: <mailto:opsawg@ietf.org>
Authors: Diego Lopez
<mailto:diego.r.lopez@telefonica.com>
Alex Huang Feng
<mailto:alex.huang-feng@insa-lyon.fr>
Antonio Pastor
<mailto:antonio.pastorperales@telefonica.com>
Henk Birkholz
<mailto:henk.birkholz@sit.fraunhofer.de>";
description
"Defines a binary provenance-signature type to be used in YANG
metadata annotations
Copyright (c) 2024 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, is permitted pursuant to, and subject to the license
terms contained in, the Revised BSD License set forth in Section
4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see the RFC
itself for full legal notices.";

revision 2024-02-28 {
description
"First revision";
reference
"RFC XXXX: Applying COSE Signatures for YANG Data Provenance";
}
md:annotation provenance-string {
type yang:provenance-signature;
description
"This annotation contains the provenance signature for
the YANG element associated with it";
}
}
<CODE ENDS>
~~~

TBD: Provide a final URL for the "ypmd" prefix.


# Security Considerations
Expand Down Expand Up @@ -628,17 +689,17 @@ The second enclosing method would translate into a notification including the "n
</notification>
~~~

The third enclosing method, applicable if the instance is to be stored in a YANG instance data file by adding the corresponding metadata, would produce a results as shown below:
The third enclosing method, applicable if the instance is to be stored as YANG instance data at rest, by adding the corresponding metadata, would produce a results as shown below:

TBD: Provide a sample of how to deal with instance data files when the reference implementation is ready.
TBD: Provide a sample of how to deal with instance data at rest when the reference implementation is ready.

Finally, using the fourth enclosing method, the YANG instance would incorporate the corresponding provenance metadata as an annotation:

~~~
<?xml version="1.0" encoding="UTF-8"?>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"
xmlns:pv="http://telefonica.com/temporary-ns-yang"
pv:provenance-string=
xmlns:ypmd="http://telefonica.com/temporary-ns-yangpmd"
ypmd:provenance-string=
"0oRRowNjeG1sBGdlYzIua2V5ASag9lhAzen3Bm9AZoyXuetpoTB70SzZqKVxeuOMW099sm+NXSqCfnqBKfXeuqDNEkuEr+E0XiAso986fbAHQCHbAJMOhw==">
<interface>
<name>GigabitEthernet1</name>
Expand Down

0 comments on commit 5df6d42

Please sign in to comment.