NETMOD WG Clyde Wildes Internet-Draft Cisco Systems Intended status: Informational Agrahara Kiran Koushik Expires: December 14, 2014 Brocade Communication Systems June 26, 2014 SYSLOG YANG model draft-wildes-netmod-syslog-model-00 Abstract This document describes a data model for Syslog protocol which is used to convey event notification messages. Status of This Memo 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 http://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 December 14, 2014. Copyright Notice Copyright (c) 2014 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 (http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Wildes, et al. Expires December 14, 2014 [Page 1] Internet-Draft SYSLOG YANG model June 2014 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 3. Design of the SYSLOG Model . . . . . . . . . . . . . . . . . 3 3.1. SYSLOG Module . . . . . . . . . . . . . . . . . . . . . . 4 4. SYSLOG YANG Models . . . . . . . . . . . . . . . . . . . . . 6 4.1. SYSLOG TYPES Module . . . . . . . . . . . . . . . . . . . 6 4.2. SYSLOG module . . . . . . . . . . . . . . . . . . . . . . 10 4.3. A SYSLOG Example . . . . . . . . . . . . . . . . . . . . 16 5. Security Considerations . . . . . . . . . . . . . . . . . . . 17 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 8. Change log [RFC Editor: Please remove] . . . . . . . . . . . 18 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 1. Introduction Operating systems, processes and applications generate messages indicating their own status or the occurance of events. These messages are useful for managing and/or debugging the network and its services. The BSD Syslog protocol is a widely adopted protocol that is used for transmission and processing of the messages. Since each process, application and operating system was written somewhat independently, there is little uniformity to the content of Syslog messages. For this reason, no assumption is made upon the formatting or contents of the messages. The protocol is simply designed to transport these event messages. No acknowledgement of the receipt is made. Essentially, a Syslog process receives messages (from the kernel, processes, applications or other Syslog processes) and processes those. The processing involves logging to a local file, displaying on console, user terminal, 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. We are using definitions of Syslog protocol from [RFC3164] in this draft. Wildes, et al. Expires December 14, 2014 [Page 2] Internet-Draft SYSLOG YANG model June 2014 1.1. Definitions and Acronyms IP: Internet Protocol IPv4: Internet Protocol version 4 IPv6: Internet Protocol version 6 UDP: User Datagram Protocol VRF: Virtual Routing and Forwarding 2. Problem Statement This document defines a YANG [RFC6020] configuration data model that may be used to monitor and control one or more syslog processes running on a system. YANG models can be used with network management agents such as NETCONF [RFC6241] to install, manipulate, and delete the configuration of network devices. This module makes use of the YANG "feature" construct which allows implementations to support only those Syslog features that lie within their capabilities. 3. Design of the SYSLOG Model The syslog model was designed by comparing various syslog features implemented by various vendors' in different implementations. This draft addresses the common leafs between all vendors and creates a common model, which can be augmented with proprietary features, if necessary. The base model is designed to be very simple for maximum flexibility. Syslog consists of message producers, a group level suppression filter, and message distributors. The following digram shows syslog messages flowing from a message producer, through the group level suppression filter, and if passed by the group filter to message distributors where further suppression filtering can take place. Wildes, et al. Expires December 14, 2014 [Page 3] Internet-Draft SYSLOG YANG model June 2014 Message Producers +-------------+ +-------------+ +-------------+ +-------------+ | Various | | OS | | | | Remote | | Components | | Kernel | | Line Cards | | Servers | +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ | SNMP | | Interface | | Standby | | Syslog | | Events | | Events | | Supervisor | | Itself | +-------------+ +-------------+ +-------------+ +-------------+ | | +----------------------------------------------------------------+ | | v Group Level Suppression +------------------------------+ | Filter by message facility | | and message severity | +------------------------------+ | | | +-----+---------+----------------+-----------------+ | | | | v v v v Message Distributors +-------------+ +-------------+ +-------------+ +-------------+ | | | | | User | | Remote | | Console | | Log File(s) | | Terminals | | Servers | +-------------+ +-------------+ +-------------+ +-------------+ The leaves in the base syslog model correspond to the group level suppression filter and each message distributor: - console - log file(s) - user terminals - remote server(s). Optional features are used to specified fields that are not present in all vendor configurations. Wildes, et al. Expires December 14, 2014 [Page 4] Internet-Draft SYSLOG YANG model June 2014 3.1. SYSLOG Module module: ietf-syslog +--rw syslog +--rw global-logging | +--rw logging-severities [facility] | +--rw facility identityref | +--rw severity? syslogtypes:Severity +--rw console-logging | +--rw (logging-level-scope)? | +--:(all-facilities) | | +--rw logging-severity? syslogtypes:Severity | +--:(facility) | +--rw logging-severities [facility] | +--rw facility identityref | +--rw severity? syslogtypes:Severity +--rw file-logging | +--rw file-name string | +--rw file-size? uint32 | +--rw (logging-scope)? | +--:(all-facilities) | | +--rw logging-severity? syslogtypes:Severity | +--:(facility) | +--rw logging-severities [facility] | +--rw facility identityref | +--rw severity? syslogtypes:Severity +--rw remote-logging | +--rw remote-logging-destination [destination] | +--rw destination string | +--rw logging-severities [facility] | | +--rw facility identityref | | +--rw severity? syslogtypes:Severity | +--rw source-interface? string | +--rw vrf-name? string +--rw terminal-logging +--rw (user-scope)? +--:(all-users) | +--rw all-users | +--rw (logging-scope)? | +--:(all-facilities) | | +--rw logging-severity? syslogtypes:Severity | +--:(facility) | +--rw logging-severities [facility] | +--rw facility identityref | +--rw severity? syslogtypes:Severity +--:(per-user) +--rw user-name [uname] +--rw uname string +--rw (logging-scope)? +--:(all-facilities) | +--rw logging-severity? syslogtypes:Severity +--:(facility) +--rw logging-severities [facility] +--rw facility identityref +--rw severity? syslogtypes:Severity Wildes, et al. Expires December 14, 2014 [Page 5] Internet-Draft SYSLOG YANG model June 2014 4. SYSLOG YANG Models 4.1. SYSLOG-TYPES module module ietf-syslog-types { namespace "urn:ietf:params:xml:ns:yang:ietf-syslog-types"; prefix syslogtypes; organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: WG Chair: Juergen Schoenwaelder WG Chair: Tom Nadeau Editor: Clyde Wildes Editor: Agrahara Kiran Koushik "; description "This module contains a collection of YANG type definitions for Syslog."; revision 2014-06-03 { description "Version 1.0"; } typedef Severity { type enumeration { enum "emergency" { value 0; description "Emergency Level Msg"; } enum "alert" { value 1; description "Alert Level Msg"; } Wildes, et al. Expires December 14, 2014 [Page 6] Internet-Draft SYSLOG YANG model June 2014 enum "critical" { value 2; description "Critical Level Msg"; } enum "error" { value 3; description "Error Level Msg"; } enum "warning" { value 4; description "Warning Level Msg"; } enum "notice" { value 5; description "Notification Level Msg"; } enum "info" { value 6; description "Informational Level Msg"; } enum "debug" { value 7; description "Debugging Level Msg"; } } description "The definitions for Syslog message severity."; } identity syslog-facility { description "The base identity to represent syslog facilities"; } identity kern { base syslog-facility; } Wildes, et al. Expires December 14, 2014 [Page 7] Internet-Draft SYSLOG YANG model June 2014 identity user { base syslog-facility; } identity mail { base syslog-facility; } identity daemon { base syslog-facility; } identity auth { base syslog-facility; } identity syslog { base syslog-facility; } identity lpr { base syslog-facility; } identity news { base syslog-facility; } identity uucp { base syslog-facility; } identity cron { base syslog-facility; } identity authpriv { base syslog-facility; } identity ftp { base syslog-facility; } identity ntp { base syslog-facility; } identity audit { base syslog-facility; } Wildes, et al. Expires December 14, 2014 [Page 8] Internet-Draft SYSLOG YANG model June 2014 identity console { base syslog-facility; } identity cron2 { base syslog-facility; } identity local0 { base syslog-facility; } identity local1 { base syslog-facility; } identity local2 { base syslog-facility; } identity local3 { base syslog-facility; } identity local4 { base syslog-facility; } identity local5 { base syslog-facility; } identity local6 { base syslog-facility; } identity local7 { base syslog-facility; } } Wildes, et al. Expires December 14, 2014 [Page 9] Internet-Draft SYSLOG YANG model June 2014 4.2. SYSLOG module module ietf-syslog { namespace "urn:ietf:params:xml:ns:yang:ietf-syslog"; prefix syslog; import ietf-syslog-types { prefix syslogtypes; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: WG Chair: Juergen Schoenwaelder WG Chair: Tom Nadeau Editor: Clyde Wildes Editor: Agrahara Kiran Koushik "; description "This module contains a collection of YANG definitions for Syslog configuration."; revision 2014-06-10 { description "Initial revision."; } feature global-logging { description "This feature represents the ability to adjust log message severity per logging facility on the global level."; } feature console-facility-logging-config { description "This feature represents the ability to adjust log message severity per logging facility for console logging."; } feature file-logging { description "This feature represents the ability to log messages into a file."; } Wildes, et al. Expires December 14, 2014 [Page 10] Internet-Draft SYSLOG YANG model June 2014 feature file-facility-logging-config { description "This feature represents the ability to adjust log message severity per logging facility for file logging."; } feature terminal-facility-logging-config { description "This feature represents the ability to adjust log message severity per logging facility for terminal logging."; } feature terminal-facility-user-logging-config { description "This feature represents the ability to adjust log message settings for individual terminal users."; } feature use-vrf { description "This feature allows logging of messages to a particular VRF."; } grouping facility-logging { description "This grouping defines a list of facility-severity pairs. Messages from a facility in the list that have the corresponding specified severity level or higher will be logged."; list logging-severities { description "This list describes a collection of Syslog facilities."; key "facility"; leaf facility { type identityref { base syslogtypes:syslog-facility; } description "The leaf uniqueuely identifies a Syslog facility."; } leaf severity { type syslogtypes:Severity; description "This leaf specifies the severity of Syslog messages for this facility."; } } } Wildes, et al. Expires December 14, 2014 [Page 11] Internet-Draft SYSLOG YANG model June 2014 container syslog { description "This container describes the configuration parameters for Syslog."; config true; container global-logging { if-feature global-logging; description "This container describes the configuration parameters for global logging."; uses facility-logging; } container console-logging { description "This container describes the configuration parameters for console logging."; choice logging-level-scope { description "This choice describes the option to specify all facilities or a specific facility."; case all-facilities { description "This case specifies all facilities."; leaf logging-severity { type syslogtypes:Severity; description "This leaf specifies the severity of Syslog messages for all facilities."; } } case facility { description "This case specifies a specific facility."; if-feature console-facility-logging-config; uses facility-logging; } } } Wildes, et al. Expires December 14, 2014 [Page 12] Internet-Draft SYSLOG YANG model June 2014 container file-logging { if-feature file-logging; description "This container describes the configuration parameters for file logging configuration."; leaf file-name { mandatory true; type string; description "This leaf specifies the name of the log file."; } leaf file-size { type uint32; description "This leaf specifies the log file size."; } choice logging-scope { description "This choice describes the option to specify all facilities or a specific facility."; case all-facilities { description "This case specifies all facilities."; leaf logging-severity { type syslogtypes:Severity; description "This leaf specifies the severity of Syslog messages for all facilities."; } } case facility { description "This case specifies a specific facility."; if-feature file-facility-logging-config; uses facility-logging; } } } container remote-logging { description "This container describes the configuration parameters for the remote logging configuration."; list remote-logging-destination { description "This list describes a collection of remote logging destinations."; key "destination"; leaf destination { type string; description "The leaf uniquely specifies the address of the remote host. One of the following must be specified: an ipv4 address, an ipv6 address, or a host name."; } Wildes, et al. Expires December 14, 2014 [Page 13] Internet-Draft SYSLOG YANG model June 2014 uses facility-logging; leaf source-interface { description "This leaf sets the source interface for the remote Syslog server. Either the interface name or the interface IP address can be specified."; type string; } leaf vrf-name { if-feature use-vrf; type string; description "This leaf specifies the name of the virtual routing facility (VRF)."; } } } container terminal-logging { description "This container describes the configuration parameters for the terminal logging configuration."; choice user-scope { description "This choice describes the option to specify all users or a specific user."; case all-users { description "This case specifies all users."; container all-users { choice logging-scope { description "This choice describes the option to specify all facilities or a specific facility."; case all-facilities { description "This case specifies all facilities."; leaf logging-severity { type syslogtypes:Severity; description "This leaf specifies the severity of Syslog messages for all facilities."; } } Wildes, et al. Expires December 14, 2014 [Page 14] Internet-Draft SYSLOG YANG model June 2014 case facility { description "This case specifies a specific facility."; if-feature terminal-facility-logging-config; uses facility-logging; } } } } case per-user { description "This case specifies a specific user."; if-feature terminal-facility-user-logging-config; list user-name { description "This list describes a collection of user names."; key "uname"; leaf uname { type string; description "This leaf uniquely describes a user name."; } choice logging-scope { description "This choice describes the option to specify all facilities or a specific facility."; case all-facilities { description "This case specifies all facilities."; leaf logging-severity { type syslogtypes:Severity; description "This leaf specifies the severity of Syslog messages for all facilities."; } } case facility { description "This case specifies a specific facility."; if-feature terminal-facility-logging-config; uses facility-logging; } } } } } } } } Wildes, et al. Expires December 14, 2014 [Page 15] Internet-Draft SYSLOG YANG model June 2014 4.3. A SYSLOG Example Requirement: Enable global logging of two facilities: kern - severity critical(1) auth - severity error(3) Enable console logging of syslogs of severity critical(1) Here is the example syslog configuration xml: syslogtypes:kern syslogtypes:critical syslogtypes:auth syslogtypes:error syslogtypes:critical Wildes, et al. Expires December 14, 2014 [Page 16] Internet-Draft SYSLOG YANG model June 2014 5. Security Considerations The YANG module defined in this memo is designed to be accessed via the NETCONF protocol [RFC6241] [RFC6241]. The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH [RFC6242] [RFC6242]. The NETCONF access control model [RFC6536] [RFC6536] provides the means to restrict access for particular NETCONF users to a pre-configured subset of all available NETCONF protocol operations and content. There are a number of data nodes defined in the YANG module which are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., ) to these data nodes without proper protection can have a negative effect on network operations. TBD: List specific Subtrees and data nodes and their sensitivity/ vulnerability. Wildes, et al. Expires December 14, 2014 [Page 17] Internet-Draft SYSLOG YANG model June 2014 6. IANA Considerations This document registers a URI in the IETF XML registry [RFC3688] [RFC3688]. Following the format in RFC 3688, the following registration is requested to be made: URI: urn:ietf:params:xml:ns:yang:syslog Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. This document registers a YANG module in the YANG Module Names registry [RFC6020]. name: syslog namespace: urn:ietf:params:xml:ns:yang:syslog prefix: syslog reference: RFC XXXX 7. Acknowledgements 8. Change log [RFC Editor: Please remove] 9. References [RFC3164] Lonvick, C., "The BSD syslog Protocol", BCP 81, RFC 3164, August 2001. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011. [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, June 2011. Wildes, et al. Expires December 14, 2014 [Page 18] Internet-Draft SYSLOG YANG model June 2014 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, March 2012. Authors' Addresses Clyde Wildes Cisco Systems Inc. Email: cwildes@cisco.com Kiran Agrahara Sreenivasa Brocade Communications Systems Email: kkoushik@brocade.com Wildes, et al. Expires December 14, 2014 [Page 19]