NETCONF Working GroupMohamadM. BadraInternet Draft LIMOSInternet-Draft CNRS/LIMOS Laboratory Intended status: Standards TrackOctober 22, 2008February 24, 2009 Expires:AprilAugust 28, 2009 NETCONFoverOver Transport Layer Security (TLS)draft-ietf-netconf-tls-06.txtdraft-ietf-netconf-tls-07.txt Status of this MemoBy submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or sheThis Internet-Draft isaware have been or will be disclosed, and any of which he or she becomes aware will be disclosed,submitted to IETF inaccordancefull conformance withSection 6the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed athttp://www.ietf.org/ietf/1id-abstracts.txthttp://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed athttp://www.ietf.org/shadow.htmlhttp://www.ietf.org/shadow.html. This Internet-Draft will expire onApril 22,August 28, 2009. Copyright Notice Copyright(C)(c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document. This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust(2008).the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English. Abstract The Network Configuration Protocol (NETCONF) provides mechanisms to install, manipulate, and delete the configuration of network devices. This document describes how to use the Transport Layer Security (TLS) protocol to secure NETCONF exchanges. Table of Contents 1.Introduction...................................................3Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. ConventionsusedUsed in thisdocument.........................3Document . . . . . . . . . . . . . 3 2. NETCONF overTLS...............................................3TLS . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. ConnectionInitiation.....................................3Initiation . . . . . . . . . . . . . . . . . . . 3 2.2. ConnectionClosure........................................4Closure . . . . . . . . . . . . . . . . . . . . 4 3. Endpoint Authentication andIdentification.....................5Identification . . . . . . . . . . 5 3.1. ServerIdentity...........................................5Identity . . . . . . . . . . . . . . . . . . . . . . 5 3.2. ClientIdentity...........................................6Identity . . . . . . . . . . . . . . . . . . . . . . 6 4. SecurityConsiderations........................................6Considerations . . . . . . . . . . . . . . . . . . . . 6 5. IANAConsiderations............................................6Considerations . . . . . . . . . . . . . . . . . . . . . . 7 6.Acknowledgments................................................7Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 7.References.....................................................7 7.1.Contributor's Address . . . . . . . . . . . . . . . . . . . . . 7 8. NormativeReferences......................................7References . . . . . . . . . . . . . . . . . . . . . 7 Appendix A. Change Log (to be removed by RFC Editor before publication) . . . . . . . . . . . . . . . . . . . . . 8 A.1. 06-07 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 A.2. 05-06 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 A.3. 04-05 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Author'sAddresses................................................8 Intellectual Property and Copyright Statement.....................8Address . . . . . . . . . . . . . . . . . . . . . . . . . 9 1. Introduction The NETCONF protocol [RFC4741] defines a mechanism through which a network device can be managed. NETCONF is connection-oriented, requiring a persistent connection between peers. This connection must provide reliable, sequenced data delivery, integrity and confidentiality and peers authentication. This document defines "NETCONF over TLS", which includes support for certificate-based mutual authentication and key derivation, utilizing the protected ciphersuite negotiation, mutual authentication and key management capabilities of the TLS (Transport Layer Security) protocol, described in [RFC5246]. Throughout this document, the terms "client" and "server" are used to refer to the two ends of the TLS connection. The client actively opens the TLS connection, and the server passively listens for the incoming TLS connection. The terms "manager" and "agent" are used to refer to the two ends of the NETCONF protocol session. The manager issues NETCONF remote procedure call (RPC) commands, and the agent replies to those commands. When NETCONF is run over TLS using the mapping defined in this document, the client is always the manager, and the server is always the agent. 1.1. ConventionsusedUsed in thisdocumentDocument The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described inRFC-2119[RFC2119]. 2. NETCONF over TLS Since TLS is application protocol-independent, NETCONF can operate on top of the TLS protocol transparently. This document defines how NETCONF can be used within a TLS session. 2.1. Connection Initiation The peer acting as the NETCONF manager MUST also act as the TLS client. It MUST connect to the server that passively listens for the incoming TLS connection on the TCP port <IANA-to-be-assigned>. (Note to RFC Editor: please replace <IANA-to-be-assigned> with the IANA- assigned value, and remove this note). It MUST therefore send the TLS ClientHello message to begin the TLS handshake. Once the TLS handshake has finished, the client and the server MAY begin to exchange NETCONF data. In particular, the client will send complete XML documents to the server containing <rpc> elements, and the server will respond with complete XML documents containing <rpc-reply> elements. The client MAY indicate interest in receiving event notifications from a server by creating a subscription to receive event notifications [RFC5277], in which case the server replies to indicate whether the subscription request was successful and, if it was successful, begins sending the event notifications to the client as the events occur within the system. All NETCONF messages MUST be sent as TLS "application data". It is possible that multiple NETCONF messages be contained in one TLS record, or that a NETCONF message be transferred in multiple TLS records.Current NETCONF messages don't include a message's length.This document usesconsequentlythe same delimiter sequence ("]]>]]>") defined in[RFC4742][RFC4742], which MUST be sent by both the client andthereforethespecialserver after each XML document in the NETCONF exchange. Since this charactersequence, ]]>]]>, to delimitsequence can legally appear in plain XMLdocuments.in attribute values, comments, and processing instructions, implementations of this document MUST ensure that this character sequence is never part of a NETCONF message. Implementation of the protocol specified in this document MAY implement any TLS cipher suite that provides certificate-based mutual authentication [RFC5246]. Implementations MUST support TLS 1.2 [RFC5246] and are REQUIRED to support the mandatory to implement cipher suite, which is TLS_RSA_WITH_AES_128_CBC_SHA. This document is assumed to apply to future versions of TLS, in which case the mandatory to implement cipher suite for the implemented version MUST be supported. 2.2. Connection Closure A TLS client (NETCONF manager) MUST close the associated TLS connection if the connection is not expected toissuesissue any NETCONF RPC commands later. It MUST send a TLS close_notify alert before closing the connection. The TLS client MAY choose to not wait for the TLS server (NETCONF agent) close_notify alert and simply close the connection, thus generating an incomplete close on the TLS server side. Once the TLS server gets a close_notify from the TLS client, it MUST reply with a close_notify unless it becomes aware that the connection has already been closed by the TLS client (e.g., the closure was indicated by TCP). When no data is received from a connection for a long time (where the application decides what "long" means), a NETCONF peer MAY close the connection. The NETCONF peer MUST attempt to initiate an exchange of close_notify alerts with the other NETCONF peer before closing the connection. The close_notify's sender that is unprepared to receive any more data MAY close the connection after sending the close_notify alert, thus generating an incomplete close on the close_notify's receiver side. 3. Endpoint Authentication and Identification 3.1. Server Identity During the TLS negotiation, the client MUST carefully examine the certificate presented by the server to determine if it meets their expectations. Particularly, the client MUST check its understanding of the server hostname against the server's identity as presented in the server Certificate message, in order to prevent man-in-the-middle attacks. Matching is performed according to the rules below (following the example of [RFC4642]):-o The client MUST use the server hostname it used to open the connection (or the hostname specified in TLS "server_name" extension[RFC4366])[RFC5246]) as the value to compare against the server name as expressed in the server certificate. The client MUST NOT use any form of the server hostname derived from an insecure remote source (e.g., insecure DNS lookup). CNAME canonicalization is not done.-o If a subjectAltName extension of type dNSName is present in the certificate, it MUST be used as the source of the server's identity.-o Matching is case-insensitive.-o A "*" wildcard character MAY be used as the leftmost name component in the certificate. For example, *.example.com would match a.example.com, foo.example.com, etc., but would not match example.com.-o If the certificate contains multiple names (e.g., more than one dNSName field), then a match with any one of the fields is considered acceptable. If the match fails, the client MUST either ask for explicit user confirmation or terminate the connection and indicate the server's identity is suspect. Additionally, clients MUST verify the binding between the identity of the servers to which they connect and the public keys presented by those servers. Clients SHOULD implement the algorithm in Section 6 of [RFC5280] for general certificate validation, but MAY supplement that algorithm with other validation methods that achieve equivalent levels of verification (such as comparing the server certificate against a local store of already-verified certificates and identity bindings). If the client has external information as to the expected identity of the server, the hostname check MAY be omitted. 3.2. Client IdentityTypically, theThe serverhasmay have no external knowledgeof what theon client's identityought to beandsoidentity checks(other than thatmight not be possible (unless the client has a certificate chain rooted in an appropriateCA) are not possible.CA). If a server hassuchknowledge on client's identity (typically from some source external to NETCONF or TLS) it MUST check the identity as described above. 4. Security Considerations The security considerations described throughout [RFC5246] and [RFC4741] apply here as well. This document in its current versiondoesn'tdoes not support third party authentication due to the fact that TLSdoesn'tdoes not specify this way of authentication and that NETCONF depends on the transport protocol for the authentication service. If third party authentication is needed, BEEP or SSH transport can be used. An attacker might be able to inject arbitrary NETCONF messages via some application that does not carefully check exchanged messages or deliberately insert the delimiter sequence in a NETCONF message to create a DoS attack. Hence, applications and NETCONF APIs MUST ensure that the delimiter sequence defined in Section 2.1 never appears in NETCONF messages; otherwise, those messages can be dropped, garbled or mis-interpreted. If the delimiter sequence is found in a NETCONF message by the sender side, a robust implementation of this document should warn the user that illegal characters have been discovered. If the delimiter sequence is found in a NETCONF message by the receiver side (including any XML attribute values, XML comments or processing instructions) a robust implementation of this document must silently discard the message without further processing and then stop the NETCONF session. Finally, this document does not introduce any new security considerations compared to [RFC4742]. 5. IANA Considerations IANA is requested to assign a TCP port number in the "Registered Port Numbers" range with the name "netconf-tls". This port will be the default port for NETCONF over TLS, as defined in this document. Registration Contact: Mohamad Badra, badra@isima.fr. Transport Protocol: TCP. Port Number: TBA-by-IANA (if possible, please assign 6513). Broadcast, Multicast or Anycast: No. Port Name: netconf-tls. Service Name: netconf. Reference:draft-ietf-netconf-tls-05.draft-ietf-netconf-tls-07. 6.AcknowledgmentsAcknowledgements A significant amount of the text in Section 3 was lifted from [RFC4642]. The author would like to acknowledge David Harrington, Miao Fuyou, Eric Rescorla, Juergen Schoenwaelder, Simon Josefsson, Olivier Coupelon, Alfred Hoenes and the NETCONF mailing list members for their comments on the document. The author appreciates also Bert Wijnen, Mehmet Ersue and Dan Romascanu for their efforts on issues resolving discussion, and Charlie Kaufman, Pasi Eronen and Tim Polk for the thorough review of this document. 7.References 7.1.Contributor's Address Ibrahim Hajjeh Ineovation France E-mail: ibrahim.hajjeh@ineovation.fr 8. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.[RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., and T. Wright, "Transport Layer Security (TLS) Extensions", RFC 4366, April 2006.[RFC4642] Murchison, K., Vinocur, J., and C. Newman,C.,"Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)", RFC 4642, October20062006. [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741, December 2006. [RFC4742] Wasserman, M. and T. Goddard, "Using the NETCONF Configuration Protocol over SecureShellSHell (SSH)", RFC 4742, December 2006. [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2",RFC5246,RFC 5246, August 2008. [RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event Notifications", RFC 5277, July 2008. [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, May 2008.Author's Addresses Mohamad Badra LIMOS Laboratory - UMR6158, CNRS France Email: badra@isima.fr Contributors Ibrahim Hajjeh INEOVATION France Email: Ibrahim.hajjeh@ineovation.com Full Copyright Statement Copyright (C) The IETF Trust (2008). This document is subjectAppendix A. Change Log (to be removed by RFC Editor before publication) A.1. 06-07 New trust boilerplate introduced. Section 2.1: reworded the text related to therights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This documentdelimiter sequence andthe information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rightshighlighted thatmight be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it representimplementations MUST ensure thatit has madedelimiter sequence is never part of a NETCONF message. Section 2.2: Obselete RFC4366 is replaced with RFC5246. Section 2.2: s/to issues anyindependent effort to identifyNETCONF commands/to issue anysuch rights. Information onNETCONF commands/ Section 3.2: "Typically, theproceduresserver has no external knowledge" is replaced withrespect"The server may have no external knowledge" Section 4 : text added torights in RFC documents can be found in BCP 78the Security Considerations section to describe security threads andBCP 79. Copies of IPR disclosures madeto give recommendations on theIETF Secretariatsender andany assurances of licenses to be made available, orreceiver behaviour in case they detect theresult of an attempt made to obtaindelimiter sequence in between ageneral license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invitesNETCONF message. A.2. 05-06 Section 5 (IANA Considerations Section): "Anycast" is replaced with "No". A.3. 04-05 Removed anyinterested partytext related tobringPSK based authentication. Revised toits attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be requiredTLS with certificate-based mutual authentication. Removed Cipher Suite Requirements section which was redundant with TLS. Added small clarifications toimplement this standard. Please addresstheinformation"Introduction" and "Endpoint Authentication and Identification" sections. Section 2.1: Included mandatory to implement cipher suites that track future versions of theIETF at ietf-ipr@ietf.org. Acknowledgment Funding forTLS. Section 2.2: Revised theRFC Editor function is provided byconnection closure session with regards to TLS 1.2. Section 5: Revised to help IANA with theIETF Administrative Support Activity (IASA).port assignment. Section 8: Removed RFC4086 and RFC4279 from the reference section Author's Address Mohamad Badra CNRS/LIMOS Laboratory Campus de cezeaux, Bat. ISIMA Aubiere, 63170 Fance Email: badra@isima.fr