This document defines a YANG data model for the configuration of a
syslog process. It is intended this model be used by vendors who
implement syslog 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 7 October 2022.¶
Copyright (c) 2022 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 target system.¶
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 term "originator" is defined in [RFC5424]: an
"originator" generates syslog content to be carried in a message.¶
The term "relay" is defined in [RFC5424]: a "relay"
forwards messages, accepting messages from originators or other relays
and sending them to collectors or other relays¶
The term "collectors" is defined in [RFC5424]: a
"collector" gathers syslog content for further analysis.¶
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.¶
This document addresses the common leafs between implementations and
creates a common model, which can be augmented with proprietary
features, if necessary. This model is designed to be very simple for
maximum flexibility.¶
Some optional features are defined in this document to specify
functionality that is present in specific vendor configurations.¶
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 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 or block 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 A.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 [RFC7895]. Following the format in [RFC7950],
the following registration is requested:¶
The YANG module defined in this document is designed to be accessed
via YANG based management protocols, such as NETCONF [RFC6241]
and RESTCONF [RFC8040]. Both of these
protocols have mandatory-to-implement secure transport layers (e.g.,
SSH, TLS) with mutual authentication.¶
The NETCONF access control model (NACM) [RFC6536]
provides the means to restrict access for particular users to a
pre-configured subset of all available 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, and the TLS transport
certificate properties if TLS is selected as the transport
protocol.¶
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>.
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>.
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>.
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>.
[RFC6536]
Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, DOI 10.17487/RFC6536, , <https://www.rfc-editor.org/info/rfc6536>.
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):¶
module example-vendor-syslog-types {
namespace "http://example.com/ns/vendor-syslog-types";
prefix vendor-syslogtypes;
import ietf-syslog {
prefix syslogtypes;
}
organization "Example, Inc.";
contact
"Example, Inc.
Customer Service
E-mail: syslog-yang@example.com";
description
"This module contains a collection of vendor-specific YANG type
definitions for SYSLOG.";
revision 2017-08-11 {
description
"Version 1.0";
reference
"Vendor SYSLOG Types: SYSLOG YANG Model";
}
identity vendor_specific_type_1 {
base syslogtypes:syslog-facility;
description
"Adding vendor specific type 1 to syslog-facility";
}
identity vendor_specific_type_2 {
base syslogtypes: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.¶