Disable root SSH authentication altogether #24

Open
opened 2024-11-21 11:49:14 +01:00 by Niols · 1 comment
Owner

After discussion in the Matrix channel, and as mentioned in #20 (comment), we should get rid of root SSH authentication altogether.
this would then raise the question on how we might handle deployment in such a way as to better limit attack surface.

implementation notes.

ideas:

  1. first off switch deployment from using root to using @wheel users with password-less sudo. NixOps4 did not support this yet, so this may depend on it being subsumed (after #494).
  2. pull-based (may be less great for latency in our context of operator-triggered updates):
    1. nits
    2. UKIs' pull-based updates
  3. pull-on-command:
    1. nixless-agent: on command node pulls update from cache - unmaintained
    2. SSH keys limited to a command like pulling from cache (#295) + rebuild
  4. push-based:
    1. replace the node with a new one based on the new configuration (needs state transfer, see #100) - overkill
  5. kubernetes (#598) - overkill
After discussion in the Matrix channel, and as mentioned in https://git.fediversity.eu/fediversity/fediversity/pulls/20#issuecomment-3275, we should get rid of root SSH authentication altogether. this would then raise the question on how we might handle deployment in such a way as to better limit attack surface. ### implementation notes. ideas: 1. first off switch deployment from using `root` to using `@wheel` users with password-less sudo. NixOps4 did not support this yet, so this may depend on it being subsumed (after #494). 1. pull-based (may be less great for latency in our context of operator-triggered updates): 1. ~~[nits](https://github.com/numtide/nits)~~ 1. [UKIs](https://nixos.org/manual/nixos/stable/#sec-image-repart-appliance)' ~~pull-based [updates](https://x86.lol/generic/2024/08/28/systemd-sysupdate.html)~~ - c.f. [`appvm`](https://github.com/jollheef/appvm) 1. pull-on-command: 1. ~[`nixless-agent`](https://github.com/DanielSidhion/nixless-agent): on command node pulls update from cache~ - unmaintained 1. SSH keys limited to a command like pulling from cache (#295) + rebuild 1. push-based: 1. ~replace the node with a new one based on the new configuration (needs state transfer, see #100)~ - overkill 1. ~kubernetes~ (#598) - overkill
kiara removed this from the Fediversity project 2025-04-14 11:13:17 +02:00
Owner

now that #1112 landed, this seems used still mostly for (in either case mostly for non-incus deployment methods, as that also offers incus exec):

  • deployment (currently notably our dev group)
  • diagnosing/restarting services (#599)
now that #1112 landed, this seems used still mostly for (in either case mostly for non-incus deployment methods, as that also offers `incus exec`): - deployment (currently notably our dev group) - diagnosing/restarting services (#599)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks Depends on
#494 data model used
fediversity/fediversity
#599 diagnosing services
fediversity/fediversity
#883 infra includes hypervisor
fediversity/fediversity
Reference
fediversity/fediversity#24
No description provided.