Mailing List Archive

TLS support for SysLogHandler (currently in pypi)
Hi all,
I've been trying to add TLS over TCP support to the core SysLogHandler
and currently have a working example package on PyPI -
https://pypi.org/project/tlssysloghandler/#usage . The package works as
a drop-in replacement for SysLogHandler, trying to support the original
options and extends the class by allowing TLS as well.

I'm hoping people find it useful enough and if possible it can be added
to the SysLogHandler class itself.

The discussion on the forums for ideas is at
https://discuss.python.org/t/allow-tls-configuration-for-sysloghandler/40785/6

A bit of background, for people who don't want to click links

> The syslog handler doesn’t have support for sending logs to a TLS syslog address. The acceptance of TLS for logging is evident by current presence of the SMTP log handler which supports the secure parameter. Modern syslog servers now have support for TLS listeners - rsyslog (the default on ubuntu) - RSyslog Documentation - rsyslog and syslog-ng - https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/mutual-authentication-using-tls.
>
> The implementation could be done by implementing the TLS configuration inside the SysLogHandler, or allowing the user to pre-configure the TLS socket by doing the wrapping themselves and only passing final the socket to SysLogHandler.
>
> There are a couple of unmaintained pypi packages that tried to make a TLS syslog handler but don’t seem to have been maintained for a long time. For a feature like this, it makes sense to have it in core python rather than an unmaintained package.


Feedback and bug reports are very welcome.

Thanks,
Tammy
--
https://mail.python.org/mailman/listinfo/python-list