Skip to content

Commit 5f815ef

Browse files
authored
Merge pull request #1414 from freedomofpress/456-whonix-deprecation
Prepares path for `sd-whonix` whonix removal
2 parents f6ecf68 + 0944de1 commit 5f815ef

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

securedrop_salt/sd-proxy.sls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
{% import_json "securedrop_salt/config.json" as d %}
1212

1313
include:
14-
- securedrop_salt.sd-whonix
1514
- securedrop_salt.sd-workstation-template
1615

1716
sd-proxy-dvm:
@@ -26,7 +25,7 @@ sd-proxy-dvm:
2625
- template: sd-small-{{ sdvars.distribution }}-template
2726
- prefs:
2827
- template: sd-small-{{ sdvars.distribution }}-template
29-
- netvm: sd-whonix
28+
- netvm: sys-firewall
3029
- template_for_dispvms: True
3130
- default_dispvm: ""
3231
- features:
@@ -41,7 +40,6 @@ sd-proxy-dvm:
4140
- sd-workstation
4241
- sd-{{ sdvars.distribution }}
4342
- require:
44-
- qvm: sd-whonix
4543
- qvm: sd-small-{{ sdvars.distribution }}-template
4644

4745
sd-proxy-create-named-dispvm:
@@ -53,12 +51,13 @@ sd-proxy-create-named-dispvm:
5351
- class: DispVM
5452
- prefs:
5553
- template: sd-proxy-dvm
56-
- netvm: sd-whonix
54+
- netvm: sys-firewall
5755
- autostart: true
5856
- default_dispvm: ""
5957
- features:
6058
- enable:
6159
- service.securedrop-mime-handling
60+
- service.securedrop-arti
6261
- set:
6362
- vm-config.SD_MIME_HANDLING: default
6463
- servicevm: 1
@@ -79,5 +78,6 @@ sd-proxy-config:
7978
- name: sd-proxy
8079
- set:
8180
- vm-config.SD_PROXY_ORIGIN: http://{{ d.hidserv.hostname }}
81+
- vm-config.SD_PROXY_ORIGIN_KEY: {{ d.hidserv.key }}
8282
- require:
8383
- qvm: sd-proxy-create-named-dispvm

tests/test_proxy_vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def qube():
1313
return QubeWrapper(
1414
"sd-proxy",
15-
expected_config_keys={"SD_PROXY_ORIGIN", "SD_MIME_HANDLING"},
15+
expected_config_keys={"SD_PROXY_ORIGIN", "SD_PROXY_ORIGIN_KEY", "SD_MIME_HANDLING"},
1616
enforced_apparmor_profiles={"/usr/bin/securedrop-proxy"},
1717
)
1818

tests/test_vms_exist.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,22 @@ def test_sd_proxy_config(self):
114114
vm = self.app.domains["sd-proxy"]
115115
assert vm.template == "sd-proxy-dvm"
116116
assert vm.klass == "DispVM"
117-
assert vm.netvm.name == "sd-whonix"
117+
assert vm.netvm.name == "sys-firewall"
118118
assert vm.autostart
119119
assert not vm.provides_network
120120
assert vm.default_dispvm is None
121121
assert "sd-workstation" in vm.tags
122122
assert vm.features["service.securedrop-mime-handling"] == "1"
123+
assert vm.features["service.securedrop-arti"] == "1"
123124
assert vm.features["vm-config.SD_MIME_HANDLING"] == "default"
124125
self._check_service_running(vm, "securedrop-mime-handling")
126+
self._check_service_running(vm, "securedrop-proxy-onion-config")
127+
self._check_service_running(vm, "securedrop-arti")
125128

126129
def test_sd_proxy_dvm(self):
127130
vm = self.app.domains["sd-proxy-dvm"]
128131
assert vm.template_for_dispvms
129-
assert vm.netvm.name == "sd-whonix"
132+
assert vm.netvm.name == "sys-firewall"
130133
assert vm.template == SD_TEMPLATE_SMALL
131134
assert vm.default_dispvm is None
132135
assert "sd-workstation" in vm.tags
@@ -156,6 +159,9 @@ def test_sd_app_config(self):
156159
assert vm.features["vm-config.SD_MIME_HANDLING"] == "sd-app"
157160
self._check_service_running(vm, "securedrop-mime-handling")
158161

162+
# Arti should *not* be running
163+
self._check_service_running(vm, "securedrop-arti", running=False)
164+
159165
def test_sd_viewer_config(self):
160166
vm = self.app.domains["sd-viewer"]
161167
nvm = vm.netvm

0 commit comments

Comments
 (0)