Debian Codegraph @

rfc5539.html

raw
1 <pre>Network Working Group M. Badra
2 Request for Comments: 5539 CNRS/LIMOS Laboratory
3 Category: Standards Track May 2009
4
5
6 <span class="h1">NETCONF over Transport Layer Security (TLS)</span>
7
8 Status of This Memo
9
10 This document specifies an Internet standards track protocol for the
11 Internet community, and requests discussion and suggestions for
12 improvements. Please refer to the current edition of the "Internet
13 Official Protocol Standards" (STD 1) for the standardization state
14 and status of this protocol. Distribution of this memo is unlimited.
15
16 Copyright Notice
17
18 Copyright (c) 2009 IETF Trust and the persons identified as the
19 document authors. All rights reserved.
20
21 This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
22 Provisions Relating to IETF Documents in effect on the date of
23 publication of this document (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>).
24 Please review these documents carefully, as they describe your rights
25 and restrictions with respect to this document.
26
27 This document may contain material from IETF Documents or IETF
28 Contributions published or made publicly available before November
29 10, 2008. The person(s) controlling the copyright in some of this
30 material may not have granted the IETF Trust the right to allow
31 modifications of such material outside the IETF Standards Process.
32 Without obtaining an adequate license from the person(s) controlling
33 the copyright in such materials, this document may not be modified
34 outside the IETF Standards Process, and derivative works of it may
35 not be created outside the IETF Standards Process, except to format
36 it for publication as an RFC or to translate it into languages other
37 than English.
38
39 Abstract
40
41 The Network Configuration Protocol (NETCONF) provides mechanisms to
42 install, manipulate, and delete the configuration of network devices.
43 This document describes how to use the Transport Layer Security (TLS)
44 protocol to secure NETCONF exchanges.
45
46
47
48
49
50
51
52 <span class="grey">Badra Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
55
56
57 Table of Contents
58
59 <a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
60 <a href="#section-1.1">1.1</a>. Conventions Used in This Document . . . . . . . . . . . . . <a href="#page-2">2</a>
61 <a href="#section-2">2</a>. NETCONF over TLS . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
62 <a href="#section-2.1">2.1</a>. Connection Initiation . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
63 <a href="#section-2.2">2.2</a>. Connection Closure . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
64 <a href="#section-3">3</a>. Endpoint Authentication and Identification . . . . . . . . . . <a href="#page-4">4</a>
65 <a href="#section-3.1">3.1</a>. Server Identity . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
66 <a href="#section-3.2">3.2</a>. Client Identity . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
67 <a href="#section-4">4</a>. Security Considerations . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
68 <a href="#section-5">5</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
69 <a href="#section-6">6</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
70 <a href="#section-7">7</a>. Contributor's Address . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
71 <a href="#section-8">8</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
72 <a href="#section-8.1">8.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
73 <a href="#section-8.2">8.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
74
75 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
76
77 The NETCONF protocol [<a href="./rfc4741" title="&quot;NETCONF Configuration Protocol&quot;">RFC4741</a>] defines a mechanism through which a
78 network device can be managed. NETCONF is connection-oriented,
79 requiring a persistent connection between peers. This connection
80 must provide integrity, confidentiality, peer authentication, and
81 reliable, sequenced data delivery.
82
83 This document defines "NETCONF over TLS", which includes support for
84 certificate-based mutual authentication and key derivation, utilizing
85 the protected ciphersuite negotiation, mutual authentication, and key
86 management capabilities of the TLS (Transport Layer Security)
87 protocol, described in [<a href="./rfc5246" title="&quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;">RFC5246</a>].
88
89 Throughout this document, the terms "client" and "server" are used to
90 refer to the two ends of the TLS connection. The client actively
91 opens the TLS connection, and the server passively listens for the
92 incoming TLS connection. The terms "manager" and "agent" are used to
93 refer to the two ends of the NETCONF protocol session. The manager
94 issues NETCONF remote procedure call (RPC) commands, and the agent
95 replies to those commands. When NETCONF is run over TLS using the
96 mapping defined in this document, the client is always the manager,
97 and the server is always the agent.
98
99 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Conventions Used in This Document</span>
100
101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
103 document are to be interpreted as described in [<a href="./rfc2119" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">RFC2119</a>].
104
105
106
107
108 <span class="grey">Badra Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
111
112
113 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. NETCONF over TLS</span>
114
115 Since TLS is application-protocol-independent, NETCONF can operate on
116 top of the TLS protocol transparently. This document defines how
117 NETCONF can be used within a TLS session.
118
119 <span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Connection Initiation</span>
120
121 The peer acting as the NETCONF manager MUST also act as the TLS
122 client. It MUST connect to the server that passively listens for the
123 incoming TLS connection on the TCP port 6513. It MUST therefore send
124 the TLS ClientHello message to begin the TLS handshake. Once the TLS
125 handshake has finished, the client and the server MAY begin to
126 exchange NETCONF data. In particular, the client will send complete
127 XML documents to the server containing &lt;rpc&gt; elements, and the server
128 will respond with complete XML documents containing &lt;rpc-reply&gt;
129 elements. The client MAY indicate interest in receiving event
130 notifications from a server by creating a subscription to receive
131 event notifications [<a href="./rfc5277" title="&quot;NETCONF Event Notifications&quot;">RFC5277</a>]. In this case, the server replies to
132 indicate whether the subscription request was successful and, if it
133 was successful, the server begins sending the event notifications to
134 the client as the events occur within the system.
135
136 All NETCONF messages MUST be sent as TLS "application data". It is
137 possible that multiple NETCONF messages be contained in one TLS
138 record, or that a NETCONF message be transferred in multiple TLS
139 records.
140
141 This document uses the same delimiter sequence ("]]&gt;]]&gt;") defined in
142 [<a href="./rfc4742" title="&quot;Using the NETCONF Configuration Protocol over Secure SHell (SSH)&quot;">RFC4742</a>], which MUST be sent by both the client and the server after
143 each XML document in the NETCONF exchange. Since this character
144 sequence can legally appear in plain XML in attribute values,
145 comments, and processing instructions, implementations of this
146 document MUST ensure that this character sequence is never part of a
147 NETCONF message.
148
149 Implementation of the protocol specified in this document MAY
150 implement any TLS cipher suite that provides certificate-based mutual
151 authentication [<a href="./rfc5246" title="&quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;">RFC5246</a>]. The server MUST support certificate-based
152 client authentication.
153
154 Implementations MUST support TLS 1.2 [<a href="./rfc5246" title="&quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;">RFC5246</a>] and are REQUIRED to
155 support the mandatory-to-implement cipher suite, which is
156 TLS_RSA_WITH_AES_128_CBC_SHA. This document is assumed to apply to
157 future versions of TLS; in which case, the mandatory-to-implement
158 cipher suite for the implemented version MUST be supported.
159
160
161
162
163
164 <span class="grey">Badra Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
167
168
169 <span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Connection Closure</span>
170
171 A TLS client (NETCONF manager) MUST close the associated TLS
172 connection if the connection is not expected to issue any NETCONF RPC
173 commands later. It MUST send a TLS close_notify alert before closing
174 the connection. The TLS client MAY choose to not wait for the TLS
175 server (NETCONF agent) close_notify alert and simply close the
176 connection, thus generating an incomplete close on the TLS server
177 side. Once the TLS server gets a close_notify from the TLS client,
178 it MUST reply with a close_notify unless it becomes aware that the
179 connection has already been closed by the TLS client (e.g., the
180 closure was indicated by TCP).
181
182 When no data is received from a connection for a long time (where the
183 application decides what "long" means), a NETCONF peer MAY close the
184 connection. The NETCONF peer MUST attempt to initiate an exchange of
185 close_notify alerts with the other NETCONF peer before closing the
186 connection. The close_notify's sender that is unprepared to receive
187 any more data MAY close the connection after sending the close_notify
188 alert, thus generating an incomplete close on the close_notify's
189 receiver side.
190
191 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Endpoint Authentication and Identification</span>
192
193 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Server Identity</span>
194
195 During the TLS negotiation, the client MUST carefully examine the
196 certificate presented by the server to determine if it meets the
197 client's expectations. Particularly, the client MUST check its
198 understanding of the server hostname against the server's identity as
199 presented in the server Certificate message, in order to prevent man-
200 in-the-middle attacks.
201
202 Matching is performed according to the rules below (following the
203 example of [<a href="./rfc4642" title="&quot;Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)&quot;">RFC4642</a>]):
204
205 o The client MUST use the server hostname it used to open the
206 connection (or the hostname specified in the TLS "server_name"
207 extension [<a href="./rfc5246" title="&quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;">RFC5246</a>]) as the value to compare against the server
208 name as expressed in the server certificate. The client MUST NOT
209 use any form of the server hostname derived from an insecure
210 remote source (e.g., insecure DNS lookup). CNAME canonicalization
211 is not done.
212
213 o If a subjectAltName extension of type dNSName is present in the
214 certificate, it MUST be used as the source of the server's
215 identity.
216
217
218
219
220 <span class="grey">Badra Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
223
224
225 o Matching is case-insensitive.
226
227 o A "*" wildcard character MAY be used as the leftmost name
228 component in the certificate. For example, *.example.com would
229 match a.example.com, foo.example.com, etc., but would not match
230 example.com.
231
232 o If the certificate contains multiple names (e.g., more than one
233 dNSName field), then a match with any one of the fields is
234 considered acceptable.
235
236 If the match fails, the client MUST either ask for explicit user
237 confirmation or terminate the connection and indicate the server's
238 identity is suspect.
239
240 Additionally, clients MUST verify the binding between the identity of
241 the servers to which they connect and the public keys presented by
242 those servers. Clients SHOULD implement the algorithm in <a href="./rfc5280#section-6">Section&nbsp;6
243 of [RFC5280]</a> for general certificate validation, but MAY supplement
244 that algorithm with other validation methods that achieve equivalent
245 levels of verification (such as comparing the server certificate
246 against a local store of already-verified certificates and identity
247 bindings).
248
249 If the client has external information as to the expected identity of
250 the server, the hostname check MAY be omitted.
251
252 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Client Identity</span>
253
254 The server MUST verify the identity of the client with certificate-
255 based authentication according to local policy to ensure that the
256 incoming client request is legitimate before any configuration or
257 state data is sent to or received from the client.
258
259 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
260
261 The security considerations described throughout [<a href="./rfc5246" title="&quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;">RFC5246</a>] and
262 [<a href="./rfc4741" title="&quot;NETCONF Configuration Protocol&quot;">RFC4741</a>] apply here as well.
263
264 This document in its current version does not support third-party
265 authentication (e.g., backend Authentication, Authorization, and
266 Accounting (AAA) servers) due to the fact that TLS does not specify
267 this way of authentication and that NETCONF depends on the transport
268 protocol for the authentication service. If third-party
269 authentication is needed, BEEP or SSH transport can be used.
270
271
272
273
274
275
276 <span class="grey">Badra Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
279
280
281 An attacker might be able to inject arbitrary NETCONF messages via
282 some application that does not carefully check exchanged messages or
283 deliberately insert the delimiter sequence in a NETCONF message to
284 create a DoS attack. Hence, applications and NETCONF APIs MUST
285 ensure that the delimiter sequence defined in <a href="#section-2.1">Section 2.1</a> never
286 appears in NETCONF messages; otherwise, those messages can be
287 dropped, garbled, or misinterpreted. If the delimiter sequence is
288 found in a NETCONF message by the sender side, a robust
289 implementation of this document should warn the user that illegal
290 characters have been discovered. If the delimiter sequence is found
291 in a NETCONF message by the receiver side (including any XML
292 attribute values, XML comments, or processing instructions), a robust
293 implementation of this document must silently discard the message
294 without further processing and then stop the NETCONF session.
295
296 Finally, this document does not introduce any new security
297 considerations compared to [<a href="./rfc4742" title="&quot;Using the NETCONF Configuration Protocol over Secure SHell (SSH)&quot;">RFC4742</a>].
298
299 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
300
301 IANA has assigned a TCP port number (6513) in the "Registered Port
302 Numbers" range with the name "netconf-tls". This port will be the
303 default port for NETCONF over TLS, as defined in this document.
304
305 Registration Contact: Mohamad Badra, [email protected].
306 Transport Protocol: TCP.
307 Port Number: 6513
308 Broadcast, Multicast or Anycast: No.
309 Port Name: netconf-tls.
310 Service Name: netconf.
311 Reference: <a href="./rfc5539">RFC 5539</a>
312
313 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Acknowledgements</span>
314
315 A significant amount of the text in <a href="#section-3">Section 3</a> was lifted from
316 [<a href="./rfc4642" title="&quot;Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)&quot;">RFC4642</a>].
317
318 The author would like to acknowledge David Harrington, Miao Fuyou,
319 Eric Rescorla, Juergen Schoenwaelder, Simon Josefsson, Olivier
320 Coupelon, Alfred Hoenes, and the NETCONF mailing list members for
321 their comments on the document. The author also appreciates Bert
322 Wijnen, Mehmet Ersue, and Dan Romascanu for their efforts on issues
323 resolving discussion; and Charlie Kaufman, Pasi Eronen, and Tim Polk
324 for the thorough review of this document.
325
326
327
328
329
330
331
332 <span class="grey">Badra Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
335
336
337 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Contributor's Address</span>
338
339 Ibrahim Hajjeh
340 Ineovation
341 France
342
343 EMail: [email protected]
344
345 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
346
347 <span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
348
349 [<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
350 Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
351
352 [<a id="ref-RFC4741">RFC4741</a>] Enns, R., "NETCONF Configuration Protocol", <a href="./rfc4741">RFC 4741</a>,
353 December 2006.
354
355 [<a id="ref-RFC4742">RFC4742</a>] Wasserman, M. and T. Goddard, "Using the NETCONF
356 Configuration Protocol over Secure SHell (SSH)", <a href="./rfc4742">RFC 4742</a>,
357 December 2006.
358
359 [<a id="ref-RFC5246">RFC5246</a>] Dierks, T. and E. Rescorla, "The Transport Layer Security
360 (TLS) Protocol Version 1.2", <a href="./rfc5246">RFC 5246</a>, August 2008.
361
362 [<a id="ref-RFC5280">RFC5280</a>] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
363 Housley, R., and W. Polk, "Internet X.509 Public Key
364 Infrastructure Certificate and Certificate Revocation List
365 (CRL) Profile", <a href="./rfc5280">RFC 5280</a>, May 2008.
366
367 <span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
368
369 [<a id="ref-RFC4642">RFC4642</a>] Murchison, K., Vinocur, J., and C. Newman, "Using
370 Transport Layer Security (TLS) with Network News Transfer
371 Protocol (NNTP)", <a href="./rfc4642">RFC 4642</a>, October 2006.
372
373 [<a id="ref-RFC5277">RFC5277</a>] Chisholm, S. and H. Trevino, "NETCONF Event
374 Notifications", <a href="./rfc5277">RFC 5277</a>, July 2008.
375
376 Author's Address
377
378 Mohamad Badra
379 CNRS/LIMOS Laboratory
380 Campus de cezeaux, Bat. ISIMA
381 Aubiere 63170
382 France
383
384 EMail: [email protected]
385
386
387
388 Badra Standards Track [Page 7]
389 </pre>