1 NETCONF Working Group Mohamad Badra
2 Internet Draft LIMOS Laboratory
3 Intended status: Standards Track May 27, 2008
8 NETCONF over Transport Layer Security (TLS)
9 draft-ietf-netconf-tls-02.txt
14 By submitting this Internet-Draft, each author represents that any
15 applicable patent or other IPR claims of which he or she is aware
16 have been or will be disclosed, and any of which he or she becomes
17 aware will be disclosed, in accordance with Section 6 of BCP 79.
19 Internet-Drafts are working documents of the Internet Engineering
20 Task Force (IETF), its areas, and its working groups. Note that
21 other groups may also distribute working documents as Internet-
24 Internet-Drafts are draft documents valid for a maximum of six months
25 and may be updated, replaced, or obsoleted by other documents at any
26 time. It is inappropriate to use Internet-Drafts as reference
27 material or to cite them other than as "work in progress."
29 The list of current Internet-Drafts can be accessed at
30 http://www.ietf.org/ietf/1id-abstracts.txt
32 The list of Internet-Draft Shadow Directories can be accessed at
33 http://www.ietf.org/shadow.html
35 This Internet-Draft will expire on November 27, 2008.
39 Copyright (C) The IETF Trust (2008).
43 The Network Configuration Protocol (NETCONF) provides mechanisms to
44 install, manipulate, and delete the configuration of network devices.
45 This document describes how to use the Transport Layer Protocol (TLS)
46 to secure NETCONF exchanges.
52 Badra Expires November 27, 2008 [Page 1]
54 Internet-Draft NETCONF over TLS May 2008
60 1. Introduction...................................................3
61 1.1. Conventions used in this document.........................3
62 2. NETCONF over TLS...............................................3
63 2.1. Connection Initiation.....................................3
64 2.2. Connection Closure........................................4
65 3. Endpoint Authentication and Identification.....................4
66 3.1. Server Identity...........................................5
67 3.2. Client Identity...........................................6
68 3.3. Password-Based Authentication.............................6
69 4. Cipher Suite Requirements......................................7
70 5. Security Considerations........................................7
71 6. IANA Considerations............................................7
72 7. Acknowledgments................................................8
73 A. Appendix - Test Vectors for the PSK Derivation Function........9
74 B. Appendix - Enabling Third Party Authentication using Passwords10
75 B.1. Working Group discussion at the 71st IETF meeting........12
76 Normative References.............................................13
77 Authors' Addresses...............................................14
78 Intellectual Property and Copyright Statements...................14
106 Badra Expires November 27, 2008 [Page 2]
108 Internet-Draft NETCONF over TLS May 2008
112 The NETCONF protocol [RFC4741] defines a simple mechanism through
113 which a network device can be managed. NETCONF is connection-
114 oriented, requiring a persistent connection between peers. This
115 connection must provide reliable, sequenced data delivery, integrity
116 and confidentiality and peers authentication. This document
117 describes how to use TLS [RFC4346] to secure NETCONF connections.
119 Throughout this document, the terms "client" and "server" are used to
120 refer to the two ends of the TLS connection. The client actively
121 opens the TLS connection, and the server passively listens for the
122 incoming TLS connection. The terms "manager" and "agent" are used to
123 refer to the two ends of the NETCONF protocol session. The manager
124 issues NETCONF remote procedure call (RPC) commands, and the agent
125 replies to those commands. When NETCONF is run over TLS using the
126 mapping defined in this document, the client is always the manager,
127 and the server is always the agent.
129 1.1. Conventions used in this document
131 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
132 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
133 document are to be interpreted as described in RFC-2119 [RFC2119].
137 Since TLS is application protocol-independent, NETCONF can operate on
138 top of the TLS protocol transparently. This document defines how
139 NETCONF can be used within a Transport Layer Security (TLS) session.
141 2.1. Connection Initiation
143 The peer acting as the NETCONF manager MUST also act as the TLS
144 client. It MUST connect to the server that passively listens for the
145 incoming TLS connection on the IANA-to-be-assigned TCP port <TBA>.
146 It MUST therefore send the TLS ClientHello to begin the TLS
147 handshake. Once the TLS handshake has been finished, the client and
148 the server MAY then send their NETCONF exchanges. In particular, the
149 client will send complete XML documents to the server containing
150 <rpc> elements, and the server will respond with complete XML
151 documents containing <rpc-reply> elements. The client MAY indicate
152 interest in receiving event notifications from a NETCONF server by
153 creating a subscription to receive event notifications [I-D.ietf--
154 netconf-notification], in which the NETCONF server replies to
155 indicate whether the subscription request was successful and, if it
156 was successful, begins sending the event notifications to the NETCONF
157 client as the events occur within the system. All these elements are
160 Badra Expires November 27, 2008 [Page 3]
162 Internet-Draft NETCONF over TLS May 2008
165 encapsulated into TLS records of type "application data". These
166 records are protected using the TLS material keys.
168 Current NETCONF messages don't include a message's length. This
169 document uses consequently the same delimiter sequence defined in
170 [RFC4742] and therefore the special character sequence, ]]>]]>, to
171 delimit XML documents.
173 2.2. Connection Closure
175 Either NETCONF peer MAY stop the NETCONF connection at any time and
176 therefore notify the other NETCONF peer that no more data on this
177 channel will be sent and that any data received after a closure
178 request will be ignored. This MAY happen when no data is received
179 from a connection for a long time, where the application decides what
182 TLS has the ability for secure connection closure using the Alert
183 protocol. When the NETCONF peer closes the NETCONF connection, it
184 MUST send a TLS close_notify alert before closing the TCP connection.
185 Any data received after a closure alert is ignored.
187 Unless a fatal error has occurred, each party is required to send a
188 close_notify alert before closing the write side of the connection
189 [RFC4346]. The other party MUST respond with a close_notify alert of
190 its own and close down the connection immediately, discarding any
191 pending writes. It is not required for the initiator of the close to
192 wait for the responding close_notify alert before closing the read
193 side of the connection.
195 3. Endpoint Authentication and Identification
197 NETCONF requires that its transport provide mutual authentication of
198 client and server, so cipher suites that are anonymous or which only
199 authenticate the server to the client MUST NOT be used with NETCONF.
200 This document specifies how to use TLS with endpoint authentication,
201 which can be based on either preshared keys [RFC4279] or public key
202 certificates [RFC4346]. Some cipher suites (e.g.
203 TLS_RSA_PSK_WITH_AES_128_CBC_SHA) use both. Section 3.1 describes
204 how the client authenticates the server if public key certificates
205 are provided by the server, section 3.2 describes how the server
206 authenticates the client if public key certificates are provided by
207 the client, and section 3.3 describes how the client and server
208 mutually authenticate one another using a password.
214 Badra Expires November 27, 2008 [Page 4]
216 Internet-Draft NETCONF over TLS May 2008
221 During the TLS negotiation, the client MUST carefully examine the
222 certificate presented by the server to determine if it meets their
223 expectations. Particularly, the client MUST check its understanding
224 of the server hostname against the server's identity as presented in
225 the server Certificate message, in order to prevent man-in-the-middle
228 Matching is performed according to these rules [RFC4642]:
230 - The client MUST use the server hostname it used to open the
231 connection (or the hostname specified in TLS "server_name"
232 extension [RFC4366]) as the value to compare against the server
233 name as expressed in the server certificate. The client MUST
234 NOT use any form of the server hostname derived from an
235 insecure remote source (e.g., insecure DNS lookup). CNAME
236 canonicalization is not done.
238 - If a subjectAltName extension of type dNSName is present in the
239 certificate, it MUST be used as the source of the server's
242 - Matching is case-insensitive.
244 - A "*" wildcard character MAY be used as the left-most name
245 component in the certificate. For example, *.example.com would
246 match a.example.com, foo.example.com, etc., but would not match
249 - If the certificate contains multiple names (e.g., more than one
250 dNSName field), then a match with any one of the fields is
251 considered acceptable.
253 If the match fails, the client MUST either ask for explicit user
254 confirmation or terminate the connection and indicate the server's
257 Additionally, clients MUST verify the binding between the identity of
258 the servers to which they connect and the public keys presented by
259 those servers. Clients SHOULD implement the algorithm in Section 6
260 of [RFC5280] for general certificate validation, but MAY supplement
261 that algorithm with other validation methods that achieve equivalent
262 levels of verification (such as comparing the server certificate
263 against a local store of already-verified certificates and identity
268 Badra Expires November 27, 2008 [Page 5]
270 Internet-Draft NETCONF over TLS May 2008
273 If the client has external information as to the expected identity of
274 the server, the hostname check MAY be omitted.
278 Typically, the server has no external knowledge of what the client's
279 identity ought to be and so checks (other than that the client has a
280 certificate chain rooted in an appropriate CA) are not possible. If
281 a server has such knowledge (typically from some source external to
282 NETCONF or TLS) it MUST check the identity as described above.
284 3.3. Password-Based Authentication
286 [RFC4279] supports authentication based on pre-shared keys (PSKs).
287 These pre-shared keys are symmetric keys, shared in advance among the
288 communicating parties.
290 The PSK can be generated in many ways and its length is variable.
291 Implementation of this document MAY rely on [RFC4279] to enable
292 password based user authentication. In this case, the password is
293 used to generate the PSK. It is RECOMMENDED that implementations
294 that allow the administrator to manually configure the password also
295 provide functionality for generating a new random password, taking
296 [RFC4086] into account.
298 This document generates the PSK from the password as follow:
300 PSK = SHA-1(SHA-1(psk_identity + "Key Pad for Netconf" + password) +
303 Where + means concatenation.
305 The label "Key Pad for Netconf" is an ASCII string.
307 The psk_identity_hint is initially defined in section 5.1 of
308 [RFC4279]. The psk_identity_hint can do double duty and also provide
309 a form of server authentication in the case where the user has the
310 same password on a number of NETCONF servers. If a hint is provided,
311 the psk_identity_hint is encoded in the same way as in [RFC4279] and
312 should be a string representation of the name of the server
313 recognizable to the administrator or his software. In the case where
314 the user types a server name to connect to, it should be that string.
315 If the string the user enters differs from the one returned as
316 psk_identity_hint, the software could display the server's name and
317 ask the user to confirm. For automated scripts, the names could be
318 expected to match. It is highly recommended that implementations set
322 Badra Expires November 27, 2008 [Page 6]
324 Internet-Draft NETCONF over TLS May 2008
327 the psk_identity_hint to the DNS name of the NETCONF server (i.e.,
330 It is RECOMMENDED that users choose different passwords for the
331 different servers they manage.
333 Note 1: The NETCONF over TLS implementation need not store the
334 password in clear text, but rather can store the value of the
335 inner SHA-1 (SHA-1(SHA-1(password + psk_identity + "Key Pad for
336 Netconf") + psk_identity_hint)), which could not be used as a
337 password equivalent for applications other than NETCONF. Deriving
338 the PSK from a password is not secure. This construction is used
339 because it is anticipated that people will do it anyway.
341 Note 2: [RFC4279] defines some conformance requirements for the
342 PSK, for the PSK identity encoding and for the identity hint. The
343 same requirements apply here as well; in particular on the
344 password. Moreover, the management interface by which the
345 password is provided MUST accept ASCII strings of at least 64
346 octets and MUST NOT add a null terminator before using them as
347 shared secrets. It MUST also accept a HEX encoding of the
348 password. The management interface MAY accept other encodings if
349 the algorithm for translating the encoding to a binary string is
352 4. Cipher Suite Requirements
354 A compliant implementation of the protocol specified in this document
355 MUST implement the cipher suite TLS_DHE_PSK_WITH_AES_128_CBC_SHA and
356 MAY implement any TLS cipher suite that provides mutual
359 5. Security Considerations
361 The security considerations described throughout [RFC4346] and
362 [RFC4279] apply here as well.
364 As with all schemes involving shared keys and passwords, special care
365 should be taken to protect the shared values and passwords as well as
366 to limit their exposure over time. Alternatively, using certificates
367 would provide better protection.
369 6. IANA Considerations
371 IANA is requested to assign a TCP port number that will be the
372 default port for NETCONF over TLS sessions as defined in this
376 Badra Expires November 27, 2008 [Page 7]
378 Internet-Draft NETCONF over TLS May 2008
381 IANA has assigned port <TBA> for this purpose.
385 A significant amount of the text in Section 3.1 was lifted from
388 The author would like to acknowledge David Harrington, Miao Fuyou,
389 Eric Rescorla, Juergen Schoenwaelder, Simon Josefsson, Olivier
390 Coupelon and the NETCONF mailing list members for their comments on
391 the document. The author appreciates also Bert Wijnen, Mehmet Ersue
392 and Dan Romascanu for their efforts on issues resolving discussion,
393 and Charlie Kaufman for the thorough review of this document and for
394 the helpful comments on the password-based authentication.
430 Badra Expires November 27, 2008 [Page 8]
432 Internet-Draft NETCONF over TLS May 2008
435 A. Appendix - Test Vectors for the PSK Derivation Function
437 The test vectors for the PSK derivation function in this document
438 have been cross-verified by two independent implementations. An
439 implementation that concurs with the results provided in this
440 document should be interoperable with other similar implementations.
443 psk_identity = psk_identity
444 psk_identity_hint = psk_identity_hint
446 The inner SHA-1 value (in hex):
448 inner := SHA-1(password + psk_identity + "Key Pad for Netconf")
449 == SHA-1("psk_identityKey Pad for Netconfpassword")
450 => 6d6eeb6a b8d0466b 45245d07 47d86726 b41b868c
452 The outer SHA-1 value (in hex):
454 outer := SHA-1(inner + psk_identity_hint)
455 => 88f3824b 3e5659f5 2d00e959 bacab954 b6540344
484 Badra Expires November 27, 2008 [Page 9]
486 Internet-Draft NETCONF over TLS May 2008
489 B. Appendix - Enabling Third Party Authentication using Passwords
491 During the 71st IETF meeting, several proposals have been proposed to
492 enable third party authentication that could be used in combination
493 with existing user authentication databases such as RADIUS. They are
494 listed below. More details on those proposals may be found at
495 https://www3.ietf.org/proceedings/08mar/slides/netconf-1/netconf-
497 http://www.psg.com/lists/netconf/netconf.2008/msg00125.html.
499 We summarize them as following:
501 1. Defining <user-login> RPC:
502 --------------------------
504 This option relies on JUNOS mechanism to enable an authentication
505 function via third parties. It consists of establishing a TLS with
506 no manager authentication, leaving the <request-login> RPC as the
507 only valid RPC. Anything else is an error.
509 Once the TLS session is established, the agent MUST authenticate
510 the manager by emitting the following <rpc> tag element:
512 <rpc-reply message-id="101"
513 xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
514 <challenge>Password:</challenge>
517 In which the manager MUST reply with the following:
521 <challenge-response>password</challenge-response>
525 The rules to handle this were pretty simple:
527 - The <request-login> RPC could only be performed if the session
528 wasn't authenticated.
530 - No other RPCs could be performed if the session wasn't
533 - The transport protocol can authenticate the session
538 Badra Expires November 27, 2008 [Page 10]
540 Internet-Draft NETCONF over TLS May 2008
547 o is simple to do. But
549 o might raise questions from the security ADs; NETCONF assumes
550 the authentication is part of the transport not NETCONF.
552 o only works for plaintext passwords (SASL PLAIN).
557 The second option consists of extending TLS so the manager
558 authentication becomes part of TLS. This extension, detailed in
559 http://tools.ietf.org/id/draft-badra-tls-password-ext-01.txt,
560 defines a new extension and a new TLS message to the TLS protocol
561 to enable TLS client authentication using passwords. The extension
562 is used to convey the manager login, whereas the new message is
563 defined and sent by the manager to prove its knowledge of the
566 Steps during the TLS negotiation:
568 - The manager adds such an extension to its TLS ClientHello.
570 - If the agent agrees on using this extension, it will notify
571 the manager and replies with its certificate and/or its
572 authenticated public key.
574 - The manager generates a premaster secret and encrypts it
575 using the agent public key.
577 - The manager then computes the session key using the premaster
578 secret and encrypts, among others, its password with the
581 - The agent decrypts the premaster secret and computes the same
582 key to decrypt the password.
584 - The agent checks with a database (or AAA infrastructures) to
585 verify the password and then to authenticate the manager.
589 o is simple to do. But
592 Badra Expires November 27, 2008 [Page 11]
594 Internet-Draft NETCONF over TLS May 2008
597 o It is indeed not easy to convince TLS WG to add password
598 authentication extension to TLS.
600 3. Running BEEP over TLS:
601 ----------------------
603 It looks complex for a solution, requires that all implementations
604 do actually support BEEP.
606 4. Extending NETCONF with a message to start TLS:
607 ----------------------------------------------
609 This option consists of extending NETCONF with a new message to
610 start the TLS negotiation and to perform an authentication
611 mechanism based on RFC4422 (SASL) or on any similar protocol.
617 o might raise questions from the security ADs; NETCONF assumes
618 the authentication is part of the transport not NETCONF.
619 Moreover, it adds complexity related to the use of SASL
622 5. Enable SSH (RFC4742 and TLS (as defined through this document:
623 --------------------------------------------------------------
625 Since SSH already defines a password-based authentication and
626 because this protocol MUST be implemented as a security protocol
627 for NETCONF, users can rely on SSH for password authentication, and
628 on TLS for authentication using PSK or certificates. This means the
629 agent SHOULD passively listen for the incoming SSH (respectively
630 TLS) connection on port 830 (respectively port <TBA-by-IANA>).
636 o already specified by RFC4742 and by the current document.
638 B.1. Working Group discussion at the 71st IETF meeting
640 Some of the options have been found as not practical in the WG
641 session during 71st meeting.
643 Options #2 and #3 have not been supported in the WG session.
646 Badra Expires November 27, 2008 [Page 12]
648 Internet-Draft NETCONF over TLS May 2008
651 Option #1 and # 4 seems to be against the security design for
652 NETCONF. Whether #5 or other options can be accepted by the WG
653 members needs to be discussed on the mailing list.
657 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
658 Requirement Levels", BCP 14, RFC 2119, March 1997.
660 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
661 Housley, R., and W. Polk, "Internet X.509 Public Key
662 Infrastructure Certificate and Certificate Revocation List
663 (CRL) Profile", RFC 5280, May 2008.
665 [RFC4086] Eastlake, D., 3rd, Schiller, J., and S. Crocker,
666 "Randomness Requirements for Security", BCP 106, RFC 4086,
669 [RFC4279] Eronen, P. and H. Tschofenig., "Pre-Shared Key Ciphersuites
670 for Transport Layer Security (TLS)", RFC 4279, December
673 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security
674 (TLS) Protocol 1.1", RFC 4346, April 2006.
676 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
677 and T. Wright, "Transport Layer Security (TLS) Extensions",
678 RFC 4366, April 2006.
680 [RFC4642] Murchison, K., Vinocur, J., Newman, C., "Using Transport
681 Layer Security (TLS) with Network News Transfer Protocol
682 (NNTP)", RFC 4642, October 2006
684 [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741,
687 [RFC4742] Wasserman, M. and T. Goddard, "Using the NETCONF
688 Configuration Protocol over Secure Shell (SSH)", RFC 4742,
691 [I-D.ietf-netconf-notification]
692 Chisholm, S. and H. Trevino, "NETCONF Event Notifications",
693 draft-ietf-netconf-notification-12.txt, (work in progress),
700 Badra Expires November 27, 2008 [Page 13]
702 Internet-Draft NETCONF over TLS May 2008
708 LIMOS Laboratory - UMR6158, CNRS
711 Email: badra@isima.fr
719 Email: hajjeh@ineovation.com
721 Intellectual Property Statement
723 The IETF takes no position regarding the validity or scope of any
724 Intellectual Property Rights or other rights that might be claimed to
725 pertain to the implementation or use of the technology described in
726 this document or the extent to which any license under such rights
727 might or might not be available; nor does it represent that it has
728 made any independent effort to identify any such rights. Information
729 on the procedures with respect to rights in RFC documents can be
730 found in BCP 78 and BCP 79.
732 Copies of IPR disclosures made to the IETF Secretariat and any
733 assurances of licenses to be made available, or the result of an
734 attempt made to obtain a general license or permission for the use of
735 such proprietary rights by implementers or users of this
736 specification can be obtained from the IETF on-line IPR repository at
737 http://www.ietf.org/ipr.
739 The IETF invites any interested party to bring to its attention any
740 copyrights, patents or patent applications, or other proprietary
741 rights that may cover technology that may be required to implement
742 this standard. Please address the information to the IETF at
745 Disclaimer of Validity
747 This document and the information contained herein are provided on an
748 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
749 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
750 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
751 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
754 Badra Expires November 27, 2008 [Page 14]
756 Internet-Draft NETCONF over TLS May 2008
759 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
760 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
764 Copyright (C) The IETF Trust (2008).
766 This document is subject to the rights, licenses and restrictions
767 contained in BCP 78, and except as set forth therein, the authors
768 retain all their rights.
772 Funding for the RFC Editor function is currently provided by the
808 Badra Expires November 27, 2008 [Page 15]