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

Update Admin USB rebuild instructions for v3 + 20.04 instances #224

Merged
merged 6 commits into from
Aug 19, 2021

Conversation

rocodes
Copy link
Contributor

@rocodes rocodes commented May 18, 2021

Status

Ready for review

Description of Changes

Testing

  • visual review
  • step through instructions with fresh Admin USB on hardware

Release

  • n/a

Checklist (Optional)

@rocodes rocodes requested a review from zenmonkeykstop May 18, 2021 19:39
@rocodes rocodes force-pushed the rebuild-admin-v3 branch from b24db95 to bd2f252 Compare May 18, 2021 19:46
@rocodes
Copy link
Contributor Author

rocodes commented May 18, 2021

Comments for reviewer:

  • Currently, the backup happens before SSH-over-Tor has been set up again. So the steps are: enable ssh-over-LAN, grab required files, sdconfig, backup, enable ssh-over-Tor, install, tailsconfig. This seems less than ideal, but I guess it's safer than proceeding with the install step without having an existing backup. I'm kind of hoping someone will vote to move the backup til later in the process.
  • I've included grabbing the journalist alerts ossec configuration info in this rebuild; it was not previously included.

@eloquence eloquence self-assigned this May 20, 2021
@eloquence
Copy link
Member

One early observation: The instructions for single-user mode may need to be updated. At least on my NUC10s with Ubuntu 20.04:

  • The GRUB menu does not appear unless I hold "Escape" during boot
  • The Linux boot options look different:
    IMG_20210520_134614

@rocodes would you like to consider that in the scope of this PR, or would you prefer if I file a separate issue for it?

docs/rebuild_admin.rst Outdated Show resolved Hide resolved
docs/rebuild_admin.rst Outdated Show resolved Hide resolved
@rocodes rocodes force-pushed the rebuild-admin-v3 branch 2 times, most recently from 8c913bb to a5a6392 Compare May 20, 2021 22:29
@rocodes
Copy link
Contributor Author

rocodes commented May 20, 2021

Thanks for your review! I've addressed your comments in a5a6392.

I didn't provide updated instructions for getting into the GRUB menu because it does vary based on hardware model and I think it's fair to expect admins to figure that part out themselves if need be, but I did update the line about the kernelopts in single user mode.

@eloquence
Copy link
Member

I stepped through a full rebuild using these docs and while I encountered a couple of stumbles (I specified the wrong IP to iptables; later Ansible errored out once during "Timed out waiting for last boot time check (timeout=600)"; I had to restart Tor manually to regain SSH access), none of this was due to the instructions here, which worked beautifully. 🎉

I may push some minor tweaks but otherwise I think this looks pretty good to go.

docs/rebuild_admin.rst Outdated Show resolved Hide resolved
docs/rebuild_admin.rst Outdated Show resolved Hide resolved
@eloquence
Copy link
Member

This looks good from my end! @zenmonkeykstop, it would be great if you could have a look. I think a visual review & input on overall structure and open comments is probably sufficient; I tested the overall process (except for the HTTPS configuration -- I only tested that the tar syntax works), and it worked well for me.

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.

I haven't attempted a run-thru yet, but I think this needs some changes to address the fact that authentication keys will change. At minimum all existing keys need to be reprovisioned (this wasn't the case for v2 because the hidden service auth token didn't change).

docs/rebuild_admin.rst Show resolved Hide resolved
docs/rebuild_admin.rst Outdated Show resolved Hide resolved
docs/rebuild_admin.rst Outdated Show resolved Hide resolved
docs/rebuild_admin.rst Outdated Show resolved Hide resolved
docs/rebuild_admin.rst Outdated Show resolved Hide resolved
@rocodes
Copy link
Contributor Author

rocodes commented Jun 17, 2021

(update: more work tk on this on Monday)

rocodes and others added 3 commits June 21, 2021 12:26
Update single-user-mode instructions to include current kernelopts, note GRUB menu access differs by hardware.
…e ip instead of nnetplan file for network info.
@rocodes rocodes force-pushed the rebuild-admin-v3 branch from 90668bb to 33f6c42 Compare June 21, 2021 21:37
@rocodes rocodes requested a review from zenmonkeykstop June 21, 2021 21:45
@eloquence eloquence assigned eloquence and unassigned eloquence Jul 7, 2021
@eloquence
Copy link
Member

(Starting another round of review on this today, may not get all the way through until tomorrow.)

@eloquence
Copy link
Member

eloquence commented Jul 23, 2021

I stepped through the whole process one more time and I think this is good to go. Thanks for all your hard work on this, @rocodes.

I hit one snag: When running ./securedrop-admin install, it kept rebooting the servers, which kept destroying the iptables rules, causing subsequent commands to hang indefinitely. I'm not quite sure why it kept rebooting, after the task "Add overrides for apt-daily timers", with Ansible then including the reboot.yml file. Commenting that file out let me proceed, but I'd like to understand if this is an error real users may encounter, and if so, how we may be able to mitigate it.

Copy link
Member

@eloquence eloquence left a comment

Choose a reason for hiding this comment

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

Thanks @rocodes! As per our discussion last week, I've not re-tested whether the SSH-over-LAN setting resolves the reboot issue during the playbook run, but logically it makes sense to me, and I trust in your own test results. @zenmonkeykstop, I believe your previous review comments were all addressed - I think this is good to merge.

Note I've appended one small commit to clarify the implications of the SSH-over-Tor vs. SSH-over-LAN setting.

Thanks a lot for the hard work on this, glad to be getting these updated docs in.

@zenmonkeykstop zenmonkeykstop merged commit 27eff96 into main Aug 19, 2021
@zenmonkeykstop zenmonkeykstop deleted the rebuild-admin-v3 branch August 19, 2021 15:58
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 this pull request may close these issues.

Instructions for rebuilding Admin Workstation are not applicable for v3
3 participants