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

Use the new Tails Persistent Storage copy option where applicable #492

Merged
merged 7 commits into from
Nov 19, 2024

Conversation

nathandyer
Copy link
Contributor

@nathandyer nathandyer commented Aug 24, 2023

Status

Ready for review

Description of Changes

This modifies the workflow in a couple key areas to use the new option in the Tails Installer that can copy an existing drive's Persistent Storage during a cloning operation.

It's worth noting that I elected not to use this tool for the backup procedures, instead preferring the current rsync based approach. This is because the current process allows for multiple workstation backups onto a single drive, which the Tails Installer tool does not allow. For that same reason, I have left the previous steps in place regarding the use of securedrop-admin backup and restore.

The second commit here changes the workflow for making a remote Secure Viewing Station. It does eliminate the use the "primary" USB drive, opting instead to clone the current SVS entirely (from an airgapped system). With this being a change in procedure with security implications, it may not be one we feel comfortable making; if not, I'm happy to remove that commit.

I will also note that I captured screenshots of the new Tails Installer, but did not feel it added to the documentation, so I elected to leave them out. If we believe it's worth including them, I can do so relatively easily.

Testing

  • CI passes
  • Visual review

Checklist (Optional)

  • Doc linting (make docs-lint) passed locally
  • Doc link linting (make docs-linkcheck) passed
  • You have previewed (make docs) docs at http://localhost:8000

cfm and others added 3 commits August 16, 2023 18:45
…ring onboarding

By using ssh-add before ssh-copy-id on the new Admin Workstation 2
(AW2), all steps once Tails is installed on AW2 can take place on AW2
with the existing Admin Workstation 1 (AW1) unlocked, rather than
running some steps on AW2 with AW1 unlocked and some steps on AW1 with
AW2 unlocked.

This adds a couple of shell commands (a possible source of error) but
removes 5 steps and some shuffling of thumb drives (a different possible
source of error).

Assumptions:
* If we trust AW2 to have AW1 unlocked, then we trust AW2 to load AW1's
  SSH private key into memory and use it to connect to the Application
  and Monitor Servers, in order to upload AW2's own SSH public key.
* In other words, each Admin Workstation has its own keypair to allow
  revocation of individual keys, not because a given Admin Workstation
  or its owner cannot be trusted to have access to another Admin
  Workstation's full keypair (in a procedure in which, in fact, they *do*
  have such access).
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

SVS part looks good, I have questions about the Admin Workstation cloning though.

docs/admin/deployment/onboarding_admins.rst Show resolved Hide resolved
docs/admin/deployment/onboarding_admins.rst Outdated Show resolved Hide resolved
@nathandyer
Copy link
Contributor Author

@legoktm @cfm Digging up this blast-from-the-past to see if we can get it over the finish line. It has been a while since I looked at this, but it appears that the requested changes have been addressed. Does this just need another pass with a review?

docs/admin/deployment/onboarding_admins.rst Outdated Show resolved Hide resolved
docs/admin/deployment/onboarding_admins.rst Outdated Show resolved Hide resolved
docs/admin/deployment/remote.rst Outdated Show resolved Hide resolved
@cfm
Copy link
Member

cfm commented Oct 1, 2024

@nathandyer, I'm sorry this has sat neglected. Before you address @zenmonkeykstop's latest feedback, it looks like there are now conflicts (that may also conflict with that feedback). Let me know if I can help revise or test this once those are resolved.

@nathandyer
Copy link
Contributor Author

Thanks @zenmonkeykstop for the latest review, and @cfm for flagging the merge conflict. I believe I have fixed the conflict, and addressed the requested changes. One thing to note, in the interim since this was filed, we've already updated the SVS section to point users to the upstream Tails' guide (which I think is also new since I originally filed this PR). I've elected to keep that revision rather than the explicit guide I had started here for that section; that said, because the cloning of Admin Workstations is a bit more involved, I think it makes sense to explicitly guide users through each of the steps. Please let me know what you all think of its current form.

@cfm cfm self-assigned this Oct 12, 2024
Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

Thanks for revising this, @nathandyer. I haven't stepped through it manually again, but in reading through it I have one order-of-operations question (inline). If my question makes sense, it should be an easy fix; if not, let's chat tomorrow and you can let me know what I'm missing!

on your servers:

* ``ssh-add``
* ``ssh-add /media/amnesia/TailsData/openssh-client/id_rsa``
Copy link
Member

Choose a reason for hiding this comment

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

If we've booted AW2 in new step (10), then /media/amnesia/TailsData is AW1's persistent storage. Don't we still need old step (12) to mount AW1 and old step (17) to unmount it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cfm I don't believe so; /media/amnesia/tailsData should be AW2's persistent storage, not AW1s. Unlike the original instructions, we're never actually copying directly from AW1 to AW2 (I mean that in the spiritual sense, rather than literal - the contents of that persistent volume are being copied, it's just a more transparent operation during the drive creation process). With the Tails Cloner, AW1's persistent storage gets duplicated as AW2's during the cloning (because of the option checked in new step 6). So when you shut down AW1, boot into AW2, and then unlock the storage, at that point AW1 is completely out of the picture.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noting for the sake of posterity here within the ticket: I just had a great conversation with @cfm, who explained that the issue here is that step 12 (as it stands) overwrites the existing SSH key, so that step 14 is no longer possible due to the original SSH key (needed for adding the new SSH key to the servers) is not available.

The fix to this is to add a few additional steps to insert AW1, unlock persistent storage, perform step 14, then remove AW1 again.

Commit incoming.

Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

Thanks for conferring about this, @nathandyer. Last volley, I promise: I think we should keep the step-by-step instructions for handling AW1 in step (14), especially since with the Cloner the user now won't have had to do other un/lock operations with the file manager.

docs/admin/deployment/onboarding_admins.rst Outdated Show resolved Hide resolved
Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

I stepped through this earlier today for the discussion that's led to 86f5d8e, and with that change this procedure works as intended. Thanks a bunch, @nathandyer, not least for your patience in shepherding this!

Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

(per Cory's review; didn't look again)

@zenmonkeykstop zenmonkeykstop dismissed their stale review November 19, 2024 17:05

no longer relevant

@cfm cfm added this pull request to the merge queue Nov 19, 2024
Merged via the queue into main with commit d3ffce2 Nov 19, 2024
4 checks passed
@cfm cfm deleted the tails-copy-pv branch November 19, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use the new option in the Tails Installer to copy the Persistent Volume where applicable
4 participants