-
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
feat: enable Tor's proof-of-work defense on the Source Interface #7175
Conversation
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.
Adding in the PoW tuning directives now might save us doing another release down the line. Otherwise this is straightforward and a good first step.
My opinion on the questions posed:
|
Opt-out would be nice but means changing the tor config via a deb postint (likely securedrop-app-code as we only need to update app) - that's high-impact if it goes awry for users relying on Tor for access to the server. Ideally site admins should also be monitoring Tor and adjusting those values constantly in response to a targeted DoS - I don't think we can get the monitoring setup in place in a reasonable timeframe, but giving admins the ability to tweak without futzing would at least be something. |
I think this is a reasonable approach given the various considerations and the amount of time we want to spend on it, thanks for working on it :) |
(Marking "ready for review" just to enable notifications from GitHub to Slack. Not quite ready for review.) After reviewing Tor's example configuration and playing with a self-contained example onion service, I don't think we should expose
This feedback loop is going to be more responsive than any administrator's fine-tuning, and we have no precedent for exposing knobs (or footguns, per @rocodes) like these in However, I'll write a test plan here and for v2.9.0 QA that includes monitoring Tor's actual performance with Thanks for your other feedback, @zenmonkeykstop, in #7175 (review), which I'll address now. And thanks for reminding me that this is "one-half opt-in": it'll only take effect the next time an administrator runs a full Footnotes |
Feedback addressed. Tests and test plan forthcoming. |
Just stepped through the test plan for this branch, and am happy to report that everything worked beautifully! Just a couple small caveats to note, regarding deviations from expected output and a possible stumbling point for any additional testers:
|
Thanks for testing, @nathandyer! I've addressed your feedback and updated the test plan with your clarification of the expected output, which I agree still passes as intended. |
…the Source Interface
Rebased from |
@zenmonkeykstop, with @nathandyer's review today and tests passing, this is now ready for your review and merge tomorrow morning. |
Decided against adding the additional directives for now.
…app_pow_on_source_interface=True Otherwise a "securedrop-admin install" without a prior "securedrop-admin sdconfig" will default to enabling this feature. Let's not surprise an administrator who likely intended to enforce the existing configuration. Co-authored-by: Kevin O'Gorman <[email protected]>
install_files/ansible-base/roles/tor-hidden-services/templates/torrc
Outdated
Show resolved
Hide resolved
- #7175 (comment) - #7175 (comment) (cherry picked from commit b253e16)
- #7175 (comment) - #7175 (comment) (cherry picked from commit b253e16)
Status
Ready for review
Description of Changes
Closes #6933 by:
securedrop-admin sdconfig
prompt for enabling Tor's proof-of-work defense on the Source Interface (i.e., the only unauthenticated onion service a SecureDrop installation hosts); andTesting
On this branch:
securedrop-admin sdconfig
, accepting the new default:On the Source Interface, enable Tor's proof-of-work defense against denial-of-service attacks?: yes
securedrop-admin install
ssh app sudo cat /etc/tor/torrc
showsHiddenServicePoWDefensesEnabled 1
onionprobe -e <your Source Interface>.onion
includes1 output like:securedrop-admin sdconfig
again, but turn the proof-of-work defense offsecuredrop-admin install
againssh app sudo cat /etc/tor/torrc
does NOT showHiddenServicePoWDefensesEnabled 1
onionprobe -e <your Source Interface>.onion
does NOT includeincludesPoW
outputProof of Work (PoW) params not found
2Deployment
See discussion in this thread on half-opt-out: This change will default to enabled on subsequent
securedrop-admin {sdconfig,install}
runs, but it won't be applied automatically on server-side update.Checklist
If you made changes to
securedrop-admin
:make -C admin test
) pass in the admin development containerIf you made changes to the system configuration:
#7175 (comment)
If you made non-trivial code changes:
Choose one of the following:
Deferred to freedomofpress/securedrop-docs#568.
Footnotes
You'll need onionprobe v1.2.0 directly from Tor, not from the Debian bookworm package. ↩
https://github.com/freedomofpress/securedrop/pull/7175#issuecomment-2163949743 ↩