83ea88e03f
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. |
||
---|---|---|
.. | ||
amazon-image.nix | ||
amazon-init.nix | ||
amazon-options.nix | ||
anbox.nix | ||
azure-agent-entropy.patch | ||
azure-agent.nix | ||
azure-bootstrap-blobs.nix | ||
azure-common.nix | ||
azure-config-user.nix | ||
azure-config.nix | ||
azure-image.nix | ||
azure-images.nix | ||
brightbox-config.nix | ||
brightbox-image.nix | ||
cloudstack-config.nix | ||
container-config.nix | ||
containers.nix | ||
cri-o.nix | ||
digital-ocean-config.nix | ||
digital-ocean-image.nix | ||
digital-ocean-init.nix | ||
docker-image.nix | ||
docker.nix | ||
ec2-amis.nix | ||
ec2-data.nix | ||
ec2-metadata-fetcher.nix | ||
ecs-agent.nix | ||
gce-images.nix | ||
google-compute-config.nix | ||
google-compute-image.nix | ||
grow-partition.nix | ||
hyperv-guest.nix | ||
hyperv-image.nix | ||
kvmgt.nix | ||
libvirtd.nix | ||
lxc-container.nix | ||
lxc.nix | ||
lxcfs.nix | ||
lxd.nix | ||
nixos-containers.nix | ||
oci-containers.nix | ||
openstack-config.nix | ||
openstack-metadata-fetcher.nix | ||
openvswitch.nix | ||
parallels-guest.nix | ||
podman.nix | ||
qemu-guest-agent.nix | ||
qemu-vm.nix | ||
railcar.nix | ||
spice-usb-redirection.nix | ||
vagrant-guest.nix | ||
vagrant-virtualbox-image.nix | ||
virtualbox-guest.nix | ||
virtualbox-host.nix | ||
virtualbox-image.nix | ||
vmware-guest.nix | ||
vmware-image.nix | ||
xe-guest-utilities.nix | ||
xen-dom0.nix | ||
xen-domU.nix |