<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc5280 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY rfc5424 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5424.xml">
<!ENTITY rfc4347 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4347.xml">
<!ENTITY rfc5238 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5238.xml">
<!ENTITY rfc4340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4340.xml">
<!ENTITY rfc5405 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5405.xml">
<!ENTITY rfc2914 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2914.xml">
<!ENTITY rfc5426 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5426.xml">
<!ENTITY rfc5246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY rfc5425 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5425.xml">
<!ENTITY rfc5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
<!ENTITY rfc0768 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0768.xml">
<!ENTITY rfc5746 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5746.xml">
<!ENTITY rfc4279 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4279.xml">
<!ENTITY rfc4086 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4086.xml">
<!ENTITY ietf-syslog-sign SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-syslog-sign.xml">
<!ENTITY rfc5848 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5848.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<rfc category="std" docName="draft-ietf-syslog-dtls-06.txt"
     ipr="pre5378Trust200902">

  <front>
    <title abbrev="DTLS Transport Mapping for Syslog">Datagram Transport Layer Security (DTLS) Transport Mapping for Syslog</title>
    <author initials="J." surname="Salowey" fullname="Joseph Salowey">
      <organization>Cisco Systems, Inc.</organization>
      <address>
	<postal>
	  <street>2901 3rd. Ave</street>
	  <city>Seattle</city>
	  <code>98121</code>
	  <region>WA</region>
	  <country>USA</country>
	</postal>
        <email>jsalowey@cisco.com</email>
    </address>
    </author>

    <author initials="T." surname="Petch" fullname="Tom Petch">
      <organization>Engineering Networks Ltd</organization>
      <address>
	<postal>
	  <street>18 Parkwood Close</street>
	  <city>Lymm</city>
	  <code>WA13 0NQ</code>
	  <region>Cheshire</region>
	  <country>UK</country>
	</postal>
        <email>tomSecurity@network-engineer.co.uk</email>
    </address>
    </author>
    <author initials="R." surname="Gerhards" fullname="Rainer Gerhards">
      <organization>Adiscon GmbH</organization>
      <address>
	<postal>
	  <street>Mozartstrasse 21</street>
	  <city>Grossrinderfeld</city>
	  <code>97950</code>
	  <region>BW</region>
	  <country>Germany</country>
	</postal>
        <email>rgerhards@adiscon.com</email>
    </address>
    </author>
        <author initials="H." surname="Feng" fullname="Hongyan. Feng">
<organization>Huaweisymantec Technologies</organization>
      <address>
<postal>
 <street>20245 Steven Creek Blvd</street>
<city>Cupertino</city>
<region>CA</region>
<code>95014</code>
</postal>
        <email>fhyfeng@gmail.com</email>
    </address>
    </author>
    <date year="2010" month="July" ></date>

    <abstract>
      <t>This document describes the transport of syslog messages over DTLS
   (Datagram Transport Level Security).  It provides a secure transport for syslog messages in cases where a connection-less transport is
   desired.
</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The syslog protocol <xref target="RFC5424" /> is designed to run
      over different transports for different environments. This document defines the transport of syslog messages
   over the datagram transport layer security protocol (DTLS) <xref target="RFC4347" />. </t>

<t>The datagram transport layer security protocol (DTLS)  
   <xref target="RFC4347" /> is
    designed to meet the requirements of applications that need secure
    datagram transport.  DTLS has been mapped onto different transports, including  UDP  <xref target="RFC0768" />
    and DCCP  <xref target="RFC4340" />. This memo defines both options,
   namely syslog over DTLS over UDP and syslog over DTLS over DCCP.</t>


    </section>
  
    <section title="Terminology">
    <t>The following definitions from <xref target="RFC5424" /> 
    are used in this document:<list
            style="symbols">
     <t>An "originator" generates syslog content to be carried in a
            message.</t>
     <t>A "collector" gathers syslog content for further analysis.</t>
     <t>A "relay" forwards messages, accepting messages from
            originators or other relays, and sending them to collectors or
            other relays.</t>
    <t>A "transport sender" passes syslog messages to a specific
      transport protocol.</t>
    <t>A "transport receiver" takes syslog messages from a specific
      transport protocol.</t>  
    </list></t>
    <t>This document adds the following definitions:<list style="symbols">
    <t>A "DTLS client" is an application that can initiate a DTLS
      Client Hello to a server.</t>
    <t>A "DTLS server" is an application that can receive a DTLS Client Hello
      from a client and reply with a Server Hello.</t></list></t>  
      
      <t>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 <xref
      target="RFC2119" />.</t>
    </section>
    
    <section title="Security Requirements for Syslog">
      <t>The security requirements for the transport of syslog messages
    are discussed in Section 2 of <xref target="RFC5425" />. These also apply to this specification.
</t>
   <t>The following secondary threat is also considered in this document:<list style="symbols">
   <t> Denial of service is discussed in <xref target="RFC5424" />, 
       which states that an attacker may send more
       messages to a transport receiver than the transport receiver could handle.
       When using a secure transport protocol handshake, an attacker may use a spoofed IP source to engage the server in a cryptographic handshake to deliberately consume the server's resources.</t></list></t>
   </section>
    
    <section title="Using DTLS to Secure Syslog">
    <t>DTLS can be used as a secure transport to counter all the primary
    threats to syslog described in <xref target="RFC5425" />:<list style="symbols">
   <t>Confidentiality to counter disclosure of the message contents.</t>
   <t>Integrity checking to counter modifications to a message on a hop-
      by-hop basis.</t> 
   <t>Server or mutual authentication to counter masquerade.</t>
 </list></t>
   <t>In addition DTLS also provides: <list style="symbols"> 
   <t>A cookie exchange mechanism during handshake to counter Denial of
   Service attacks.</t>
   <t>A sequence number in the header to counter replay attacks.</t>  
 </list></t>
<t>Note: This secure transport (i.e., DTLS) only secures syslog
   transport in a hop-by-hop manner, and is not concerned with the
   contents of syslog messages.  In particular, the authenticated
   identity of the transport sender (e.g., subject name in the 
   certificate) is not necessarily related to the HOSTNAME field 
   of the syslog message. When authentication of syslog
   message origin is required, <xref target="RFC5848" /> can be used.</t>
 </section>
<section title="Protocol Elements">
     
  <section title="Transport">

<t>DTLS can run over multiple transports.  Implementations of this
    specification MUST support DTLS over UDP and SHOULD support DTLS over
    DCCP  <xref target="RFC5238" />.  Transports, such as UDP or DCCP do not provide
    session multiplexing and session-demultiplexing.  In such cases, the
    application implementer provides this functionality by mapping a
    unique combination of the remote address, remote port number, local
    address and local port number to a session.</t>

 <t>Each syslog message is delivered by the DTLS record protocol, which assigns a sequence number 
    to each DTLS record. Although the DTLS implementer may adopt a queue mechanism to resolve reordering, it may not assure that all the messages are delivered in order when mapping on the UDP transport.</t>
        <t>When DTLS runs over an unreliable transport, such as UDP, reliability is not provided.  With DTLS, an originator or relay may not realize that a collector has gone down or lost its DTLS connection state so messages may be lost. </t> 
<t>Syslog over DTLS over TCP MUST NOT be used. If a secure transport is required with TCP then the appropriate security mechanism is syslog over TLS as described in <xref target="RFC5425" />.  </t>

      
      
   </section>
   <section title="Port and Service Code Assignment">
        <t>A syslog transport sender is always a DTLS client and a transport receiver is always a DTLS server.</t><t>
    The UDP and DCCP port [TBD] has been allocated as the default port for syslog over DTLS as defined in this document.  The service code [TBD] has been assigned to syslog.</t>
   </section>
 
   <section title="Initiation">
	<t>The transport sender initiates a DTLS connection by sending a DTLS Client Hello to the transport receiver.  Implementations MUST support the denial of service countermeasures defined by DTLS.  When these countermeasures are used, the transport receiver responds with a DTLS Hello Verify Request containing a cookie.  The transport sender responds with a DTLS Client Hello containing the received cookie which initiates the DTLS handshake.  The transport sender MUST NOT send any syslog messages before the DTLS handshake has successfully completed.</t>
<t>Implementations MUST support  <xref target="RFC4347">DTLS 1.1</xref>  and MUST
   support the mandatory to implement cipher suite, which is
   TLS_RSA_WITH_AES_128_CBC_SHA as specified in <xref target="RFC5246" />. If additional cipher suites are
     supported, then implementations MUST NOT negotiate a cipher suite
     that employs NULL integrity or authentication  algorithms.
 </t>
<t>Where privacy is REQUIRED, then implementations must either negotiate
  a cipher suite that employs a non-NULL encryption algorithm or else achieve
  privacy  by other means, such as a physically secured network.</t>
<t>
However, as <xref target="RFC5424" /> section 8 points out,
'In most cases, passing clear-text messages is a benefit to the
    operations staff if they are sniffing the packets from the wire.'
and so where privacy is not a requirement, then it is advantageous
to use a NULL encryption algorithm.
</t>
      
      <section title="Certificate-Based Authentication">
<t>The mandatory to implement ciphersuites for DTLS use certificates <xref target="RFC5280" /> to authenticate peers. Both syslog transport sender (DTLS client) and syslog transport
   receiver (DTLS server) MUST implement certificate-based
   authentication.  This consists of validating the certificate and
   verifying that the peer has the corresponding private key.  The
   latter part is performed by DTLS.  To ensure interoperability between
   clients and servers, the methods for certificate validation defined in sections 4.2.1 and 4.2.2 of <xref target="RFC5425" /> 
   SHALL be implemented. </t>
<t> Both transport receiver and transport sender implementations MUST
   provide means to generate a key pair and self-signed certificate in
   case a key pair and certificate are not available through
   another mechanism.</t>
<t>The transport receiver and transport sender SHOULD provide mechanisms
   to record the certificate or certificate fingerprint used by the remote endpoint for the purpose of correlating an identity with the sent or received data.</t>
      </section>

   </section>
   <section title="Sending data">
        <t>All syslog messages MUST be sent as DTLS "application data". It is
        possible that multiple syslog messages be contained in one DTLS record,
        or that a syslog message be transferred in multiple DTLS records. The
        application data is defined with the following <xref
        target="RFC5234">ABNF</xref> expression:</t>

        <t>APPLICATION-DATA = 1*SYSLOG-FRAME</t>

        <t>SYSLOG-FRAME = MSG-LEN SP SYSLOG-MSG</t>

        <t>MSG-LEN = NONZERO-DIGIT *DIGIT</t>

        <t>SP = %d32</t>

        <t>NONZERO-DIGIT = %d49-57</t>

        <t>DIGIT = %d48 / NONZERO-DIGIT</t>

        <t>SYSLOG-MSG is defined in <xref
        target="RFC5424">syslog</xref> protocol.</t>
      <section title="Message Size">
<t>The message length is the octet count of the SYSLOG-MSG in the
    SYSLOG-FRAME.  A transport receiver MUST use the message length to
    delimit a syslog message.  There is no upper limit for a message
    length per se.  As stated in <xref target="RFC4347" />,
    a DTLS record MUST NOT span multiple datagrams.  When mapping onto different
    transports, DTLS has different record size limitations. For UDP, see section 3.2 of <xref target="RFC5426"/>.  For
   DCCP, the application implementer SHOULD determine the maximum
   record size allowed by DTLS protocol running over DCCP, as
   specified in <xref target="RFC4340" />.   The
    message size SHOULD NOT exceed the DTLS maximum record size
    limitation of 2^14 bytes.  To be consistent with <xref target="RFC5425" />, in
    establishing a baseline for interoperability, this specification
    requires that a transport receiver MUST be able to process messages
    with a length up to and including 2048 octets.  Transport receivers
    SHOULD be able to process messages with lengths up to and including
    8192 octets.</t>
<t>See section A.2 of <xref target="RFC5424" /> for implementation guidance on message
   length, including fragmentation.</t>


      </section>
   </section>
  <section title="Closure">
  <t>
       A transport sender MUST close the associated DTLS connection if the
   connection is not expected to deliver any syslog messages later.  It
   MUST send a DTLS close_notify alert before closing the connection.  A
   transport sender (DTLS client) MAY choose to not wait for the
   transport receiver's close_notify alert and simply close the
   DTLS connection.  Once the transport receiver gets a
   close_notify from the transport sender, it MUST reply with a
   close_notify.</t>
   <t>   When no data is received from a DTLS connection for a long time (where the
   application decides what "long" means), a transport receiver MAY
   close the connection.  The transport receiver (DTLS server) MUST
   attempt to initiate an exchange of close_notify alerts with the
   transport sender before closing the connection.  Transport receivers
   that are unprepared to receive any more data MAY close the connection
   after sending the close_notify alert. </t>
   <t>   Although closure alerts form part of DTLS, they, like all alerts, are
   not retransmitted by DTLS and so may be lost over an unreliable
   network.</t>

  </section>
</section>

<section title="Congestion Control" >
<t>Because syslog can generate unlimited amounts of data, transferring
    this data over UDP is generally problematic, because UDP lacks
    congestion control mechanisms.  Congestion control mechanisms that
    respond to congestion by reducing traffic rates and establish a
    degree of fairness between flows that share the same path are vital
    to the stable operation of the Internet (see <xref target="RFC2914" /> and <xref target="RFC5405" />).</t>


<t>DCCP has congestion control.  If DCCP is available, syslog over DTLS
    over DCCP is RECOMMENDED in preference to syslog over 
    DTLS over UDP.  Implementations of syslog over DTLS over DCCP
    MUST support CCID 3 and SHOULD support CCID 2 to ensure
    interoperability.
</t>
    <t>The congestion control considerations from section 4.3 of <xref target="RFC5426" /> also apply to syslog over DTLS over UDP.
 </t>

</section>

   <section title="Security Policies">
   <t>Syslog transport over DTLS has been designed to minimize the security and operational differences 
    for environments where both <xref target="RFC5425" /> and syslog over DTLS are supported. 
    The security policies for syslog over DTLS are the same as those described in <xref target="RFC5425" /> and all the normative requirements of section 5 of <xref target="RFC5425" /> apply.</t>

   </section>

    <section title="IANA Consideration">
    <t>IANA is requested to assign a registered UDP and DCCP port number for syslog over DTLS.  The same values as for syslog over TLS (syslog-tls and 6514) are requested. That is, update the registry as follows:
<list><t>syslog-tls    6514/udp    syslog over DTLS [RFCTBD]</t>
<t>syslog-tls    6514/dccp    syslog over DTLS [RFCTBD]</t>
    </list></t>
<t>IANA is requested to assign the service code SYLG to syslog for use with DCCP.  The allocation in the service code registry should be as follows: 
<list><t>1398361159    SYLG    Syslog Protocol    [RFCTBD] </t></list></t>
    </section>
     
       <section title="Security Considerations">
    <t>The security considerations in  <xref target="RFC4347" />, <xref target="RFC5246" />, <xref target="RFC5425" /> and <xref target="RFC5280" />  apply to this document.  </t>
    <t> </t>

<section title="DTLS Renegotiation">
<t>TLS and DTLS renegotiation may be vulnerable to attacks described in <xref target="RFC5746" />.  Although RFC 5746 provides a fix for some of the issues, renegotiation can still cause problems for applications since connection security parameters can change without the application knowing it. Therefore it is RECOMMENDED that renegotiation be disabled for syslog over DTLS. If renegotiation is allowed then the specification in RFC 5746 MUST be followed and the implementation MUST make sure that the connection still has adequate security and that any identities extracted from client and server certificates do not change during renegotiation.</t> 

</section>
<section title="Message Loss">
<t>
The transports described in this document are unreliable.  It is possible for messages to be lost or removed by an attacker without the knowledge of the receiver. <xref target="RFC5424"/> notes that implementers who wish a lossless stream should be using tls/tcp as their transport.  In addition, the use of signed syslog messages <xref target="RFC5848" /> can also provide an indication of message loss. 
</t>
</section>
<section title="Private Key Generation">
<t>
    Transport receiver and transport sender implementations often
    generate their own key pairs.  An inadequate random number
    generator (RNG) or an inadequate pseudo-random number generator
    (PRNG) to generate these keys can result in little or no security.
    See <xref target="RFC4086" /> for random number generation guidance.

</t>
</section>
<section title="Trust Anchor Installation and Storage">
<t>
 Trust anchor installation and storage is critical.  Transmission of
    a trust anchor, especially self-signed certificates used as trust
    anchors, from transport receiver to transport sender for
    installation requires an out-of-band step(s).  Care must be taken to
    ensure the installed trust anchor is in fact the correct trust
    anchor.  The fingerprint mechanism in Section 5.3.1 can be
    used by the transport sender to ensure the transport receiver's
    self-signed certificate is properly installed.   Trust anchor
    information must be securely stored.  Changes to trust anchor
    information can cause acceptance of certificates that should
    be rejected.

</t>
</section>
    </section>
    
     <section title="Acknowledgements">
       <t>The authors would like to thank Wes Hardaker  for his review on this proposal and contributing his valuable suggestions on the use of DTLS. Thanks also to Pasi Eronen, David Harrington, Chris Lonvick, Eliot Lear, Anton Okmyanskiy, Juergen Schoenwaelder, Richard Graveman and members of the syslog working group for their comments, suggestions and review.</t>
    </section>
    
  </middle>

  <back>
    <references title="Normative References">
       &rfc2119;
       &rfc5424;
       &rfc4347;
       &rfc5246;
       &rfc5425;
       &rfc5280;
       &rfc5234; 
       &rfc0768;
       &rfc4340;
       &rfc5238;
       &rfc5746;
       &rfc5426;
    </references>
    
    <references title="Informative References" >
    &rfc2914;      
    &rfc5405;
    &rfc5848;
    &rfc4086;

       
  
    
  

    </references>
  </back>
</rfc>
