diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/.conf.py.swp | bin | 28672 -> 0 bytes | |||
-rw-r--r-- | source/conf.py | 4 | ||||
-rw-r--r-- | source/configuration/modules/imdtls.rst | 322 | ||||
-rw-r--r-- | source/configuration/modules/omdtls.rst | 268 | ||||
-rw-r--r-- | source/configuration/modules/omfile.rst | 14 | ||||
-rw-r--r-- | source/configuration/modules/omhttp.rst | 125 |
6 files changed, 727 insertions, 6 deletions
diff --git a/source/.conf.py.swp b/source/.conf.py.swp Binary files differdeleted file mode 100644 index a04f13c..0000000 --- a/source/.conf.py.swp +++ /dev/null diff --git a/source/conf.py b/source/conf.py index 38a8d47..7a1de63 100644 --- a/source/conf.py +++ b/source/conf.py @@ -92,8 +92,8 @@ rst_epilog = """ # real values will be generated dynamically from info in the repo. If the # user builds the docs from "bare" sources not yet processed ############################################################################### -version = '8.2402' -release = '8.2402.0' +version = '8.2404' +release = '8.2404.0' #release = version + ' daily stable' # For this to be true, it means that we are not attempting to build from diff --git a/source/configuration/modules/imdtls.rst b/source/configuration/modules/imdtls.rst new file mode 100644 index 0000000..5b3fe7b --- /dev/null +++ b/source/configuration/modules/imdtls.rst @@ -0,0 +1,322 @@ +********************************************************** +imdtls: Input Module for DTLS Protocol over UDP +********************************************************** + +=========================== =========================================================================== +**Module Name:** **imdtls** +**Author:** Andre Lorbach <alorbach@adiscon.com> +**Available since:** v8.2402.0 +=========================== =========================================================================== + + +Purpose +======= + +The imdtls module for rsyslog is designed to securely transport syslog messages over the network using +the Datagram Transport Layer Security (DTLS) protocol. This module leverages the robustness and +security features of OpenSSL to provide an encrypted transport mechanism for syslog messages via UDP. + +DTLS, being an adaptation of TLS for datagram-based protocols, offers integrity, authenticity, and +confidentiality for messages in transit. The imdtls module is particularly useful in environments +where secure transmission of log data is crucial, such as in compliance-driven industries or when +transmitting across untrusted networks. + +By operating over UDP, imdtls offers the benefits of lower latency and reduced protocol overhead +compared to TCP-based transport, making it well-suited for high-throughput logging scenarios or in +networks where connection-oriented protocols may face challenges. + + +Requirements +============ + +To receive messages by DTLS you will need to fulfill the following requirements: + +- OpenSSL 1.0.2 or Higher + + +Configuration Parameters +======================== + +.. note:: + + Parameter names are case-insensitive. + + +Action Parameters +----------------- + +address +^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + +Specifies the IP address on where the imdtls module will listen for +incoming syslog messages. By default the module will listen on all available +network connections. + + +port +^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "4433", "yes", "none" + +Specifies the UDP port to which the imdtls module will bind and listen for +incoming connections. The default port number for DTLS is 4433. + + +timeout +^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "1800", "no", "none" + +Specifies the DTLS session timeout. As DTLS runs on transportless UDP protocol, there are no +automatic detections of a session timeout. The input will close the DTLS session if no data +is received from the client for the configured timeout period. The default is 1800 seconds +which is equal to 30 minutes. + + +name +^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive", "Available since" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + +Unique name to the input module instance. This is useful for identifying the source of +messages when multiple input modules are used. + + +ruleset +^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + +Determines the ruleset to which the imdtls input will be bound to. This can be +overridden at the instance level. + + +tls.AuthMode +^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +Sets the mode used for mutual authentication. + +Supported values are either "*fingerprint*\ ", "*name"* or "*certvalid*\ ". + +Fingerprint: Authentication based on certificate fingerprint. +Name: Authentication based on the subjectAltName and, as a fallback, the +subject common name. +Certvalid: Requires a valid certificate for authentication. +Certanon: Anything else will allow anonymous authentication (no client certificate). + + +tls.cacert +^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +The CA certificate that is being used to verify the client certificates. +Has to be configured if tls.authmode is set to "*fingerprint*\ ", "*name"* or "*certvalid*\ ". + + +tls.mycert +^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +Specifies the certificate file used by imdtls. +This certificate is presented to peers during the DTLS handshake. + + +tls.myprivkey +^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +The private key file corresponding to tls.mycert. +This key is used for the cryptographic operations in the DTLS handshake. + + +tls.tlscfgcmd +^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +Used to pass additional OpenSSL configuration commands. This can be used to fine-tune the OpenSSL +settings by passing configuration commands to the openssl libray. +OpenSSL Version 1.0.2 or higher is required for this feature. +A list of possible commands and their valid values can be found in the documentation: +https://www.openssl.org/docs/man1.0.2/man3/SSL_CONF_cmd.html + +The setting can be single or multiline, each configuration command is separated by linefeed (\n). +Command and value are separated by equal sign (=). Here are a few samples: + +Example 1 +--------- + +This will allow all protocols except for SSLv2 and SSLv3: + +.. code-block:: none + + tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3" + + +Example 2 +--------- + +This will allow all protocols except for SSLv2, SSLv3 and TLSv1. +It will also set the minimum protocol to TLSv1.2 + +.. code-block:: none + + tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3,-TLSv1 + MinProtocol=TLSv1.2" + + +TLS.PermittedPeer +^^^^^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "array", "none", "no", "none" + +PermittedPeer places access restrictions on this listener. Only peers which +have been listed in this parameter may connect. The certificate presented +by the remote peer is used for it's validation. + +The *peer* parameter lists permitted certificate fingerprints. Note +that it is an array parameter, so either a single or multiple +fingerprints can be listed. When a non-permitted peer connects, the +refusal is logged together with it's fingerprint. So if the +administrator knows this was a valid request, he can simply add the +fingerprint by copy and paste from the logfile to rsyslog.conf. + +To specify multiple fingerprints, just enclose them in braces like +this: + +.. code-block:: none + + tls.permittedPeer=["SHA1:...1", "SHA1:....2"] + +To specify just a single peer, you can either specify the string +directly or enclose it in braces. You may also use wildcards to match +a larger number of permitted peers, e.g. ``*.example.com``. + +When using wildcards to match larger number of permitted peers, please +know that the implementation is similar to Syslog RFC5425 which means: +This wildcard matches any left-most DNS label in the server name. +That is, the subject ``*.example.com`` matches the server names ``a.example.com`` +and ``b.example.com``, but does not match ``example.com`` or ``a.b.example.com``. + + +.. _statistics-counter_imdtls_label: + +Statistic Counter +================= + +This plugin maintains global :doc:`statistics <../rsyslog_statistic_counter>` for imdtls that +accumulate all action instances. The statistic origin is named "imdtls" with following counters: + + +- **submitted** - This counter tracks the number of log messages that have been received by the current + input instance. + +These statistics counters are updated in real-time by the rsyslog output module as log data is processed, +and they provide valuable information about the performance and operation of the input module. + +For multiple actions using statistics callback, there will be one record for each action. + +.. _imdtls-examples-label: + +Examples +======== + +Example 1: Basic +---------------- + +The following sample does the following: + +- loads the imdtls module +- outputs all logs to File + +.. code-block:: none + + module(load="imdtls") + input(type="imdtls" port="4433") + + action( type="omfile" file="/var/log/dtls.log") + + +Example 2: Require valid certificate +------------------------------------ + +The following sample does the following: + +- loads the imdtls module +- Validates the client certificate, requires same CA for client and server certificate +- outputs all logs to File + +.. code-block:: none + + module(load="imdtls") + input(type="imdtls" + port="4433" + tls.cacert="/etc/private/ca.pem" + tls.mycert="/etc/private/cert.pem" + tls.myprivkey="/etc/private/key.pem" + tls.authmode="certvalid" ) + + action( type="omfile" file="/var/log/dtls.log") + diff --git a/source/configuration/modules/omdtls.rst b/source/configuration/modules/omdtls.rst new file mode 100644 index 0000000..ccf9be0 --- /dev/null +++ b/source/configuration/modules/omdtls.rst @@ -0,0 +1,268 @@ +********************************************************** +omdtls: Output Module for DTLS Protocol over UDP +********************************************************** + +=========================== =========================================================================== +**Module Name:** **omdtls** +**Author:** Andre Lorbach <alorbach@adiscon.com> +**Available since:** v8.2402.0 +=========================== =========================================================================== + + +Purpose +======= + +The omdtls module for rsyslog is designed to securely transmit syslog data over a network using +the Datagram Transport Layer Security (DTLS) protocol. This module leverages the robustness and +security features of OpenSSL to provide an encrypted transport mechanism for syslog messages via UDP. + +DTLS, being an adaptation of TLS for datagram-based protocols, offers integrity, authenticity, and +confidentiality for messages in transit. The omdtls module is particularly useful in environments +where secure transmission of log data is crucial, such as in compliance-driven industries or when +transmitting across untrusted networks. + +By operating over UDP, omdtls offers the benefits of lower latency and reduced protocol overhead +compared to TCP-based transport, making it well-suited for high-throughput logging scenarios or in +networks where connection-oriented protocols may face challenges. + + +Requirements +============ + +To send messages by DTLS you will need to fulfill the following requirements: + +- OpenSSL 1.0.2 or Higher + + +Configuration Parameters +======================== + +.. note:: + + Parameter names are case-insensitive. + +Module Parameters +----------------- + +Template +^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "RSYSLOG_TraditionalForwardFormat", "no", "``$ActionForwardDefaultTemplateName``" + +Sets a non-standard default template for this module. + + +Action Parameters +----------------- + +target +^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + +Specifies the target hostname or IP address to send log messages to. + + +port +^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "4433", "yes", "none" + +Defines the port number on the target host where log messages will be sent. +The default port number for DTLS is 4433. + + +tls.AuthMode +^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +Sets the mode of authentication to be used. +Supported values are either "*fingerprint*\ ", "*name"* or "*certvalid*\ ". + +Fingerprint: Authentication based on certificate fingerprint. +Name: Authentication based on the subjectAltName and, as a fallback, the +subject common name. +Certvalid: Requires a valid certificate for authentication. +Certanon: Anything else will allow anonymous authentication (no client certificate). + + +tls.cacert +^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +The CA certificate that is being used to verify the client certificates. +Has to be configured if tls.authmode is set to "*fingerprint*\ ", "*name"* or "*certvalid*\ ". + + +tls.mycert +^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +Specifies the certificate file used by omdtls. +This certificate is presented to peers during the DTLS handshake. + + +tls.myprivkey +^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +The private key file corresponding to tls.mycert. +This key is used for the cryptographic operations in the DTLS handshake. + + +tls.tlscfgcmd +^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "string", "none", "no", "none" + +Used to pass additional OpenSSL configuration commands. This can be used to fine-tune the OpenSSL +settings by passing configuration commands to the openssl libray. +OpenSSL Version 1.0.2 or higher is required for this feature. +A list of possible commands and their valid values can be found in the documentation: +https://www.openssl.org/docs/man1.0.2/man3/SSL_CONF_cmd.html + +The setting can be single or multiline, each configuration command is separated by linefeed (\n). +Command and value are separated by equal sign (=). Here are a few samples: + +Example 1 +--------- + +This will allow all protocols except for SSLv2 and SSLv3: + +.. code-block:: none + + tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3" + + +Example 2 +--------- + +This will allow all protocols except for SSLv2, SSLv3 and TLSv1. +It will also set the minimum protocol to TLSv1.2 + +.. code-block:: none + + tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3,-TLSv1 + MinProtocol=TLSv1.2" + + +Template +^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "RSYSLOG_TraditionalForwardFormat", "no", "" + +Sets a non-standard default template for this action instance. + + +.. _statistics-counter_omdtls_label: + +Statistic Counter +================= + +This plugin maintains global :doc:`statistics <../rsyslog_statistic_counter>` for omdtls that +accumulate all action instances. The statistic origin is named "omdtls" with following counters: + + +- **submitted** - This counter tracks the number of log messages that have been successfully send + by the current output instance. + +- **failures** - This counter tracks the number of log messages that have been failed to send + to the target server. + +These statistics counters are updated in real-time by the rsyslog output module as log data is processed, +and they provide valuable information about the performance and operation of the input module. + +For multiple actions using statistics callback, there will be one record for each action. + +.. _omdtls-examples-label: + +Examples +======== + +Example 1: Basic +---------------- + +The following sample does the following: +- loads the omdtls module +- Sends all syslog messages to 192.168.2.1 by DTLS on port 4433. + +.. code-block:: none + + module(load="omdtls") + action(type="omdtls" name="omdtls" target="192.168.2.1" port="4433") + + +Example 2: Message throttleling +------------------------------------ + +The following sample does the following: + +- loads the omdtls module +- Sends all syslog messages to 192.168.2.1 by DTLS on port 4433. +- Slows down sending to avoid package loss due the nature of UDP. In this sample, + using dequeueSlowDown 1000 will limit the messages per second to 1000. + +.. code-block:: none + + module(load="omdtls") + action(type="omdtls" + name="omdtls" + target="192.168.2.1" + port="4433" + queue.type="FixedArray" + queue.size="100000" + queue.dequeueBatchSize="1" + queue.minDequeueBatchSize.timeout="1000" + queue.timeoutWorkerthreadShutdown="1000" + queue.timeoutshutdown="1000" + queue.dequeueSlowDown="1000" + ) diff --git a/source/configuration/modules/omfile.rst b/source/configuration/modules/omfile.rst index b5d1b22..58b5fe7 100644 --- a/source/configuration/modules/omfile.rst +++ b/source/configuration/modules/omfile.rst @@ -316,10 +316,16 @@ For each message, the file name is generated based on the given template. Then, this file is opened. As with the *file* property, data is appended if the file already exists. If the file does not exist, a new file is created. The template given in "templateName" -is just a regular :doc:`rsyslog template <../templates>`, so all -you have full control over how to format the file name. Either file -or dynaFile can be used, but not both. If both are given, dynaFile -will be used. +is just a regular :doc:`rsyslog template <../templates>`, so +you have full control over how to format the file name. + +To avoid path traversal attacks, *you must make sure that the template +used properly escapes file paths*. This is done by using the *securepath* +parameter in the template's property statements, or the *secpath-drop* +or *secpath-replace* property options with the property replacer. + +Either file or dynaFile can be used, but not both. If both are given, +dynaFile will be used. A cache of recent files is kept. Note that this cache can consume quite some memory (especially if large diff --git a/source/configuration/modules/omhttp.rst b/source/configuration/modules/omhttp.rst index 3eee0aa..bf9a3a9 100644 --- a/source/configuration/modules/omhttp.rst +++ b/source/configuration/modules/omhttp.rst @@ -149,6 +149,58 @@ An array of strings that defines a list of one or more HTTP headers to send with ) +httpretrycodes +^^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "array", "2xx status codes", "no", "none" + +An array of strings that defines a list of one or more HTTP status codes that are retriable by the omhttp plugin. By default non-2xx HTTP status codes are considered retriable. + + +httpignorablecodes +^^^^^^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "array", "none", "no", "none" + +An array of strings that defines a list of one or more HTTP status codes that are not retriable by the omhttp plugin. + + +proxyhost +^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + +Configures `CURLOPT_PROXY` option, for which omhttp can use for HTTP request. For more details see libcurl docs on CURLOPT_PROXY + + +proxyport +^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + +Configures `CURLOPT_PROXYPORT` option, for which omhttp can use for HTTP request. For more details see libcurl docs on CURLOPT_PROXYPORT + + uid ^^^ @@ -203,6 +255,19 @@ restpath instead of the actual path. This way you will be able to use dynamic re paths for your messages based on the template you are using. +restpathtimeout +^^^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "integer", "none", "no", "none" + +Timeout value for the configured restpath. + + checkpath ^^^^^^^^^ @@ -368,6 +433,21 @@ Alternatively, the omhttp action in the retry ruleset could be configured to sup Or, if some data loss or high latency is acceptable, do not configure retries with the retry ruleset itself. A single retry from the original ruleset might catch most failures, and errors from the retry ruleset could still be logged using the errorfile parameter and sent later on via some other process. + +retry.addmetadata +^^^^^^^^^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "binary", "off", "no", "none" + +When this option is enabled, omhttp will add the response metadata to: `$!omhttp!response`. There are 3 response metadata added: code, body, batch_index. + + + ratelimit.interval ^^^^^^^^^^^^^^^^^^ @@ -537,6 +617,28 @@ reloadonhup If this parameter is "on", the plugin will close and reopen any libcurl handles on a HUP signal. This option is primarily intended to enable reloading short-lived certificates without restarting rsyslog. + +.. _statsname_label: + +statsname +^^^^^^^^^ + +.. csv-table:: + :header: "type", "default", "mandatory", "|FmtObsoleteName| directive" + :widths: auto + :class: parameter-table + + "word", "none", "no", "none" + + +The name assigned to statistics specific to this action instance. The supported set of +statistics tracked for this action instance are **submitted**, **acked**, **failures**. +See the :ref:`_statistic_counter_label` section for more details. + + + +.. _statistic_counter_label: + Statistic Counter ================= @@ -561,6 +663,29 @@ accumulates all action instances. The statistic origin is named "omhttp" with fo - **request.status.fail** - Number of requests returning 3XX, 4XX, or 5XX HTTP status codes. If a requests fails (i.e. server not reachable) this counter will *not* be incremented. + +Additionally, the following statistics can also be configured for a specific action instances. See :ref:`_statsname_label` for more details. + +- **requests.count** - Number of requests + +- **requests.status.0xx** - Number of failed requests. 0xx errors indicate request never reached destination. + +- **requests.status.1xx** - Number of HTTP requests returing 1xx status codes + +- **requests.status.2xx** - Number of HTTP requests returing 2xx status codes + +- **requests.status.3xx** - Number of HTTP requests returing 3xx status codes + +- **requests.status.4xx** - Number of HTTP requests returing 4xx status codes + +- **requests.status.5xx** - Number of HTTP requests returing 5xx status codes + +- **requests.bytes** - Total number of bytes sent - derived from CURLINFO_REQUEST_SIZE. + +- **requests.time_ms** - Total accumulated request time in milliseconds - derived from CURLINFO_TOTAL_TIME. + + + Message Batching ================ |