-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
centralized logging: add sd-log VM and install securedrop-log deb
- Loading branch information
1 parent
56bc7aa
commit ca86a52
Showing
8 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : | ||
include: | ||
- fpf-apt-test-repo | ||
|
||
install-securedrop-log-package: | ||
pkg.installed: | ||
- pkgs: | ||
- securedrop-log | ||
- require: | ||
- sls: fpf-apt-test-repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : | ||
|
||
# | ||
# Installs 'sd-log' AppVM for collecting and storing logs | ||
# from all SecureDrop related VMs. | ||
# This VM has no network configured. | ||
## | ||
include: | ||
- sd-workstation-template | ||
|
||
sd-log-template: | ||
qvm.vm: | ||
- name: sd-log-buster-template | ||
- clone: | ||
- source: securedrop-workstation-buster | ||
- label: red | ||
- tags: | ||
- add: | ||
- sd-workstation | ||
- require: | ||
- sls: sd-workstation-template | ||
|
||
sd-log: | ||
qvm.vm: | ||
- name: sd-log | ||
- present: | ||
- template: sd-log-buster-template | ||
- label: red | ||
- prefs: | ||
- netvm: "" | ||
- autostart: true | ||
- tags: | ||
- add: | ||
- sd-workstation | ||
- features: | ||
- enable: | ||
- service.paxctld | ||
- require: | ||
- qvm: sd-log-buster-template | ||
|
||
# Allow any SecureDrop VM to log to the centralized log VM | ||
sd-log-dom0-oqubes.Logging: | ||
file.prepend: | ||
- name: /etc/qubes-rpc/policy/oqubes.Logging | ||
- text: | | ||
@tag:sd-workstation sd-log allow | ||
@anyvm @anyvm deny |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import unittest | ||
|
||
from base import SD_VM_Local_Test | ||
|
||
|
||
class SD_Log_Tests(SD_VM_Local_Test): | ||
def setUp(self): | ||
self.vm_name = "sd-log" | ||
super(SD_Log_Tests, self).setUp() | ||
|
||
def test_sd_log_package_installed(self): | ||
self.assertTrue(self._package_is_installed("securedrop-log")) | ||
|
||
def test_log_utility_installed(self): | ||
self.assertTrue(self._fileExists("/usr/sbin/securedrop-log")) | ||
self.assertTrue(self._fileExists("/etc/qubes-rpc/securedrop.Logging")) | ||
|
||
|
||
def load_tests(loader, tests, pattern): | ||
suite = unittest.TestLoader().loadTestsFromTestCase(SD_Log_Tests) | ||
return suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters