-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for Qubes 4.1 #751
Conversation
Great work here so far, @eaon! Pushed a few fix-ups (which we can squash out later). Please take a closer look at the RPC policy logic. As configured, I'm seeing failures related to the disp-mgmt VMs, because of our disallow declarations in the VMShell config. Perhaps we'll need to loosen those restrictions somewhat for 4.1; my assumption is that in 4.0, the disp-mgmt VMs were exempted from those lines, and in 4.1 they're not. Also, as a stretch goal, see if you can keep the |
With the recent changes it should now install without salt failures, and There's one remaining failure with regards to the RPC calls: |
That's true on 4.0, as well, so not a regression for 4.1. I'll work on verifying the changes here as far as a clean install, then take another look at the disp-mgmt-vm setup, maybe using something like |
@@ -60,12 +79,13 @@ dom0-remove-securedrop-workstation-stretch-template: | |||
- file: dom0-workstation-rpm-repo | |||
|
|||
dom0-install-securedrop-workstation-template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this entire block will need to be in a conditional, since pkg.installed
is the required syntax for 4.0, and qvm.template_installted
is required for 4.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Going to stop before I get too far into all the 4.0/4.1 compatibility notes since we'll have to figure out how we want to organize that)
Thanks for your work @eaon! I left a couple comments, but stopped before getting too far into the weeds, since a lot of the comments were going to be around branching/dual support for 4.0 vs 4.1, and maybe that kind of feedback is premature rn. The other area of commentary is around RPC policy definition/scoping, but I'm going to dig into the docs before I add any more notes on that as well. |
- content: | | ||
[securedrop-workstation-templates] | ||
gpgcheck=1 | ||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-securedrop-workstation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that in 4.1, key files are also stored in /etc/qubes/repo-templates/keys/
(I have duplicate RPM-GPG-KEY-xxxx
in both locations), but this new location could be preferred to store key files with repo templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed 💯 - I assumed the template repo key(s) were moved there and didn't want to duplicate files unnecessarily, but it looks like 4.1 has the same keys in both directories at the moment. I wonder if that's a requirement for qvm-template
to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, currently it's not (from my limited testing anyway)- it works with keys in the /etc/pki directory, as long as that's specified in the .repo file, although long-term I imagine that may change.
dom0-workstation-templates-repo: | ||
# Using file.blockreplace because /etc/qubes/repo-templates/ is not a .d | ||
# style directory, and qvm.template_installed:fromrepo seems to only support | ||
# using a repo from this file. Installing manually via a cli-command-instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right that qvm.template_installed
does not yet support an alternate repo file location. Another possibility if we want to avoid touching the qubes .repo files directly is using
dom0-install-securedrop-workstation-template:
cmd.run:
- name: qvm-template install securedrop-workstation-buster --repo-files /etc/qubes/repo-templates/securedrop-workstation-template.repo
- require:
- file: securedrop-workstation-template-key # either in /etc/pki or in /etc/qubes/repo-templates/keys
- file: securedrop-workstation-template-repo # separate template .repo file
So far, so good! I tacked on a few test tweaks, in an attempt to get
All of those are blockers for releasing 4.1 support, but I'm optimistic we can merge this PR for ongoing support. Would like to spend some more time testing this branch against 4.0 to guard against breakage. |
Further work to come:
Today at sprint planning we committed to getting this into a reviewable state this sprint. My goal is to retain 4.0 functionality untouched in this PR, so we can merge these changes and continue to iterate on full 4.1 support. |
Updated and liberally squash-rebased. Wrote a fresh test plan, calling out a few areas still to be addressed—notably print and export functionality—but otherwise ready to rock. Let's discuss testing obligations at sprint planning today, to share the load. |
{% if grains['osrelease'] == '4.1' %} | ||
qvm.template_installed: | ||
- name: securedrop-workstation-buster | ||
{% else %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Would it maybe be better to use{% elif grains['osrelease'] == '4.0' %}
here and in subsequent similar statements? I'm sure we'll be removing this conditional logic pretty soon, but it seems best to be always explicit about the version-based branching.
I've taken this for a first spin on my Qubes 4.0 system. Initial results are looking good:
I'll start going through the test plans tomorrow. If all looks good there, I'll switch this system to 4.1 via in-place upgrade next. |
SecureDrop Workstation test scenariosQubes scenariosVerify tor connection to Journalist API
Verify default DispVM settings
RPC Policies
Logging
GUI updater
|
Client scenariosScenario: Online modeLogin
Sources
Replies
|
SubmissionsPreview
Export
Closing the client
|
Scenario: Offline mode without existing data
Offline to Online
Scenario: Offline mode with existing data
Offline to Online
|
Just for coordination: I'm doing a hardware review on my side in order to jump on the testing train. I'll be testing this branch on R4.1 on a NUC11 machine. |
I just pulled the latest from the I also noticed one Qubes error popup that said I think this highlights even more why we want to recommend to folks the backup-wipe-install method. |
@creviera Try running |
@conorsch - i was just preparing to test the scenario that we're going to recommend to users (which we still need testers to do, although i believe @gonzalo-bulnes is on this test scenario today), but i can stop that and continue down the upgrade-in-place scenario if you think that would be more useful? |
@creviera No, that's fine: go ahead and proceed with the scenario you describe. |
Here's my messy-but-potentially-relevant test path (I've already decided to wipe and install again so I get a clean run, but just documenting what happened here for posterity): I installed Qubes 4.1 (opting for a non disposable sys-usb vm), built an RPM from the tip of this branch, ran I now have several test failures (log below), as well as an apparent misconfiguration: the client starts, but won't log in, and the error log in sd-app shows test results here
My current plan is to reinstall qubes and sdw again from scratch and go directly to a staging setup. I will stick to the non-disposable sys-USB qube. (we chatted and @gonzalo-bulnes is planning to test the disposable sys-usb qube). So I will also hopefully have some clean findings to document. |
New policy format (the one in |
Test results so far...Hardware: T490 Clean install scenario:
|
I'll be able to debug tomorrow for a bit, but otherwise, might have to pick this up next week. To not block, I think we can rely on @gonzalo-bulnes to continue testing the freshest of fresh install scenario, with help from @rocodes and @eloquence if needed. |
Looks like Allie and I ran into the same issue with the location of the sd-proxy yaml file. Wondering if that's something anyone else has seen in the clean install scenario. |
Yes, that happens for me too - I forgot about running the tests (oof, sorry) until you posted your results - seeing the same (plus some #764 failures (which I'm about to push fixes for) |
In 4.1 mouse-action is configurable, which has an effect on the contents of the policy. See: https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/blob/78dcb14ef9b41650ec18ec0a40f44005ca1cafcc/pillar/qvm/sys-usb-allow-mouse.sls and https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/blob/78dcb14ef9b41650ec18ec0a40f44005ca1cafcc/qvm/sys-usb.sls#L94
After a short convo with @rocodes I confirmed a suspicion that Up until the other day I was using |
Realised I forgot to post these before, augmented with a new one using the dev environment after the packages in apt-test were updated to fix the
Scenario: Online modeLogin
Sources
Replies
SubmissionsPreview
Export
Skipped for lack of access to a printer Closing the client
Scenario: Offline mode without existing dataOffline to Online
Scenario: Offline mode with existing dataOffline to Online
|
@eaon So it looks like right now USB autoattach is not working in 4.1? Do you mind filing an issue with 4.1 label in https://github.com/freedomofpress/securedrop-export so we don't lose track of this (or I can)? |
Scenario
|
rebooting got me passed this error, but I still see that the |
Fresh R4.1 installation on a NUC11:
Since @creviera was also missing |
Here's another test I did (looks like things work better for me with a Scenario:
|
Scenario:
|
I can confirm, yes! I should probably update the original PR description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on #751 (comment) and #751 (comment), I believe we can merge this and refocus our testing efforts on #764 and fixing #766
Status
Ready for review. Towards #600.
Description of changes
qubes.Gpg
).sys-firewall
; closes Repo config for dom0 is duplicated in sys-firewall #702. Technically this change affects 4.0, as well, but was convenient given that sys-firewall is a DispVM in Q4.1.Known problems
Export and print functionality hasn't been implemented for Qubes 4.1 yet. Under 4.1, the
sys-usb
VM is disposable by default, meaning our custom udev rules do not persist. We should handle that change in a separate PR.The
sd-log
setup will complain (via GUI notifications of qrexec denial) about lack of loopback support; see #755. We may be able to leveragenotify=false
in the R5 policy syntax to resolve.The dom0 repos currently hardcode the 4.0 locations: https://yum-test.securedrop.org/workstation/dom0/f25/ That's good enough for now, but we'll want to create f32 locations on the yum server(s), and update the URLs here accordingly.
Test plan
We want to verify that the Workstation behaves well under both Qubes 4.0 & Qubes 4.1. To that end, we'll need to test on both platforms. Let's divvy up the testing obligations across the team, to minimize duplication of effort. Tests we'll need to investigate on each platform:
Clean install works:
make clone && make clean && make dev
andmake test
has onlytest_sys_usb
related tests failingPerform full suite of Qubes scenarios
Perform full suite of Client QA checks
See the wiki page for formatting your reports: https://github.com/freedomofpress/securedrop-workstation/wiki/Workstation-test-case-report-template