nixpkgs-suyu/nixos/modules/virtualisation
Graham Christensen 83ea88e03f
nixos: ec2 ami: support IMDSv2
AWS's metadata service has two versions. Version 1 allowed plain HTTP
requests to get metadata. However, this was frequently abused when a
user could trick an AWS-hosted server in to proxying requests to the
metadata service. Since the metadata service is frequently used to
generate AWS access keys, this is pretty gnarly. Version two is
identical except it requires the caller to request a token and provide
it on each request.

Today, starting a NixOS AMI in EC2 where the metadata service is
configured to only allow v2 requests fails: the user's SSH key is not
placed, and configuration provided by the user-data is not applied.
The server is useless. This patch addresses that.

Note the dependency on curl is not a joyful one, and it expand the
initrd by 30M. However, see the added comment for more information
about why this is needed. Note the idea of using `echo` and `nc` are
laughable. Don't do that.
2020-11-19 13:00:56 -05:00
..
amazon-image.nix nixos: ec2 ami: support IMDSv2 2020-11-19 13:00:56 -05:00
amazon-init.nix
amazon-options.nix
anbox.nix
azure-agent-entropy.patch
azure-agent.nix nixos/azure-agent: always run systemctl of the currently running systemd 2020-05-21 10:34:11 +02:00
azure-bootstrap-blobs.nix
azure-common.nix azure: boot.growPartition = true 2020-03-29 13:56:55 -07:00
azure-config-user.nix
azure-config.nix
azure-image.nix nixos/modules: remove trailing whitespace 2020-08-07 14:45:39 +01:00
azure-images.nix
brightbox-config.nix
brightbox-image.nix
cloudstack-config.nix
container-config.nix
containers.nix nixos/{containers,cri-o,podman}: move copyFile to nixos/lib/utils 2020-09-24 10:01:47 +10:00
cri-o.nix nixos/{containers,cri-o,podman}: move copyFile to nixos/lib/utils 2020-09-24 10:01:47 +10:00
digital-ocean-config.nix
digital-ocean-image.nix
digital-ocean-init.nix
docker-image.nix
docker.nix nixos/docker: explicitly load kernel modules 2020-07-18 02:31:25 +00:00
ec2-amis.nix ec2-amis: update AMIs to use gpt partition table 2020-11-05 20:58:08 -05:00
ec2-data.nix
ec2-metadata-fetcher.nix nixos: ec2 ami: support IMDSv2 2020-11-19 13:00:56 -05:00
ecs-agent.nix nixos/*: use $out instead of $bin with buildGoPackage 2020-04-28 20:30:29 +10:00
gce-images.nix
google-compute-config.nix
google-compute-image.nix
grow-partition.nix
hyperv-guest.nix
hyperv-image.nix virtualisation/hyperv-image: remove diskImage after vhdx is generated 2020-05-20 19:56:38 -04:00
kvmgt.nix nixos/kvmgt: allow multiple uuids on same mdev 2020-05-30 12:13:54 -04:00
libvirtd.nix libvirtd: don't start libvirtd-tcp.socket by default 2020-07-08 19:50:23 -04:00
lxc-container.nix
lxc.nix Revert "apparmor: fix and improve the service" 2020-10-07 12:22:18 +02:00
lxcfs.nix
lxd.nix Revert "apparmor: fix and improve the service" 2020-10-07 12:22:18 +02:00
nixos-containers.nix treewide: completely remove types.loaOf 2020-09-02 00:42:50 +02:00
oci-containers.nix nixos/docker-containers: Rename to virtualisation.oci-containers.containers. 2020-05-04 13:47:25 +01:00
openstack-config.nix nixos: openstack: have its own metadata fetcher expression 2020-11-18 11:42:32 -05:00
openstack-metadata-fetcher.nix nixos: openstack: have its own metadata fetcher expression 2020-11-18 11:42:32 -05:00
openvswitch.nix
parallels-guest.nix treewide: fix modules options types where the default is null 2020-04-28 19:13:59 +02:00
podman.nix nixos/{containers,cri-o,podman}: move copyFile to nixos/lib/utils 2020-09-24 10:01:47 +10:00
qemu-guest-agent.nix nixos/qemu-guest-agent: make the QEMU guest agent package configurable 2020-10-19 17:58:10 +02:00
qemu-vm.nix nixos/qemu-vm: Update system.requiredKernelConfig 2020-10-30 22:22:58 +01:00
railcar.nix treewide: completely remove types.loaOf 2020-09-02 00:42:50 +02:00
spice-usb-redirection.nix fixup: address @jtojnar's review comments 2020-09-12 17:00:44 +02:00
vagrant-guest.nix nixos/vagrant-virtualbox-image: init (#101120) 2020-10-20 11:09:46 +02:00
vagrant-virtualbox-image.nix nixos/vagrant-virtualbox-image: init (#101120) 2020-10-20 11:09:46 +02:00
virtualbox-guest.nix nixos/virtualbox-guest: add vmware driver 2020-06-17 18:43:27 +02:00
virtualbox-host.nix
virtualbox-image.nix Merge pull request #60246 from dfordivam/virtualbox-add-extra-disk 2020-08-02 13:13:52 -04:00
vmware-guest.nix
vmware-image.nix virtualisation: add vmware-image (#88523) 2020-05-22 10:03:46 +02:00
xe-guest-utilities.nix
xen-dom0.nix treewide: add types to boolean / enable options or make use of mkEnableOption 2020-04-27 09:32:01 +02:00
xen-domU.nix