NetworkManager/clients
Lubomir Rintel 60e632d891 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:
- code format
- missing 494819bbbf ("cloud-setup: move common code for get_config()
  to base class and improve cancellation"). From it we only needed
  the `get_config_data->self` part, but used g_task_get_source_object
  instead.
- missing 5fb2f7e717 ("cloud-setup/trivial: rename "response_data"
  variable")

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)
(cherry picked from commit d75e307ebc)
(cherry picked from commit ef3d4758d6)
(cherry picked from commit 9be92ab29e)
(cherry picked from commit f52ff08a65)
2023-09-20 08:24:21 +02:00
..
cli cli: fix reference count handling in hotspot error path 2020-08-28 12:13:47 +02:00
cloud-setup cloud-setup/ec2: start with requesting a IMDSv2 token 2023-09-20 08:24:21 +02:00
common core,libnm: don't touch device TC configuration by default 2021-06-18 10:18:46 +02:00
tests libnm,cli,ifcfg-rh: add ipv6.ra-timeout configuration option 2020-02-17 15:06:10 +01:00
tui tui: fix signature for nmt_newt_form_keypress_callback() callback 2020-08-28 11:37:03 +02:00
meson.build cloud-setup: add tool for automatic IP configuration in cloud 2019-11-28 19:52:18 +01:00
nm-online.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00