-
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.
- Loading branch information
1 parent
ea2e751
commit 093fc5f
Showing
11 changed files
with
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : | ||
|
||
# We should package this so we can easily update | ||
sd-log-script: | ||
file.managed: | ||
- name: /usr/sbin/oqubes-logging | ||
- source: salt://sd/sd-log/oqubes-logging | ||
- user: root | ||
- group: root | ||
- mode: 755 | ||
|
||
sd-log-qrexec: | ||
file.managed: | ||
- name: /etc/qubes-rpc/oqubes.Logging | ||
- source: salt://sd/sd-log/oqubes.Logging | ||
- user: root | ||
- group: root | ||
- mode: 755 |
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,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : | ||
|
||
base: | ||
sd-log-template: | ||
- sd-log-template-files |
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-template | ||
- clone: | ||
- source: securedrop-workstation | ||
- label: red | ||
- tags: | ||
- add: | ||
- sd-workstation | ||
- require: | ||
- sls: sd-workstation-template | ||
|
||
sd-log: | ||
qvm.vm: | ||
- name: sd-log | ||
- present: | ||
- template: sd-log-template | ||
- label: red | ||
- prefs: | ||
- netvm: "" | ||
- autostart: true | ||
- tags: | ||
- add: | ||
- sd-workstation | ||
- features: | ||
- enable: | ||
- service.paxctld | ||
- require: | ||
- qvm: sd-log-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : | ||
|
||
base: | ||
dom0: | ||
- sd-log |
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 @@ | ||
/usr/sbin/oqubes-logging |
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,18 @@ | ||
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_log_utility_installed(self): | ||
self.assertTrue(self._fileExists("/usr/sbin/oqubes-logging")) | ||
self.assertTrue(self._fileExists("/etc/qubes-rpc/oqubes.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