summaryrefslogtreecommitdiffstats
path: root/source/configuration/modules/omdtls.rst
blob: ccf9be0596ae93fe96a6b7b901cb86883dcec282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
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"
   )