!atvIbxHoEqNcAIxYpN:nixos.org

NixOS AWS

64 Members
15 Servers

Load older messages


SenderMessageTime
11 Oct 2024
@arianvp:matrix.orgArianah nope just works! sick19:46:55
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org
Problem is people doing nixos-rebuild switch on an existing instance

Wait are the AMIs tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular user.

21:55:02
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org
Problem is people doing nixos-rebuild switch on an existing instance
*

Wait are the AMIs tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular user and using their local configuration.nix (which I'm assuming doesn't have any inputs from the ami repo).

21:56:00
@commiterate:matrix.orgcommiterate *

Wait are the AMIs tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular system and using their local configuration.nix (which I'm assuming doesn't have any inputs from the ami repo).

21:56:35
@commiterate:matrix.orgcommiterate *

Wait are the AMIs' configuration.nix files tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular system and using their local configuration.nix (which I'm assuming doesn't have any inputs from the ami repo).

21:57:02
@commiterate:matrix.orgcommiterateNope. EIC itself just works by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs).21:58:30
@commiterate:matrix.orgcommiterateI need to follow up next week to see if they're willing to take ownership of my Go rewrite over the existing Bash script abomination. https://github.com/commiterate/amazon-ec2-ssh-utils21:59:12
@commiterate:matrix.orgcommiterate *

I need to follow up next week to see if they're willing to take ownership of my Go rewrite to replace the existing Bash script abomination.

https://github.com/commiterate/amazon-ec2-ssh-utils

21:59:55
@commiterate:matrix.orgcommiterate * Nope. EIC itself just works by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs) and just writes an OpenSSH authorized keys file contents to stdout. 22:02:02
@commiterate:matrix.orgcommiterate * Nope. EIC itself just works by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs) and just writes OpenSSH authorized keys file contents to stdout. 22:02:15
@commiterate:matrix.orgcommiterate * Nope. EIC itself works inside the instance by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs) and just writes OpenSSH authorized keys file contents to stdout. 22:33:29
@arianvp:matrix.orgArianThe Ami is built from nixpkgs repo23:20:45
@arianvp:matrix.orgArianThe configuration.nix should pull in modules/virtualisation/Amazon-Image.nix which i need to change for the non-bios support23:22:01
@arianvp:matrix.orgArianIf it suddenly gets changed when someone pulls nixpkgs it will try to install grub on a non-existent ESP and fail23:23:08
@arianvp:matrix.orgArianSo I think I'll need to conditionalize those bits on stateVersion23:23:41
@commiterate:matrix.orgcommiterateah yeah that's a bit cursed then23:28:52
@commiterate:matrix.orgcommiterateone day we'll move to systemd-repart23:29:28
@commiterate:matrix.orgcommiterate * one day we'll move to systemd-repart for a fully self-contained image23:31:06
@arianvp:matrix.orgArianThat's why I'm making this change. As repart can't make bios images 23:44:11
@arianvp:matrix.orgArian* That's why I'm making this change. As repart can't make mbr partition tables23:44:24
@arianvp:matrix.orgArianSo I want to make sure all images are GPT Partition tables. Then I can move to repart builder later23:44:42
13 Oct 2024
@arianvp:matrix.orgArianurgh bad news13:22:36
@arianvp:matrix.orgArian the NixOS config we ship in the base image doesn't set stateVersion 13:22:50
14 Oct 2024
@arianvp:matrix.orgArianPSA: we shipped a pretty serious bug to unstable that will lock you out of your EC2 instances : https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/6310:03:47
@arianvp:matrix.orgArian* PSA: we shipped a pretty serious bug to unstable that will lock you out of your EC2 instances if using ssh. SSM still works https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/6310:04:07
@arianvp:matrix.orgArian* PSA: we shipped a pretty serious bug to unstable that will lock you out of your EC2 instances if using ssh. SSM still works. Please refrain from updating untill the fix has landed on the unstable branch https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/6310:04:30
@arianvp:matrix.orgArianhmm one with that worries me with AuthorizedKeysCommand for the main ssh key is http://blog.champtar.fr/Metadata_MITM_root_EKS_GKE/ i.e. EC2 instance connect goes out of its way to protect against a rogue IMDS. But the normal ssh key does not13:48:06
@arianvp:matrix.orgArianidk if this is really in scope...13:48:12
@arianvp:matrix.orgArianI just find it interesting that EC2 instance connect goes all the way to protect against such attacks 13:48:24
@arianvp:matrix.orgArianbut then the normal SSH key doesn't get protected by this at all13:48:32

Show newer messages


Back to Room ListRoom Version: 10