5539
PROPOSED STANDARD
NETCONF over Transport Layer Security (TLS) (Obsoleted)
Authors: M. Badra
Date: May 2009
Area: ops
Working Group: netconf
Stream: IETF
Obsoleted by:
RFC 7589
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. [STANDARDS-TRACK]
RFC 5539
Obsoleted by: 7589 PROPOSED STANDARD
Network Working Group M. Badra
Request for Comments: 5539 CNRS/LIMOS Laboratory
Category: Standards Track May 2009
<span class="h1">NETCONF over Transport Layer Security (TLS)</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of
publication of this document (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>).
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 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.
<span class="grey">Badra Standards Track [Page 1]</span>
<span id="page-2" ></span>
<span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-1.1">1.1</a>. Conventions Used in This Document . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. NETCONF over TLS . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2.1">2.1</a>. Connection Initiation . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2.2">2.2</a>. Connection Closure . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3">3</a>. Endpoint Authentication and Identification . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3.1">3.1</a>. Server Identity . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3.2">3.2</a>. Client Identity . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-4">4</a>. Security Considerations . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-5">5</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-6">6</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-7">7</a>. Contributor's Address . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-8">8</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-8.1">8.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-8.2">8.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The NETCONF protocol [<a href="./rfc4741" title=""NETCONF Configuration Protocol"">RFC4741</a>] 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 integrity, confidentiality, peer authentication, and
reliable, sequenced data delivery.
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 [<a href="./rfc5246" title=""The Transport Layer Security (TLS) Protocol Version 1.2"">RFC5246</a>].
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.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Conventions Used in This Document</span>
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 in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="grey">Badra Standards Track [Page 2]</span>
<span id="page-3" ></span>
<span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. NETCONF over TLS</span>
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.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Connection Initiation</span>
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 6513. 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 [<a href="./rfc5277" title=""NETCONF Event Notifications"">RFC5277</a>]. In this case, the server replies to
indicate whether the subscription request was successful and, if it
was successful, the server 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.
This document uses the same delimiter sequence ("]]>]]>") defined in
[<a href="./rfc4742" title=""Using the NETCONF Configuration Protocol over Secure SHell (SSH)"">RFC4742</a>], which MUST be sent by both the client and the server after
each XML document in the NETCONF exchange. Since this character
sequence can legally appear in plain XML 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 [<a href="./rfc5246" title=""The Transport Layer Security (TLS) Protocol Version 1.2"">RFC5246</a>]. The server MUST support certificate-based
client authentication.
Implementations MUST support TLS 1.2 [<a href="./rfc5246" title=""The Transport Layer Security (TLS) Protocol Version 1.2"">RFC5246</a>] 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.
<span class="grey">Badra Standards Track [Page 3]</span>
<span id="page-4" ></span>
<span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Connection Closure</span>
A TLS client (NETCONF manager) MUST close the associated TLS
connection if the connection is not expected to issue 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.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Endpoint Authentication and Identification</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Server Identity</span>
During the TLS negotiation, the client MUST carefully examine the
certificate presented by the server to determine if it meets the
client's 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 [<a href="./rfc4642" title=""Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)"">RFC4642</a>]):
o The client MUST use the server hostname it used to open the
connection (or the hostname specified in the TLS "server_name"
extension [<a href="./rfc5246" title=""The Transport Layer Security (TLS) Protocol Version 1.2"">RFC5246</a>]) 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.
<span class="grey">Badra Standards Track [Page 4]</span>
<span id="page-5" ></span>
<span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
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 <a href="./rfc5280#section-6">Section 6
of [RFC5280]</a> 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.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Client Identity</span>
The server MUST verify the identity of the client with certificate-
based authentication according to local policy to ensure that the
incoming client request is legitimate before any configuration or
state data is sent to or received from the client.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
The security considerations described throughout [<a href="./rfc5246" title=""The Transport Layer Security (TLS) Protocol Version 1.2"">RFC5246</a>] and
[<a href="./rfc4741" title=""NETCONF Configuration Protocol"">RFC4741</a>] apply here as well.
This document in its current version does not support third-party
authentication (e.g., backend Authentication, Authorization, and
Accounting (AAA) servers) due to the fact that TLS does 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.
<span class="grey">Badra Standards Track [Page 5]</span>
<span id="page-6" ></span>
<span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
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 <a href="#section-2.1">Section 2.1</a> never
appears in NETCONF messages; otherwise, those messages can be
dropped, garbled, or misinterpreted. 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 [<a href="./rfc4742" title=""Using the NETCONF Configuration Protocol over Secure SHell (SSH)"">RFC4742</a>].
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
IANA has assigned a TCP port number (6513) 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, [email protected].
Transport Protocol: TCP.
Port Number: 6513
Broadcast, Multicast or Anycast: No.
Port Name: netconf-tls.
Service Name: netconf.
Reference: <a href="./rfc5539">RFC 5539</a>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Acknowledgements</span>
A significant amount of the text in <a href="#section-3">Section 3</a> was lifted from
[<a href="./rfc4642" title=""Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)"">RFC4642</a>].
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 also appreciates 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.
<span class="grey">Badra Standards Track [Page 6]</span>
<span id="page-7" ></span>
<span class="grey"><a href="./rfc5539">RFC 5539</a> NETCONF over TLS May 2009</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Contributor's Address</span>
Ibrahim Hajjeh
Ineovation
France
EMail: [email protected]
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC4741">RFC4741</a>] Enns, R., "NETCONF Configuration Protocol", <a href="./rfc4741">RFC 4741</a>,
December 2006.
[<a id="ref-RFC4742">RFC4742</a>] Wasserman, M. and T. Goddard, "Using the NETCONF
Configuration Protocol over Secure SHell (SSH)", <a href="./rfc4742">RFC 4742</a>,
December 2006.
[<a id="ref-RFC5246">RFC5246</a>] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", <a href="./rfc5246">RFC 5246</a>, August 2008.
[<a id="ref-RFC5280">RFC5280</a>] 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", <a href="./rfc5280">RFC 5280</a>, May 2008.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
[<a id="ref-RFC4642">RFC4642</a>] Murchison, K., Vinocur, J., and C. Newman, "Using
Transport Layer Security (TLS) with Network News Transfer
Protocol (NNTP)", <a href="./rfc4642">RFC 4642</a>, October 2006.
[<a id="ref-RFC5277">RFC5277</a>] Chisholm, S. and H. Trevino, "NETCONF Event
Notifications", <a href="./rfc5277">RFC 5277</a>, July 2008.
Author's Address
Mohamad Badra
CNRS/LIMOS Laboratory
Campus de cezeaux, Bat. ISIMA
Aubiere 63170
France
EMail: [email protected]
Badra Standards Track [Page 7]
Annotations
Select text to annotate