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

Fix errors in Tails validation logic; bump Tails version req #5965

Merged
merged 1 commit into from Jun 1, 2021

Conversation

eloquence
Copy link
Member

@eloquence eloquence commented May 28, 2021

Status

Ready for review

Description of Changes

Fixes #5942

  • The journalist auth file should always be present when ./securedrop-admin tailsconfig is run and is not logically tied to the SSH-over-Tor setting or the presence of SSH onion service secrets.

  • The tor_v3_keys.json file is only required if SSH secrets are present and SSH-over-Tor is enabled

  • We can no longer support the Tails 3 series, so it's appropriate to error out at this point when users attempt to use it

Testing

Estimated testing time: 30-60 minutes

On a physical or virtualized Admin Workstation with SSH-over-Tor enabled

  1. Move app-journalist.auth_private, tor_v3_keys.json, app-ssh.auth_private and mon-ssh.auth_private from ~/Persistent/securedrop/install_files/ansible-base into a temporary location like ~/Persistent
  2. On this branch, run ./securedrop-admin --force tailsconfig in /Persistent/securedrop
    • Observe that it fails with an error noting that app-journalist.auth_private is missing. [Explanation: This file must always be present to access the web-based Journalist/Admin Interface.]
  3. Copy app-journalist.auth_private into place
  4. Repeat step 2
    • Observe that the command completes successfully.
  5. Copy app-ssh.auth_private and mon-ssh.auth_private into place
  6. Repeat step 2
    • Observe that it fails with an error noting that tor_v3_keys.json is missing [Explanation: This file contains the private key needed to authenticate against the SSH onion services.]
  7. Edit ~/Persistent/securedrop/install_files/ansible-base/group_vars/all/site-specific and set enable_ssh_over_tor to false
  8. Repeat step 2
    • Observe that the command completes successfully. [Explanation: When SSH-over-Tor is disabled, we do not need to strictly confirm existence of the file.]
  9. Undo your modification in step 10
  10. Copy tor_v3_keys.json into place
    • Observe that the command completes successfully

Deployment

Although folks really should not be using Tails 3 anymore, it likely will warrant a call-out in our release notes.

Checklist

  • These changes do not require documentation

- The journalist auth file should always be present and is not
  logically tied to the SSH-over-Tor setting or the presence
  of SSH onion service secrets

- The tor_v3_keys.json file is _only_ required if SSH secrets
  are present and SSH-over-Tor is enabled

- We can no longer support the Tails 3 series, so it's appropriate
  to error out at this point when users attempt to use it.
@eloquence eloquence requested a review from a team as a code owner May 28, 2021 00:30
@eloquence eloquence added this to Ready for Review in SecureDrop Team Board May 28, 2021
@eloquence eloquence added this to the 2.0.0 milestone May 28, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #5965 (0eafe02) into develop (bac4677) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5965   +/-   ##
========================================
  Coverage    85.34%   85.34%           
========================================
  Files           53       53           
  Lines         3875     3875           
  Branches       480      480           
========================================
  Hits          3307     3307           
  Misses         456      456           
  Partials       112      112           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bac4677...0eafe02. Read the comment docs.

@zenmonkeykstop zenmonkeykstop self-assigned this Jun 1, 2021
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a physical or virtualized Admin Workstation with SSH-over-Tor enabled

  1. Move app-journalist.auth_private, tor_v3_keys.json, app-ssh.auth_private and mon-ssh.auth_private from ~/Persistent/securedrop/install_files/ansible-base into a temporary location like ~/Persistent
  2. On this branch, run ./securedrop-admin --force tailsconfig in /Persistent/securedrop
    • Observe that it fails with an error noting that app-journalist.auth_private is missing. [Explanation: This file must always be present to access the web-based Journalist/Admin Interface.]
  3. Copy app-journalist.auth_private into place
  4. Repeat step 2
    • Observe that the command completes successfully.
  5. Copy app-ssh.auth_private and mon-ssh.auth_private into place
  6. Repeat step 2
    • Observe that it fails with an error noting that tor_v3_keys.json is missing [Explanation: This file contains the private key needed to authenticate against the SSH onion services.]
  7. Edit ~/Persistent/securedrop/install_files/ansible-base/group_vars/all/site-specific and set enable_ssh_over_tor to false
  8. Repeat step 2
    • Observe that the command completes successfully. [Explanation: When SSH-over-Tor is disabled, we do not need to strictly confirm existence of the file.]
  9. Undo your modification in step 10
  10. Copy tor_v3_keys.json into place
    • Observe that the command completes successfully

Test plan and changes LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

(develop) securedrop-admin tailsconfig forces presence of tor_v3_keys.json for Journalist Workstations
3 participants