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
indom0
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
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
securedrop-log-0.0.3.tar.gz
(15.9 kB
view details)
File details
Details for the file securedrop-log-0.0.3.tar.gz
.
File metadata
- Download URL: securedrop-log-0.0.3.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e27148bd315db8357238874ecb792dffa0c397fed80bc4d314017a4b3341a7 |
|
MD5 | 38c81c9a4c20f296bf5db6d3f34cf69b |
|
BLAKE2b-256 | 30685d9f3ae0630256b24184791f6e72125d0570000be5551de451726b208dcd |