Repository navigation
feat(wd_mycloud): install break-glass SSH keys and restore them at boot - #499
Merged
Merged
Conversation
wd_mycloud's root filesystem (including /home/root) is a RAM disk, so the break-glass keys from breakglass_pubkeys are kept on the data disk (/mnt/HD/HD_a2/breakglass/authorized_keys), copied into root's ~/.ssh now, and again at every boot from a managed block in clamAV's start.sh. Same check/apply proxy pattern as the other wd_mycloud execs on nuc. Password login stays on until a key login was tested. Also notes in roles::ssh_hardening that nas got the YubiKey key by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of
docs/ZERO_TRUST_PLAN.md, break-glass for wd_mycloud.wd_mycloud's root filesystem is a RAM disk (
/dev/ram0), so/home/root/.sshis lost at every reboot. It currently has no key files and allows password login. This PR:breakglass_pubkeysto/mnt/HD/HD_a2/breakglass/authorized_keyson the data disk./home/root/.ssh/authorized_keys(0700/0600).start.sh, the same boot hook the Tailscale watchdog uses, which copies the keys again at every boot.breakglass-check.sh(read-only guard) andbreakglass-apply.sh, run byroles::wd_mycloud_proxyon nuc like the other wd_mycloud execs.The guard is a shell
test -f ... && bash .... Without it, the first noop (before the scripts exist on nuc) logs a "Could not find command" error, which the live-noop CI check treats as a failure.Password login is deliberately left on until a key login has been tested. A follow-up switches it off at boot.
Also updates the
roles::ssh_hardeningheader: nas got the YubiKey key by hand on 2026-11-04. A backup is at/boot/config/ssh/root/authorized_keys.pre-yk1-20261104.Verification
make testandshellcheckpass.breakglass-check.shlocally against the device: it exits 1, as expected before an apply.🤖 Generated with Claude Code