Skip to content
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

[v3 onion migration] investigate v2-only user messaging options #4631

Closed
redshiftzero opened this issue Jul 19, 2019 · 3 comments · Fixed by #4718
Closed

[v3 onion migration] investigate v2-only user messaging options #4631

redshiftzero opened this issue Jul 19, 2019 · 3 comments · Fixed by #4718
Milestone

Comments

@redshiftzero
Copy link
Contributor

Description

This is a stretch ticket for #2951.

For organizations enabling v2 and v3 alongside (expected for most existing SecureDrop instances) we’d ideally expose to source and journalist users something like:

“Warning: you are currently using 0123456789abcedf.onion, in the future please use our new improved onion (language here intentionally vague because we’re not going to take on the task of explaining the detailed differences of v2 versus v3 onions to non-technical users - could be something like “more secure”!) at <long address>.onion.”

This ticket is to investigate methods to do this. While we could defer this until a future release, it would be wise for us to use some cycles now to think about this now in case we need Apache config changes to pass through v2/v3 info - it’s potentially brittle to make this kind of change in an auto update.

@conorsch
Copy link
Contributor

Inside the Flask app, we can inspect the Host request header to determine whether the user-facing message should be displayed, but we cannot inspect the Alt-Svc response header (even if set), so we cannot easily recommend the v3 URL—i.e. "at .onion" in the example message above—without further changes.

Two possible solutions:

Preference is for 2). Thoughts, @redshiftzero?

@redshiftzero
Copy link
Contributor Author

yep I like 2, so the plan would be:

  1. when v3 is enabled we write the hostname also to a new file in /var/lib/securedrop/ readable by www-data (we implement this for 1.0.0)
  2. in a future PR we can then inspect the Host header via request.headers.get('Host'), and we can even just use the length (if 16 character + .onion then v2, else if 56 character + .onion it's v3), to show message "please use .onion in the future" (exact message TBD). This step is for a future release when we deprecate v2 onions but we'll have all the pieces in place to do so.

@conorsch
Copy link
Contributor

After discussing with @redshiftzero, we'll go with option 1 above. Specifically, we want to deliver:

  • A plaintext file in /var/lib/securedrop/ for the source v2 Onion URL (if exists)
  • A plaintext file in /var/lib/securedrop/ for the source v3 Onion URL (if exists)
  • Ensure files readable by www-data
  • Config tests to verify the files are present in CI runs

We don't plan to implement any custom messaging as part of the 1.0. If we deliver the changes to expose the URL info to the application, then we're unblocked adding such messaging in the future, without requesting Admin intervention in the form of playbook runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants