RFC 5425
Transport Layer Security (TLS) Transport Mapping for Syslog
RFC 5425: TLS Transport Mapping for Syslog β¨π
Okay bestie, this is part 1 of 3 π¦
RFC 5425 is a Standards Track doc from March 2009. The authors are F. Miao (Ed.) and Y. Ma (Ed.) from Huawei Technologies, plus J. Salowey (Ed.) from Cisco Systems, Inc. It doesn't list anything it obsoletes or updates. It's giving official, and it's all about wrapping syslog in TLS ππ
Status of This Memo π
This doc is an Internet standards track protocol for the Internet community, and it's basically asking everyone for feedback and ideas to make it better π¬ For where this protocol sits in standardization, check the current edition of "Internet Official Protocol Standards" (STD 1). Anyone can distribute this memo, no limits πΈ
Copyright Notice βοΈ
Copyright (c) 2009 IETF Trust and the people listed as the document authors. All rights reserved π
This doc is under BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents, the versions that were in effect when it got published. Read them closely, because they spell out your rights and restrictions for this doc π§Ύ You can find them at http://trustee.ietf.org/license-info
Okay, the fine print: this doc might include stuff from IETF Documents or IETF Contributions that were published or made public before November 10, 2008. Some of the people who hold copyright on that older material may never have given the IETF Trust permission to allow changes outside the IETF Standards Process π So unless you get a proper license from those copyright holders, this doc can't be modified outside the IETF Standards Process, and you can't make derivative works outside it either. The one exceptions are formatting it for publication as an RFC, or translating it into languages other than English π
Abstract π¦
This doc is all about using Transport Layer Security (TLS) to give syslog a secure connection for moving its messages around. It also goes over the security threats to syslog and how TLS can shut them down π₯
Table of Contents ποΈ
1. Introduction ....................................................3
1.1. Terminology ................................................3
2. Security Requirements for Syslog ................................3
3. Using TLS to Secure Syslog ......................................4
4. Protocol Elements ...............................................5
4.1. Port Assignment ............................................5
4.2. Initiation .................................................5
4.2.1. Certificate-Based Authentication ....................5
4.2.2. Certificate Fingerprints ............................6
4.2.3. Cryptographic Level .................................7
4.3. Sending Data ...............................................7
4.3.1. Message Length ......................................7
4.4. Closure ....................................................8
5. Security Policies ...............................................8
5.1. End-Entity Certificate Based Authorization .................8
5.2. Subject Name Authorization .................................9
5.3. Unauthenticated Transport Sender ...........................9
5.4. Unauthenticated Transport Receiver ........................10
5.5. Unauthenticated Transport Receiver and Sender .............10
6. Security Considerations ........................................10
6.1. Authentication and Authorization Policies .................10
6.2. Name Validation ...........................................11
6.3. Reliability ...............................................11
7. IANA Considerations ............................................11
7.1. Port Number ...............................................11
8. Acknowledgments ................................................11
9. References .....................................................12
9.1. Normative References ......................................12
9.2. Informative References ....................................12
1. Introduction π§
So this doc describes how to use Transport Layer Security (TLS [RFC5246]) to give syslog [RFC5424] messages a secure connection while they're in transit π It also breaks down the security threats to syslog and how TLS can counter them. Iconic behavior, honestly π
1.1. Terminology π
These are the definitions used in this doc:
- An "originator" generates syslog content to be carried in a message.
- A "collector" gathers syslog content for further analysis.
- A "relay" forwards messages, accepting messages from originators or other relays, and sending them to collectors or other relays.
- A "transport sender" passes syslog messages to a specific transport protocol.
- A "transport receiver" takes syslog messages from a specific transport protocol.
- A "TLS client" is an application that can initiate a TLS connection by sending a Client Hello to a server.
- A "TLS server" is an application that can receive a Client Hello from a client and reply with a Server Hello.
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 RFC 2119 [RFC2119]. (This part is the official rulebook, so pay attention π«Ά)
2. Security Requirements for Syslog π
Syslog messages can hop through several stops before they reach the intended collector π¦ Some of the networks in the middle might not be trusted by the originator, relay, or receiver, because they're in a different security domain or at a different security level from the originator, relay, or collector. Another worry is that the originator, relay, or receiver itself might be sitting in an insecure network π
There are several threats that syslog security needs to deal with. The primary threats are:
- Masquerade. An unauthorized transport sender may send messages to a legitimate transport receiver, or an unauthorized transport receiver may try to deceive a legitimate transport sender into sending syslog messages to it.
- Modification. An attacker between the transport sender and the transport receiver may modify an in-transit syslog message and then forward the message to the transport receiver. Such modification may make the transport receiver misunderstand the message or cause it to behave in undesirable ways.
- Disclosure. An unauthorized entity may examine the contents of the syslog messages, gaining unauthorized access to the information. Some data in syslog messages is sensitive and may be useful to an attacker, such as the password of an authorized administrator or user.
The secondary threat is:
- Message stream modification. An attacker may delete one or more syslog messages from a series of messages, replay a message, or alter the delivery sequence. The syslog protocol itself is not based on message order. However, an event in a syslog message may relate semantically to events in other messages, so message ordering may be important to understanding a sequence of events.
These threats are considered less important for syslog, and this doc doesn't address them:
- Denial of Service
- Traffic Analysis
3. Using TLS to Secure Syslog π‘οΈ
TLS can be used as a secure transport to counter all of the primary threats to syslog we just talked about π
- Confidentiality to counter disclosure of the message contents.
- Integrity-checking to counter modifications to a message on a hop-by-hop basis.
- Server or mutual authentication to counter masquerade.
Note: This secure transport (i.e., TLS) 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, [SYS-SIGN] can be used. π Translation: TLS protects the hop, not the message content, so don't assume the certificate name matches the HOSTNAME field.
4. Protocol Elements π§©
4.1. Port Assignment π
A syslog transport sender is always a TLS client, and a transport receiver is always a TLS server π«Ά
The TCP port 6514 has been allocated as the default port for syslog over TLS, as defined in this doc β¨
4.2. Initiation π
The transport sender should initiate a connection to the transport receiver and then send the TLS Client Hello to begin the TLS handshake. When the TLS handshake has finished, the transport sender MAY then send the first syslog message π
TLS typically uses certificates [RFC5280] to authenticate peers. 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 doc 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 π
4.2.1. Certificate-Based Authentication π
Both the syslog transport sender (TLS client) and the syslog transport receiver (TLS server) MUST implement certificate-based authentication. This means validating the certificate and verifying that the peer has the corresponding private key. TLS handles the latter part. To make sure clients and servers can actually talk to each other, the following methods for certificate validation SHALL be implemented:
- Certification path validation: The TLS peer is configured with one or more trust anchors (typically root CA (certification authority) certificates), which allow it to verify a binding between the subject name and the public key. Additional policy controls needed for authorizing the syslog transport sender and receiver (i.e., verifying that the subject name represents an authorized party) are described in Section 5. Certification path validation is performed as defined in [RFC5280]. This method is useful where there is a Public Key Infrastructure (PKI) deployment. π°
- End-entity certificate matching: The transport sender or receiver is configured with information necessary to identify the valid end-entity certificates of its authorized peers. The end-entity certificates can be self-signed, and no certification path validation is needed. Implementations MUST support certificate fingerprints in Section 4.2.2 and MAY allow other formats for end-entity certificates such as a DER-encoded certificate. This method gives you an alternative to a PKI that's simple to deploy and still keeps a reasonable level of security π¦
Both transport receiver and transport sender implementations MUST provide means to generate a key pair and self-signed certificate in the case that a key pair and certificate are not available through another mechanism π§
The transport receiver and transport sender SHOULD provide mechanisms to record the end-entity certificate for the purpose of correlating it with the sent or received data π
4.2.2. Certificate Fingerprints β¨
Okay bestie, both client AND server implementations MUST make the certificate fingerprints for their certificate available through a management interface π«Ά The labels for the algorithms come from the textual names of the hash functions in the IANA registry "Hash Function Textual Names", which was allocated in [RFC4572] π
Here's how a fingerprint gets made: you take the hash of the DER-encoded certificate using a cryptographically strong algorithm, then convert the result into colon-separated hexadecimal bytes, each one written as 2 uppercase ASCII characters π When a fingerprint is displayed or configured, it gets an ASCII label naming the hash function stuck on the front, followed by a colon. Implementations MUST support SHA-1 as the hash algorithm and use the ASCII label "sha-1" to identify it π₯ A SHA-1 hash is 20 bytes long, and the matching fingerprint string is 65 characters β¨ Here's an example:
sha-1:E1:2D:53:2B:7C:6B:8A:29:A2:76:C8:64:36:0B:08:4B:7A:F1:9E:9D
During validation, the hash gets pulled out of the fingerprint and compared against the hash calculated over the received certificate π§
4.2.3. Cryptographic Level πΈ
Syslog applications SHOULD be implemented in a way that lets admins, as a matter of local policy, pick the cryptographic level and authentication options they want π
TLS lets you resume an earlier TLS session, or use another active session when a new one is requested, so you don't have to pay the cost of a whole new full TLS handshake π₯Ή The security parameters of the resumed session get reused for the requested session. The security parameters SHOULD be checked against the security requirements of the requested session, just to make sure the resumed session is actually giving proper security π
4.3. Sending Data π¦
All syslog messages MUST be sent as TLS "application data" π Multiple syslog messages can be packed into one TLS record, or a single syslog message can be spread across multiple TLS records. The application data is defined with this ABNF [RFC5234] expression:
APPLICATION-DATA = 1*SYSLOG-FRAME
SYSLOG-FRAME = MSG-LEN SP SYSLOG-MSG
MSG-LEN = NONZERO-DIGIT *DIGIT
SP = %d32
NONZERO-DIGIT = %d49-57
DIGIT = %d48 / NONZERO-DIGIT
SYSLOG-MSG is defined in the syslog protocol [RFC5424].
4.3.1. Message Length π
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's no upper limit for a message length per se π But to set 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 π
4.4. Closure π«§
A transport sender MUST close the associated TLS connection if the connection isn't expected to deliver any syslog messages later. It MUST send a TLS close_notify alert before closing the connection. A transport sender (TLS client) MAY choose to not wait for the transport receiver's close_notify alert and simply close the connection, which makes an incomplete close on the transport receiver (TLS server) side. Once the transport receiver gets a close_notify from the transport sender, it MUST reply with a close_notify unless it becomes aware that the connection has already been closed by the transport sender (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 transport receiver MAY close the connection. The transport receiver (TLS 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, which makes an incomplete close on the transport sender side.
5. Security Policies π
Different environments have different security requirements, so they'd deploy different security policies. This section talks about some of the security policies that may be implemented by syslog transport receivers and syslog transport senders. The security policies describe the requirements for authentication and authorization. The list of policies here isn't exhaustive, and other policies MAY be implemented.
If the peer doesn't meet the requirements of the security policy, the TLS handshake MUST be aborted with an appropriate TLS alert.
5.1. End-Entity Certificate Based Authorization
In the simplest case, the transport sender and receiver are configured with the information needed to identify the valid end-entity certificates of their authorized peers.
Implementations MUST support specifying the authorized peers using certificate fingerprints, as described in Section 4.2.1 and Section 4.2.2.
5.2. Subject Name Authorization
Implementations MUST support certification path validation [RFC5280]. In addition, they MUST support specifying the authorized peers using locally configured host names, and matching the name against the certificate as follows.
- Implementations MUST support matching the locally configured host name against a dNSName in the subjectAltName extension field and SHOULD support checking the name against the common name portion of the subject distinguished name.
- The
*(ASCII 42) wildcard character is allowed in the dNSName of the subjectAltName extension (and in common name, if used to store the host name), but only as the left-most (least significant) DNS label in that value. This wildcard matches any left-most DNS label in the server name. That is, the subject*.example.commatches the server names a.example.com and b.example.com, but does not match example.com or a.b.example.com. Implementations MUST support wildcards in certificates as specified above, but MAY provide a configuration option to disable them. - Locally configured names MAY contain the wildcard character to match a range of values. The types of wildcards supported MAY be more flexible than those allowed in subject names, making it possible to support various policies for different environments. For example, a policy could allow for a trust-root-based authorization where all credentials issued by a particular CA trust root are authorized.
- If the locally configured name is an internationalized domain name, conforming implementations MUST convert it to the ASCII Compatible Encoding (ACE) format for performing comparisons, as specified in Section 7 of [RFC5280].
- Implementations MAY support matching a locally configured IP address against an iPAddress stored in the subjectAltName extension. In this case, the locally configured IP address is converted to an octet string as specified in [RFC5280], Section 4.2.1.6. A match occurs if this octet string is equal to the value of iPAddress in the subjectAltName extension.
5.3. Unauthenticated Transport Sender
In some environments the authenticity of syslog data is not important or is verifiable by other means, so transport receivers may accept data from any transport sender. To achieve this, the transport receiver can skip transport sender authentication (by not requesting client authentication in TLS or by accepting any certificate). In this case, the transport receiver is authenticated and authorized, however this policy does not protect against the threat of transport sender masquerade described in Section 2. The use of this policy is generally NOT RECOMMENDED for this reason.
5.4. Unauthenticated Transport Receiver
In some environments the confidentiality of syslog data is not important, so messages are sent to any transport receiver. To achieve this, the transport sender can skip transport receiver authentication (by accepting any certificate). While this policy does authenticate and authorize the transport sender, it does not protect against the threat of transport receiver masquerade described in Section 2, leaving the data sent vulnerable to disclosure and modification. The use of this policy is generally NOT RECOMMENDED for this reason.
5.5. Unauthenticated Transport Receiver and Sender
In environments where security is not a concern at all, both the transport receiver and transport sender can skip authentication (as described in Sections 5.3 and 5.4). This policy does not protect against any of the threats described in Section 2 and is therefore NOT RECOMMENDED.
6. Security Considerations π
This section describes security considerations in addition to those in [RFC5246].
6.1. Authentication and Authorization Policies
Section 5 discusses various security policies that may be deployed. The threats in Section 2 are mitigated only if both the transport sender and transport receiver are properly authenticated and authorized, as described in Sections 5.1 and 5.2. These are the RECOMMENDED configurations for a default policy.
If the transport receiver does not authenticate the transport sender, it may accept data from an attacker. Unless it has another way of authenticating the source of the data, the data should not be trusted. This is especially important if the syslog data is going to be used to detect and react to security incidents. The transport receiver may also increase its vulnerability to denial of service, resource consumption, and other attacks if it does not authenticate the transport sender. Because of the increased vulnerability to attack, this type of configuration is NOT RECOMMENDED.
If the transport sender does not authenticate the syslog transport receiver, then it may send data to an attacker. This may disclose sensitive data within the log information that is useful to an attacker, resulting in further compromises within the system. If a transport sender is operated in this mode, the data sent SHOULD be limited to data that is not valuable to an attacker. In practice this is very difficult to achieve, so this type of configuration is NOT RECOMMENDED.
Forgoing authentication and authorization on both sides allows for man-in-the-middle, masquerade, and other types of attacks that can completely compromise integrity and confidentiality of the data. This type of configuration is NOT RECOMMENDED.
6.2. Name Validation
The subject name authorization policy authorizes the subject in the certificate against a locally configured name. It is generally not appropriate to obtain this name through other means, such as DNS lookup, since this introduces additional security vulnerabilities.
6.3. Reliability
It should be noted that the syslog transport specified in this document does not use application-layer acknowledgments. TCP uses retransmissions to provide protection against some forms of data loss. However, if the TCP connection (or TLS session) is broken for some reason (or closed by the transport receiver), the syslog transport sender cannot always know what messages were successfully delivered to the syslog application at the other end.
7. IANA Considerations π
7.1. Port Number π
okay so IANA gave TCP port 6514 a spot in the "Registered Port Numbers" range, with the keyword "syslog-tls" attached π This is the default port for syslog over TLS, the way this document defines it. main character port, no cap π
8. Acknowledgments π«Ά
the authors are so grateful to Eric Rescorla, Rainer Gerhards, Tom Petch, Anton Okmianski, Balazs Scheidler, Bert Wijnen, Martin Schuette, Chris Lonvick, and the whole syslog working group for working through the issues with them πΈ they also want to thank Balazs Scheidler, Tom Petch, and some other people for helping out with the security threats of syslog π₯ David Harrington gets a shoutout for his super detailed reviews of the content and grammar of the document π and Pasi Eronen gets major love for his work on the certificate authentication and authorization sections ππ«Ά
9. References π
9.1. Normative References β¨
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 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.
[RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, March
2009.
9.2. Informative References π¦
[RFC4572] Lennox, J., "Connection-Oriented Media Transport over the
Transport Layer Security (TLS) Protocol in the Session
Description Protocol (SDP)", RFC 4572, July 2006.
[SYS-SIGN] Kelsey, J., "Signed syslog Messages", Work in Progress,
October 2007.
Authors' Addresses π
Fuyou Miao (editor)
Huawei Technologies
No. 3, Xinxi Rd
Shangdi Information Industry Base
Haidian District, Beijing 100085
P. R. China
Phone: +86 10 8288 2008
EMail: miaofy@huawei.com
URI: www.huawei.com
Yuzhi Ma (editor)
Huawei Technologies
No. 3, Xinxi Rd
Shangdi Information Industry Base
Haidian District, Beijing 100085
P. R. China
Phone: +86 10 8288 2008
EMail: myz@huawei.com
URI: www.huawei.com
Joseph Salowey (editor)
Cisco Systems, Inc.
2901 3rd. Ave
Seattle, WA 98121
USA
EMail: jsalowey@cisco.com
that's the whole spec, bestie πβ¨ thank you for reading all of it with me π§π
π¦ where this page comes from
- ietf: rfc5425 2009-03
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms