imds: add new systemd-imdsd.service that makes IMDS data accessible locally
This service's job is to talk to a VM associated IMDS service provided by the local Cloud. It tries to abstract the protocol differences various IMDS implementations implement, but does *not* really try to abstract more than a few basic fields of the actual IMDS metadata. IMDS access is wrapped in a Varlink API that local clients can talk to. If possible this makes use of the IMDS endpoint information that has been added to hwdb in the preceeding commit. However, endpoint info can also be provided via kernel command line and credentials. For debugging purposes we also accept them via environment variables and command line arguments. This adds a concept of early-boot networking, just enough to be able to talk to the IMDS service. It is minimally configurable via a kernel cmdline option (and a build-time option): the user may choose between "locked" and "unlocked" mode. In the former mode direct access to IMDS via HTTPS is blocked via a prohibit route (and thus all IMDS communication has to be done via systemd-imdsd@.service). In the latter case no such lockdown takes place, and IMDS may be acquired both via this new service and directly. The latter is typically a good idea for compatibility with current systems, the former is preferable for secure installations. Access to IMDS fields is controlled via PK.
This commit is contained in:
@@ -142,6 +142,8 @@ option('timedated', type : 'boolean',
|
||||
description : 'install the systemd-timedated daemon')
|
||||
option('timesyncd', type : 'boolean',
|
||||
description : 'install the systemd-timesyncd daemon')
|
||||
option('imds', type : 'feature',
|
||||
description : 'install the systemd-imds stack')
|
||||
option('journal-storage-default', type : 'combo', choices : ['persistent', 'auto', 'volatile', 'none'],
|
||||
description : 'default storage mode for journald (main namespace)')
|
||||
option('remote', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
@@ -334,6 +336,8 @@ option('systemd-resolve-uid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the systemd-resolve user')
|
||||
option('systemd-timesync-uid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the systemd-timesync user')
|
||||
option('systemd-imds-uid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the systemd-imds user')
|
||||
|
||||
option('dev-kvm-mode', type : 'string', value : '0666',
|
||||
description : '/dev/kvm access mode')
|
||||
|
||||
Reference in New Issue
Block a user