Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rsyslog_pseudonymizer-1.0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

rsyslog_pseudonymizer-1.0.2-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file rsyslog_pseudonymizer-1.0.2.tar.gz.

File metadata

  • Download URL: rsyslog_pseudonymizer-1.0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for rsyslog_pseudonymizer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a8f655588e313648c928f8c38499666705b0e20aaccc46d70e7e9c5be9f22258
MD5 9493a9aa7b2308261e83498d3d0b7404
BLAKE2b-256 61717fa71e24b1c4943e5178ad24791330bc12084651aa7759c27702bc34a36f

See more details on using hashes here.

File details

Details for the file rsyslog_pseudonymizer-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: rsyslog_pseudonymizer-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for rsyslog_pseudonymizer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b82781ab9c57214c93fcf7f5919473ee2fef2c25153938b41b3d4186141c53f7
MD5 fd4de98a02d9c8187b6ea4c933c0bec9
BLAKE2b-256 376b6d93b0950f7f1b43cb3f9dba731e65ec9f65b9fd2a0fb1d0d274ac2f9a3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page