Skip to content

Commit 784076d

Browse files
author
Conor Schaefer
committed
Converts RPC sd-svs -> $tag:sd-client
We use a tag rather than a hardcoded AppVM name to support flexibility configuration. In the main, this is useful to developers, so that the `sd-dev` AppVM can be tagged with `sd-client`, and thereby make calls as though it were `sd-svs`. The Salt logic does not create `sd-dev`, it's up to the developer to configure that machine. Includes corresponding config test updates to validate the RPC policy changes. There are no functional changes to sd-svs grants, merely the possibility that other VMs can be manually granted similar capability. Includes docs, recommending that developers add the new `sd-client` tag to the dev VM manually, if working on the Client code.
1 parent 503fd6f commit 784076d

5 files changed

Lines changed: 20 additions & 10 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ export SECUREDROP_DEV_DIR=/home/user/projects/securedrop-workstation # set to
8080
make clone
8181
```
8282

83+
If you plan to work on the [SecureDrop Client](https://github.com/freedomofpress/securedrop-client) code, also run:
84+
85+
```
86+
qvm-tags sd-dev add sd-client
87+
```
88+
89+
Doing so will permit the `sd-dev` AppVM to make RPC calls with the same privileges as the `sd-svs` AppVM.
90+
8391
**NOTE:** The destination directory on `dom0` is not customizable; it must be `securedrop-workstation` in your home directory.
8492

8593
#### Building

dom0/sd-dom0-qvm-rpc.sls

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dom0-rpc-qubes.Filecopy:
3333
- marker_start: "### BEGIN securedrop-workstation ###"
3434
- marker_end: "### END securedrop-workstation ###"
3535
- content: |
36-
sd-proxy sd-svs allow
36+
sd-proxy $tag:sd-client allow
3737
$anyvm $tag:sd-workstation deny
3838
dom0-rpc-qubes.OpenInVM:
3939
file.blockreplace:
@@ -42,8 +42,8 @@ dom0-rpc-qubes.OpenInVM:
4242
- marker_start: "### BEGIN securedrop-workstation ###"
4343
- marker_end: "### END securedrop-workstation ###"
4444
- content: |
45-
sd-svs $dispvm:sd-svs-disp allow
46-
sd-svs sd-export-usb allow
45+
$tag:sd-client $dispvm:sd-svs-disp allow
46+
$tag:sd-client sd-export-usb allow
4747
$anyvm $tag:sd-workstation deny
4848
dom0-rpc-qubes.OpenURL:
4949
file.blockreplace:
@@ -100,7 +100,7 @@ dom0-rpc-qubes.Gpg:
100100
- marker_start: "### BEGIN securedrop-workstation ###"
101101
- marker_end: "### END securedrop-workstation ###"
102102
- content: |
103-
sd-svs sd-gpg allow
103+
$tag:sd-client sd-gpg allow
104104
$anyvm $tag:sd-workstation deny
105105
dom0-rpc-qubes.GpgImportKey:
106106
file.blockreplace:
@@ -109,5 +109,5 @@ dom0-rpc-qubes.GpgImportKey:
109109
- marker_start: "### BEGIN securedrop-workstation ###"
110110
- marker_end: "### END securedrop-workstation ###"
111111
- content: |
112-
sd-svs sd-gpg allow
112+
$tag:sd-client sd-gpg allow
113113
$anyvm $tag:sd-workstation deny

dom0/sd-svs.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ sd-svs:
3333
- netvm: ""
3434
- tags:
3535
- add:
36+
- sd-client
3637
- sd-workstation
3738
- features:
3839
- enable:

tests/test_vms_exist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def test_sd_svs_config(self):
7777
self._check_kernel(vm)
7878
self._check_service_running(vm, "paxctld")
7979
self.assertTrue('sd-workstation' in vm.tags)
80+
self.assertTrue('sd-client' in vm.tags)
8081

8182
def test_sd_svs_disp_config(self):
8283
vm = self.app.domains["sd-svs-disp"]

tests/vars/qubes-rpc.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- policy: Filecopy
1414
starts_with: |-
1515
### BEGIN securedrop-workstation ###
16-
sd-proxy sd-svs allow
16+
sd-proxy $tag:sd-client allow
1717
$anyvm $tag:sd-workstation deny
1818
### END securedrop-workstation ###
1919
@@ -49,14 +49,14 @@
4949
- policy: Gpg
5050
starts_with: |-
5151
### BEGIN securedrop-workstation ###
52-
sd-svs sd-gpg allow
52+
$tag:sd-client sd-gpg allow
5353
$anyvm $tag:sd-workstation deny
5454
### END securedrop-workstation ###
5555
5656
- policy: GpgImportKey
5757
starts_with: |-
5858
### BEGIN securedrop-workstation ###
59-
sd-svs sd-gpg allow
59+
$tag:sd-client sd-gpg allow
6060
$anyvm $tag:sd-workstation deny
6161
### END securedrop-workstation ###
6262
@@ -90,8 +90,8 @@
9090
- policy: OpenInVM
9191
starts_with: |-
9292
### BEGIN securedrop-workstation ###
93-
sd-svs $dispvm:sd-svs-disp allow
94-
sd-svs sd-export-usb allow
93+
$tag:sd-client $dispvm:sd-svs-disp allow
94+
$tag:sd-client sd-export-usb allow
9595
$anyvm $tag:sd-workstation deny
9696
### END securedrop-workstation ###
9797

0 commit comments

Comments
 (0)