This document defines a YANG data model for the configuration
of a syslog process. It is intended that this model be used by
vendors who implement syslog collectors in their systems.¶
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF). Note that other groups may also distribute working
documents as Internet-Drafts. The list of current Internet-Drafts is
at https://datatracker.ietf.org/drafts/current/.¶
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."¶
This Internet-Draft will expire on 22 March 2025.¶
Copyright (c) 2024 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
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Revised BSD License.¶
This document defines a YANG [RFC7950]
configuration
data model that may be used to configure the syslog feature running on a
system. YANG models can be used with network management protocols
such as NETCONF [RFC6241]
to install, manipulate, and
delete the configuration of network devices.¶
The data model makes use of the YANG "feature" construct which allows
implementations to support only those syslog features that lie within
their capabilities.¶
This module can be used to configure the syslog application
conceptual layers as implemented on the syslog collector.¶
Essentially, a syslog process receives messages (from the kernel,
processes, applications or other syslog processes) and processes them.
The processing may involve logging to a local file, and/or displaying on
console, and/or relaying to syslog processes on other machines. The
processing is determined by the "facility" that originated the message
and the "severity" assigned to the message by the facility.¶
Such definitions of syslog protocol are defined in
[RFC5424]
, and are used in this RFC.¶
The YANG model in this document conforms to the Network Management
Datastore Architecture defined in
[RFC8342].¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119][RFC8174]
when, and only
when, they appear in all capitals, as shown here.¶
The following terms are used throughout this document:¶
Originator: an "originator" refers to an entity that generates
syslog content to be carried in a message. The term is defined
in [RFC5424]¶
Relay: A "relay" is an entity that forwards syslog messages. It
accepts messages from originators or other relays and sends them
to collectors or other relays. The term is defined in [RFC5424]¶
Collector: A "collector" gathers syslog content for
further analysis. The term is defined in [RFC5424].¶
Action: The term "action" refers to the processing that takes
place for each syslog message received.¶
This document contains many placeholder values that need to be
replaced with finalized values at the time of publication. This note
summarizes all of the substitutions that are needed. No other RFC
Editor instructions are specified elsewhere in this document.¶
Artwork in this document contains shorthand references to drafts in
progress. Please apply the following replacements:¶
I-D.ietf-netconf-crypto-types -->
the assigned RFC value for draft-ietf-netconf-crypto-types¶
I-D.ietf-netconf-tls-client-server
--> the assigned RFC value for
draft-ietf-netconf-tls-client-server¶
The syslog model was designed by comparing various syslog features
implemented by various vendors' in different implementations.¶
The module defines leafs that are common across
implementations. Its simple design is meant to offer maximum
flexibility. However, not all optional features defined in this
document are present in all vendor implementations. Vendors
therefore, need to use the feature statements to specify the
optional features they support. At the same time, vendors can
augment the model to add proprietary features. Extending Facilities (Appendix B.1) shows an
examples of how that can be realized.¶
Syslog consists of originators and collectors. The following diagram
shows syslog messages flowing from originators, to collectors where
filtering can take place.¶
Within each action, a selector is used to filter syslog messages. A
selector consists of a list of one or more filters specified by
facility-severity pairs, and, if supported via the select-match feature,
an optional regular expression pattern match that is performed on the [RFC5424]
field.¶
There is an element of facility-list (F, S) where
the message facility matches F
and the message severity matches S
and/or the message text matches the regex pattern (if it
is present)
The facility is one of a specific syslog-facility, or all
facilities.¶
The model offers the ability to select a transport that a user
might want to use for a remote relay or collector. The choice
is between using UDP, or TLS based sessions. The user can
configure multiple relays or collectors, but they have to use
the same transport.¶
The severity is one of type syslog-severity, all severities, or none.
None is a special case that can be used to disable a filter. When
filtering severity, the default comparison is that messages of the
specified severity and higher are selected to be logged. This is shown
in the model as "default equals-or-higher". This behavior can be altered
if the select-adv-compare feature is enabled to specify a compare
operation and an action. Compare operations are: "equals" to select
messages with this single severity, or "equals-or-higher" to select
messages of the specified severity and higher. Actions are used to log
the message, block the message, or stop the message from being logged.¶
Many vendors extend the list of facilities available for
logging in their implementation. An example is included in
Extending
Facilities (Appendix B.1).¶
The authors wish to thank the following who commented on this
proposal:¶
Andy Bierman, Martin Bjorklund, Alex Campbell, Alex Clemm,
Francis Dupont, Jim Gibson, Jeffrey Haas, Bob Harold, John
Heasley, Giles Heron, Lisa Huang, Mahesh Jethanandani, Warren
Kumari, Jeffrey K Lange, Jan Lindblad, Chris Lonvick, Alexey
Melnikov, Kathleen Moriarty, Tom Petch, Adam Roach, Juergen
Schoenwaelder, Phil Shafer, Yaron Sheffer, Jason Sterne, Peter
Van Horne, Kent Watsen, Bert Wijnen, Dale R Worley, and
Aleksandr Zhdankin.¶
This document registers one YANG module in the YANG Module Names
registry [RFC8525]
. Following the format in [RFC7950]
,
the following registration is requested:¶
The "ietf-syslog" YANG module specified in this document defines a
data model that is designed to be accessed via YANG-based
management protocols such as NETCONF [RFC6241] and
RESTCONF [RFC8040]. These protocols have
mandatory-to-implement secure transport layers (e.g., Secure Shell
(SSH) [RFC4252], TLS [RFC8446], and
QUIC [RFC9000]) and mandatory-to-implement mutual
authentication.¶
The NETCONF access control model [RFC8341] provides
the means to restrict access for particular NETCONF or RESTCONF
users to a preconfigured subset of all available NETCONF or
RESTCONF protocol operations and content.¶
There are a number of data nodes defined in this YANG module that
are writable/creatable/deletable (i.e., config true, which is the
default). These data nodes should be considered sensitive or
vulnerable in all network environments. Logging in particular is
used to assess the state of systems and can be used to indicate a
network compromise. If logging were to be disabled through
malicious means, attacks may not be readily detectable. Therefore
write operations (e.g., edit-config) to these data nodes without
proper protection can have a negative effect on network operations
and on network security.¶
In addition there are data nodes that require careful analysis and
review. These are the subtrees and data nodes and their
sensitivity/vulnerability:¶
facility-filter/pattern-match:
When writing
this node, implementations MUST ensure that the regular
expression pattern match is not constructed to cause a regular
expression denial of service attack due to a pattern that
causes the regular expression implementation to work very
slowly (exponentially related to input size).¶
remote/destination/signing/cert-signer:
When
writing this subtree, implementations MUST NOT specify a
private key that is used for any other purpose.¶
Some of the readable data nodes in this YANG module may be
considered sensitive or vulnerable in some network
environments. It is thus important to control read access (e.g.,
via get, get-config, or notification) to these data nodes. These
are the subtrees and data nodes and their
sensitivity/vulnerability:¶
remote/destination/transport:
This subtree
contains information about other hosts in the network, the
services available on those hosts, and the TLS transport
certificate properties if TLS is selected as the transport
protocol. Knowing that a service like syslog (udp/514) is
enabled on the host, will allow a malicious user to spam the
host on that port.¶
remote/destination/signing:
This subtree contains
information about the syslog message signing properties
including signing certificate information.¶
There are no RPC operations defined in this YANG module.¶
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) Authentication Protocol", RFC 4252, DOI 10.17487/RFC4252, , <https://www.rfc-editor.org/info/rfc4252>.
Miao, F., Ed., Ma, Y., Ed., and J. Salowey, Ed., "Transport Layer Security (TLS) Transport Mapping for Syslog", RFC 5425, DOI 10.17487/RFC5425, , <https://www.rfc-editor.org/info/rfc5425>.
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, , <https://www.rfc-editor.org/info/rfc6241>.
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8341]
Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, , <https://www.rfc-editor.org/info/rfc8341>.
Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10.17487/RFC8407, , <https://www.rfc-editor.org/info/rfc8407>.
Bierman, A., Bjorklund, M., Schoenwaelder, J., Watsen, K., and R. Wilton, "YANG Library", RFC 8525, DOI 10.17487/RFC8525, , <https://www.rfc-editor.org/info/rfc8525>.
[RFC9000]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10.17487/RFC9000, , <https://www.rfc-editor.org/info/rfc9000>.
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, , <https://www.rfc-editor.org/info/rfc8342>.
Many vendors extend the list of facilities available for logging in
their implementation. Additional facilities may not work with the
syslog protocol as defined in [RFC5424] and hence such facilities
apply for local syslog-like logging functionality.¶
The following is an example that shows how additional facilities
could be added to the list of available facilities (in this example
two facilities are added):¶
[note: '\' line wrapping for formatting only]
module example-vendor-syslog-types {
namespace "http://example.com/ns/vendor-syslog-types";
prefix vendor-syslogtypes;
import ietf-syslog {
prefix syslog;
}
organization
"Example, Inc.";
contact
"Example, Inc.
Customer Service
E-mail: [email protected]";
description
"This module contains a collection of vendor-specific YANG type
definitions for SYSLOG.";
revision 2024-03-19 {
description
"Version 1.0";
reference
"Vendor SYSLOG Types: SYSLOG YANG Model";
}
identity vendor_specific_type_1 {
base syslog:syslog-facility;
description
"Adding vendor specific type 1 to syslog-facility";
}
identity vendor_specific_type_2 {
base syslog:syslog-facility;
description
"Adding vendor specific type 2 to syslog-facility";
}
}
Terminal output with requirements more complex than the console
subtree currently provides, are expected to be supported via vendor
extensions rather than handled via the file subtree.¶
The syslog/file/log-file/file-rotation container contains
configuration parameters for syslog file rotation. This section
describes how these fields might be used by an implementer to name
syslog files in a rotation process. This information is offered as
an informative guide only.¶
When an active syslog file with a name specified by log-file/name,
reaches log-file/max-file-size and/or syslog events arrive after the
period specified by log-file/rollover, the logging system can close
the file, can compress it, and can name the archive file <log-file/
name>.0.gz. The logging system can then open a new active syslog
file <log-file/name>.¶
When the new syslog file reaches either of the size limits referenced
above, <log-file/name>.0.gz can be renamed <log-file/name>.1.gz and
the new syslog file can be closed, compressed and renamed <log-file/
name>.0.gz. Each time that a new syslog file is closed, each of the
prior syslog archive files named <log-file/name>.<n>.gz can be
renamed to <log-file/name>.<n + 1>.gz.¶
Removal of archive log files could occur when either or both:¶
- log-file/number-of-files specified - the logging system can create
up to log-file/number-of-files syslog archive files after which, the
contents of the oldest archived file could be overwritten.¶
- log-file/retention specified - the logging system can remove those
syslog archive files whose file expiration time (file creation time
plus the specified log-file/retention time) is prior to the current
time.¶