NetworkManager/clients/cloud-setup
Lubomir Rintel d75e307ebc cloud-setup/ec2: start with requesting a IMDSv2 token
The present version of the EC2 metadata API (IMDSv2) requires a header
with a token to be present in all requests. The token is essentially a
cookie that's not actually a cookie that's obtained with a PUT call that
doesn't put anything. Apparently it's too easy to trick someone into
calling a GET method.

EC2 now supports IMDSv2 everywhere with IMDSv1 being optional, so let's
just use IMDSv2 unconditionally. Also, the presence of a token API can
be used to detect the AWS EC2 cloud.

Conflicts: variable alignments only

https://bugzilla.redhat.com/show_bug.cgi?id=2151986
(cherry picked from commit 8b7e12c2d6)
(cherry picked from commit 429f36cd81)
(cherry picked from commit e3ac982b32)
(cherry picked from commit c5a3e739b1)
(cherry picked from commit ee157ad48b)
(cherry picked from commit ae3ec36462)
(cherry picked from commit 865fe0732e)
2023-09-18 09:22:45 +02:00
..
tests cloud-setup/tests: add test for nmcs_setting_ip_replace_ipv4_addresses() 2021-02-10 18:35:13 +01:00
90-nm-cloud-setup.sh cloud-setup: let dispatcher script run tool only if service is enabled 2019-12-03 16:18:33 +01:00
main.c cloud-setup: use suppress_prefixlength rule to honor non-default-routes in the main table 2021-10-05 09:35:48 +02:00
meson.build cloud-setup/tests: add unit test for nm-cloud-setup 2021-02-10 18:23:44 +01:00
nm-cloud-setup-utils.c cloud-setup: fix replacing IPv4 addresses during update 2021-02-10 18:23:44 +01:00
nm-cloud-setup-utils.h cloud-setup: add nmcs_utils_ipaddr_normalize*() helper 2021-01-08 16:32:49 +01:00
nm-cloud-setup.service.in cloud-setup: add Documentation link to "nm-cloud-setup.service" 2021-02-02 18:13:02 +01:00
nm-cloud-setup.timer cloud-setup: add tool for automatic IP configuration in cloud 2019-11-28 19:52:18 +01:00
nm-http-client.c cloud-setup: make nm_http_client_req() accept a method argument 2023-09-18 09:22:24 +02:00
nm-http-client.h cloud-setup: make nm_http_client_req() accept a method argument 2023-09-18 09:22:24 +02:00
nmcs-provider-azure.c cloud-setup: make nm_http_client_req() accept a method argument 2023-09-18 09:22:24 +02:00
nmcs-provider-azure.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-ec2.c cloud-setup/ec2: start with requesting a IMDSv2 token 2023-09-18 09:22:45 +02:00
nmcs-provider-ec2.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-gcp.c cloud-setup: make nm_http_client_req() accept a method argument 2023-09-18 09:22:24 +02:00
nmcs-provider-gcp.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider.c cloud-setup: track config-task-data in iface-data 2023-09-18 08:48:59 +02:00
nmcs-provider.h cloud-setup: track config-task-data in iface-data 2023-09-18 08:48:59 +02:00