Skip to main content

SecureDrop Qubes logging scripts

Project description

securedrop-log

This is a Python module and qrexec service for logging in Qubes for SecureDrop.

How to use/try this?

In our example, we will use a vm named logging for storing logs, and we will use workvm to send in logs to the logging vm.

In dom0

  • Create a file /etc/qubes-rpc/policy/securedrop.Log in dom0 with the following content.
workvm logging allow
@anyvm @anyvm deny

In logging vm

Add the following content to /etc/qubes-rpc/securedrop.Log

/usr/sbin/securedrop-log

and then place securedrop-log script to /usr/sbin/ directory and make sure that it is executable.

To use from any Python code in workvm

Here is an example code using Python logging

import logging
from securedrop_log import SecureDropLog

def main():
    handler = SecureDropLog("workvm", "proxy-debian")
    logging.basicConfig(level=logging.DEBUG, handlers=[handler])
    logger = logging.getLogger("example")

    logger.info("kushal says it works")


if __name__ == "__main__":
    main()

The journalctl example

You will need python3-systemd package for the same.

The code is in journal-example.py file.

Project details


Download files

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

Files for securedrop-log, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size securedrop-log-0.0.3.tar.gz (15.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page