Skip to content

Commit dbc609e

Browse files
committed
Firmed up error handling and YANG-library to MUST-requirements. Fixed typos and some formatting.
1 parent 04add34 commit dbc609e

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

draft-ietf-netconf-restconf-trace-ctx-headers.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ docname: draft-ietf-netconf-restconf-trace-ctx-headers-latest
33
title: RESTCONF Extension to support Trace Context Headers
44
abbrev: rc_trace
55
category: std
6-
date: 2024-06-27
6+
date: 2024-07-08
77

88
ipr: trust200902
99
submissiontype: IETF
@@ -55,7 +55,7 @@ normative:
5555
RFC8446:
5656
RFC8525:
5757

58-
I-D.draft-rogaglia-netconf-trace-ctx-extension-03:
58+
I-D.draft-ietf-netconf-trace-ctx-extension-01:
5959

6060
W3C-Trace-Context:
6161
title: W3C Recommendation on Trace Context
@@ -74,47 +74,47 @@ This document extends the RESTCONF protocol in order to support trace context pr
7474
Network automation and management systems commonly consist of multiple
7575
sub-systems and together with the network devices they manage, they effectively form a distributed system. Distributed tracing is a methodology implemented by tracing tools to follow, analyze and debug operations, such as configuration transactions, across multiple distributed systems. An operation is uniquely identified by a trace-id and through a trace context, carries some metadata about the operation. Propagating this "trace context" between systems enables forming a coherent view of the entire operation as carried out by all involved systems.
7676

77-
The W3C has defined two HTTP headers (traceparent and tracestate) for context propagation that are useful for distributed systems like the ones defined in {{?RFC8309}}. The goal of this document is to adopt this W3C specification for the RESTCONF protocol.
77+
The W3C has defined two HTTP headers (_traceparent_ and _tracestate_) for context propagation that are useful for distributed systems like the ones defined in {{?RFC8309}}. The goal of this document is to adopt this W3C specification for the RESTCONF protocol.
7878

7979
This document does not define new HTTP extensions but makes those defined in {{W3C-Trace-Context}} optional headers for the RESTCONF protocol.
8080

81-
In {{I-D.draft-rogaglia-netconf-trace-ctx-extension-03}}, the NETCONF protocol extension is defined and we will re-use several of the YANG and XML objects defined in that document for RESTCONF. Please refer to that document for additional context and example applications.
81+
In {{I-D.draft-ietf-netconf-trace-ctx-extension-01}}, the NETCONF protocol extension is defined and we will re-use several of the YANG and XML objects defined in that document for RESTCONF. Please refer to that document for additional context and example applications.
8282

8383
## Terminology
8484

8585
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT","SHOULD","SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 {{RFC2119}} {{RFC8174}} when, and only when, they appear in all capitals, as shown here.
8686

8787
# RESTCONF Extensions
8888

89-
A RESTCONF server SHOULD support trace context traceparent header as defined in {{W3C-Trace-Context}}.
89+
A RESTCONF server MUST support the trace context _traceparent_ header as defined in {{W3C-Trace-Context}}.
9090

91-
A RESTCONF server SHOULD support trace context tracestate header as defined in {{W3C-Trace-Context}}.
91+
A RESTCONF server SHOULD support the trace context _tracestate_ header as defined in {{W3C-Trace-Context}}.
9292

9393
## Error Handling
9494

95-
The RESTCONF server SHOULD follow the "Processing Model for Working with Trace Context" as specified in {{W3C-Trace-Context}}.
95+
The RESTCONF server SHOULD follow the "Processing Model for Working with Trace Context" as specified in {{W3C-Trace-Context}}. Based on this processing model, it is NOT RECOMMENDED to reject an RPC because of the trace context header values.
9696

97-
If the server rejects the RPC because of the trace context headers, the server MAY return an rpc-error with the following values:
97+
If the server still decides to reject the RPC because of the trace context header values, the server MUST return a RESTCONF rpc-error with the following values:
9898

9999
error-tag: operation-failed
100100
error-type: protocol
101101
error-severity: error
102102

103-
Additionally, the error-info tag SHOULD contain a relevant details about the error.
104-
105-
Finally, the sx:structure defined in {{I-D.draft-rogaglia-netconf-trace-ctx-extension-03}} SHOULD be present in any error message from the server.
103+
Additionally, the error-info tag MUST contain relevant details about the error in the form of an sx:structure otlp-trace-context-error-info defined in ietf-netconf-otlp-context.yang from {{I-D.draft-ietf-netconf-trace-ctx-extension-01}}.
106104

107105
## Trace Context header versionning
108106

109-
This extension refers to the {{W3C-Trace-Context}} trace context capability. The W3C traceparent and trace-state headers include the notion of versions. It would be desirable for a RESTCONF client to be able to discover the one or multiple versions of these headers supported by a server. We would like to achieve this goal avoiding the definition of new RESTCONF capabilities for each headers' version.
107+
This extension refers to the {{W3C-Trace-Context}} trace context capability. The W3C _traceparent_ and _tracestate_ headers include the notion of versions. It would be desirable for a RESTCONF client to be able to discover the one or multiple versions of these headers supported by a server. We would like to achieve this goal avoiding the definition of new RESTCONF capabilities for each headers' version.
110108

111-
{{I-D.draft-rogaglia-netconf-trace-ctx-extension-03}} defines a pair of YANG modules that SHOULD be included in the YANG library per {{RFC8525}} of the RESTCONF server supporting the RESTCONF Trace Context extension that will refer to the headers' supported versions. Future updates of this document could include additional YANG modules for new headers' versions.
109+
{{I-D.draft-ietf-netconf-trace-ctx-extension-01}} defines a pair of YANG modules that MUST be included in the YANG library per {{RFC8525}} of the RESTCONF server supporting the RESTCONF Trace Context extension that will refer to the headers' supported versions. Future updates of this document could include additional YANG modules for new headers' versions.
112110

113111
# Security Considerations
114112

115-
There are no YANG modules specified in this document, even though the functionality described herein relates to the network management protocol RESTCONF [RFC8040]. This is because the only functionality described are additional HTTP headers, and those cannot be described using YANG. There are still some security considerations worth mentioning, however.
113+
There are two YANG modules specified in this document. These modules are completely empty, and therefore have very limited security considerations. Their purpose is only to indicate which trace context header versions the server supports using YANG Library {{RFC8525}}.
114+
115+
Even though both YANG modules are empty, there are still some security considerations worth mentioning, however. This is because the functionality described in this document is in the form of additional HTTP headers (which cannot be described using YANG) relating to the network management protocol RESTCONF [RFC8040].
116116

117-
The traceparent and tracestate headers make it easier to track the flow of requests and their downstream effect on other systems. This is indeed the whole point with these headers. This knowledge could also be of use to bad actors that are working to build a map of the managed network.
117+
The _traceparent_ and _tracestate_ headers make it easier to track the flow of requests and their downstream effect on other systems. This is indeed the whole point with these headers. This knowledge could also be of use to bad actors that are working to build a map of the managed network.
118118

119119
All advice mentioned in the {{W3C-Trace-Context}} under the Privacy Considerations and Security Considerations also apply to this document.
120120

@@ -168,9 +168,9 @@ If the resource is created, the server might respond as follows:
168168

169169
## Unsuccessful creation New Data Resources (from section B.2.1 in {{RFC8040}})
170170

171-
{{W3C-Trace-Context}} specifies that vendor MAY validate the tracestate header and that invalid headers MAY be discarded. In the section about [Error handling](#error-handling), it is stated that servers MAY return an error. Let's assume that is our implementation.
171+
{{W3C-Trace-Context}} specifies that vendor MAY validate the _tracestate_ header and that invalid headers MAY be discarded. In the section about [Error handling](#error-handling), it is stated that servers MAY return an error. Let's assume that is our implementation.
172172

173-
Example of a badly formated tracestate header using {{RFC8040}} example B.2.1, which by following :
173+
Example of a badly formated _tracestate_ header using {{RFC8040}} example B.2.1, which by following :
174174

175175
POST /restconf/data/example-jukebox:jukebox/library HTTP/1.1
176176
Host: example.com
@@ -222,6 +222,7 @@ And the expected error message:
222222
- Added links to latest document on github
223223
- Added RESTCONF example for success and error
224224
- Modified Error Handling to reflect better W3C alignment based on implementation feedback
225+
- Firmed up error handling and YANG-library to MUST-requirements
225226

226227
## From version 00 to draft-ietf-netconf-restconf-trace-ctx-headers-00
227228
- Adopted by NETCONF WG

0 commit comments

Comments
 (0)