-
Notifications
You must be signed in to change notification settings - Fork 46
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
securedrop-admin --uninstall for staging and prod #489
Conversation
Will remove all files and packages in a staging or prod setting config.json (containing instance configuration and Journalist Interface ATHS) and sd-journalist.sec (submission private key) will *not* be deleted, they should be found in two locations (unless they have been also copied elsewhere): - /usr/share/securedrop-workstation/dom0-config/ - /srv/salt/sd/
This will ensure idempotency of delete operations when invoking `sd-clean-all` in staging and production scenarios.
c66fd6b
to
bc9b0a7
Compare
Ran through the dev-scenario test plan, looks good. While running |
Prod environment:
|
Thanks @zenmonkeykstop for the review. Note that the presence of the config and the private key in |
Since it's automatically copied from /usr/share, we can delete the duplicate in /srv/salt/sd
This ensures idempotency
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 don't think this will fix it tbh, the duplicate comes in via /etc/tor/torrc
, as there's an include there for both /etc/torrc.d/
and /etc/torrc.d/95_whonix.conf
, which pulls in 95_whonix.conf
twice and thus the user conf twice as well
@zenmonkeykstop I've pushed up two commits and this is now ready for re-review. I have tested it twice and it is working locally for me. I am using v2 onion services in my config. Are you using v3? Here are my config files in
|
Yeah I don't think this is related to your change, it could be a difference in the prod install vs |
The |
Ran through the dev scenario test plan again, this time with v2 Onion Service config in See also https://github.com/freedomofpress/securedrop-workstation/tree/491-config-tests-for-whonix ; those new tests are all passing for me locally on this branch, but were failing on master with v2 onions. Consider squashing and pulling into this branch if anyone agrees. |
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.
Worked as expected. Approved from my side.
Dev environment
-
make all
andmake clean
completes without error
Staging (or prod) environment
- Build dom0 rpm on this branch
- dom0 rpm installs correctly
- Configure the instance (config.json and sd-journalist.sec) and run
securedrop-admin --apply
-
securedrop-admin --uninstall
completes without error - Files are absent from
/srv/salt
and dom0 packages are uninstalled
@conorsch these look good to me, we can bring them here before merging. |
If the torrc end state is broken on sd-whonix, we're sure to encounter it in various failures, but having an explicit test is well worth it. It's especially valuable to ask tor to perform the verification, given the include-heavy config used by Whonix: there's no single torrc file to inspect and reason about, but rather a chain of includes. Let's ask tor to assemble and assert it's valid.
The specific problem of multiple includes causing recursion in imports for the tor config broke v2 onion services for the workstation (and whonix-gw overall). Let's monitor for regressions on that specific config state.
49a64ab
to
d5c9839
Compare
In prod, as per #492, Whonix Qubes updates fail after the dom0 rpm uninstalled, as a symlink |
Run clean-salt as part of securedrop-admin uninstall action
Re-confirming that the dev scenario works well, with all tests passing, after the addition of the clean-salt script. |
thanks @zenmonkeykstop , good catch on the topfile. I've just retested this on a clean install, the issue should now be fixed, note that there will be some warnings in the standard output of the securedrop-admin command due to files being first deleted by clean-salt, and then by the dom0 package uninstall |
Prod install just failed with the following:
Rerunning it as this could well just be an issue with the state of Qubes (this is no longer a fresh install). |
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.
Did prod install:
- Fresh install works (modulo another random qrexec timeout on
sd-logs
which is unrelated to this change` - uninstall works, including cleanup
- whonix-* VMs can be upgraded after uninstall.
LGTM!
Status
Ready for review
Description of Changes
Fixes #483
Testing
Dev environment
make all
andmake clean
completes without errorStaging (or prod) environment
securedrop-admin --apply
securedrop-admin --uninstall
completes without error/srv/salt
and dom0 packages are uninstalledChecklist
If you have made code changes
make flake8
) passes in the development environment (this box maybe left unchecked, as
flake8
also runs in CI)