Add YubiKey / FIDO2 hardware-backed admin SSH#100
Conversation
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughAdds optional YubiKey/FIDO2-backed SSH authentication for ChangesYubiKey SSH and Vaultwarden support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant keepnode-enroll-yubikey
participant RuntimeAuthorizedKeys
participant AntiLockoutCheck
Operator->>keepnode-enroll-yubikey: Submit FIDO2 public key
keepnode-enroll-yubikey->>RuntimeAuthorizedKeys: Validate, deduplicate, and append key
keepnode-enroll-yubikey->>AntiLockoutCheck: Restart hardware-key check
AntiLockoutCheck->>RuntimeAuthorizedKeys: Verify usable sk- key exists
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nixos/yubikey.nix`:
- Around line 267-282: The keyTypes allow-list is bypassed in both hardware-key
validation paths. In nixos/yubikey.nix lines 267-282, update the anti-lockout
check to match only concrete key algorithms from acceptedAlgorithms rather than
the generic sk-(ssh|ecdsa) pattern; in nixos/yubikey.nix lines 80-87, update the
enrollment helper’s pasted-key validation to use acceptedAlgorithms instead of
hardcoded prefixes, while preserving the default behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 21db1cce-31de-44f0-94e5-4707a8629a06
📒 Files selected for processing (8)
README.mddocs/SECURITY.mddocs/deployment.mdflake.nixnixos/keep-node.nixnixos/vaultwarden.nixnixos/yubikey.nixtests/yubikey-ssh.nix
02797fb to
d0de114
Compare
d0de114 to
1088e21
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 107-110: Remove the blank line separating the adjacent blockquote
lines in the README passage so the YubiKey and recovery text remains one
continuous blockquote and satisfies markdownlint MD028.
- Around line 84-85: Fix the new prose punctuation by removing spaces before
commas in the phrases “laptop,” and “vault,” including the corresponding text at
the additional referenced location.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b79bc45d-a2f9-4f45-a3e1-7fc479adb044
📒 Files selected for processing (11)
README.mddocs/SECURITY.mddocs/deployment.mdflake.nixnixos/admin-access.nixnixos/keep-node.nixnixos/lib/authorized-keys.nixnixos/lib/key-check.nixnixos/vaultwarden.nixnixos/yubikey.nixtests/yubikey-ssh.nix
🚧 Files skipped from review as they are similar to previous changes (6)
- nixos/keep-node.nix
- nixos/vaultwarden.nix
- docs/SECURITY.md
- docs/deployment.md
- flake.nix
- nixos/yubikey.nix
New
keepNode.security.yubikeymodule:ed25519-sk/ecdsa-skkeys forkeepadmin, opt-inrequireHardwareKey(sshd refuses non-sk-keys), per-keyverify-required, build-time + boot-time anti-lockout guards, and akeepnode-enroll-yubikeypost-install helper. AddskeepNode.vaultwarden.domainso WebAuthn binds to the right origin. Off by default; software keys unaffected.Closes #99
Summary by CodeRabbit