RsyslogPseudonymizer is a plug-in module for Rsyslog based on Python which replaces personal identifiers in log messages by pseudonyms before they are written to log files. The pseudonym-mapping is only kept in RAM.
Project description
RsyslogPseudonymizer
RsyslogPseudonymizer is a plug-in module for Rsyslog based on Python which replaces personal identifiers in log messages by pseudonyms before they are written to log files. The pseudonym-mapping is only kept in RAM.
Test and build
Run the following commands:
virtualenv -p "$(which python3)" ./venv
source ./venv/bin/activate
pip install -r dev_requirements.txt
tox
hatch clean
hatch build
Installation
In the absence of OS packages, some more steps are required.
See the provided install.sh
or run it as root (tested on Debian).
You should then configure your applications/services so that the logs are written only to Rsyslog.
If you use Systemd, you could configure it to forward received logs to Rsyslog. Then it would in general only be necessary to configure applications to only log to stdout/stderr so that Systemd handles the output. Configuration example:
/etc/systemd/journald.conf.d/forward_to_syslog.conf
[Journal]
# Keep log data only in memory, but forward journal log to (r)syslog
Storage=volatile
ForwardToSyslog=yes
# Reduce amount of logs stored in RAM somehow
MaxFileSec=1h
MaxRetentionSec=2days
Then: systemctl restart systemd-journald.service
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rsyslog_pseudonymizer-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8f655588e313648c928f8c38499666705b0e20aaccc46d70e7e9c5be9f22258 |
|
MD5 | 9493a9aa7b2308261e83498d3d0b7404 |
|
BLAKE2b-256 | 61717fa71e24b1c4943e5178ad24791330bc12084651aa7759c27702bc34a36f |
Hashes for rsyslog_pseudonymizer-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b82781ab9c57214c93fcf7f5919473ee2fef2c25153938b41b3d4186141c53f7 |
|
MD5 | fd4de98a02d9c8187b6ea4c933c0bec9 |
|
BLAKE2b-256 | 376b6d93b0950f7f1b43cb3f9dba731e65ec9f65b9fd2a0fb1d0d274ac2f9a3e |