-
Notifications
You must be signed in to change notification settings - Fork 687
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
Explicitly declare onion services as v2 for existing installs #4092
Conversation
This will modify the torrc file in place to explicitly declare current onion services as v2 onion services.
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.
This bash
function indeed does this right thing, but I'm also on the fence about whether or not we need it. If we're provisioning from ansible
as part of the upgrade story, we don't. However, our current restore from backup logic might create problems since this line would be missing. But, in order to apply migrations after a restore, we run dpkg-reconfigure securedrop-app-code
which would trigger this perl
bit, so we're safe.
I think at the end of the day it really comes down to us deciding where we want this logic. I would rather it not be in postinst
personally but 🤷♂️
In my opinion, it's worth adding this for the following scenario that @heartsucker is mentioning above:
But in this case, since we don't |
100% agree we want the changes in postinst. At present, the plan for upgrade is:
We don't also want to have to run @redshiftzero brings up a great point on the restore script, happy to accommodate there. Still testing the functional changes presented here. I feel strongly there should be corresponding config tests added, will append those as part of review. |
So far I've validated the staging clean install story configures the services correctly, on both Trusty & Xenial. Logged in interactively to inspect the torrc and confirm the v2 strings were there. Upgrade testing is next; see box metadata in #4093, will use those to base the upgrades on. |
Each hidden service declaration provided by the test vars must have "HiddenServiceVersion 2" immediately after the dir in the torrc. At a later date we may want to templatize these values, but for now we only support v2 Onion URLs for SD, so hardcoding is fine.
Upgrade scenario from 0.11.1 works smoothly, confirmed resolution of both Source & Journalist Interfaces. Did not test upgrade for Xenial, since that's not terribly relevant (we plan to have folks upgrade to Xenial after release of 0.12.0). |
Status
Ready for review
Description of Changes
Towards #4031 , this is required to ensure torrc config is compatible with tor 0.3.5.x series.
Modify the torrc file in place to explicitly declare current onion services as v2 onion services. Since securedrop-config is installed after tor hidden services are configured, it will also perform the modification (and be a no-op once #4080 is merged at install-time)
Testing
Clean install
/etc/tor/torrc
on app and mon server specify version 2 for all hidden servicesUpgrade testing
/etc/tor/torrc
on app and mon server specify version 2 for all hidden servicesDeployment
These changes will be deployed to new and existing SecureDrop instances via
securedrop-config
deb package.Checklist
If you made changes to the server application code:
make ci-lint
) and tests (make -C securedrop test
) pass in the development containerIf you made non-trivial code changes: